# Typeshift > Code-defined agents and toolsets for .NET on Microsoft.Extensions.AI Build AI agents for .NET with just a few lines of code, and let the compiler catch your mistakes. ## Table of Contents ### Introduction - [Getting started](https://weboost-at.github.io/Typeshift/guide/getting-started.md): Build and run a first agent in four steps, then see how the pieces fit, what your app implements, and the docs for coding assistants. - [Using an agent](https://weboost-at.github.io/Typeshift/guide/using-an-agent.md): Get an agent's host from dependency injection and run the agent from a web request, a console app or a background job. - [Implementing a store](https://weboost-at.github.io/Typeshift/guide/implementing-a-store.md): Write the store that keeps your agents' settings and conversations in your own database, from its lifetime and versions to conversation summaries. ### Building agents - [Toolsets](https://weboost-at.github.io/Typeshift/guide/toolsets.md): Group the tools that belong together into a toolset, declare each one as a static method, and let the generator turn it into an AIFunction. - [Tool settings](https://weboost-at.github.io/Typeshift/guide/tool-settings.md): Give a tool values the model must not choose, such as a result limit, and decide which of them may change at runtime. - [Agents](https://weboost-at.github.io/Typeshift/guide/defining-agents.md): Declare an agent in its constructor, with its chat options, instructions, tools and their settings. - [MCP servers](https://weboost-at.github.io/Typeshift/guide/mcp.md): Offer the tools of MCP servers to an agent, connected by your app's own MCP client or by the model's provider. - [Multiple agents](https://weboost-at.github.io/Typeshift/guide/multi-agent.md): Let an agent call another agent as a sub-agent, or hand the conversation to it. ### Running agents - [Running agents](https://weboost-at.github.io/Typeshift/guide/running-agents.md): Run an agent through its host with stored settings, run settings, typed output or streaming, and the steps every run passes through. - [Models and providers](https://weboost-at.github.io/Typeshift/guide/models.md): Name an agent's model by provider and model, return its client from your IChatClientProvider, configure providers and keys per customer, handle a failing provider, and pick the summary model. - [Settings and stores](https://weboost-at.github.io/Typeshift/guide/settings-and-stores.md): How a run's settings layer from the code through stored settings to the run, and the one store that keeps settings and conversations. - [Conversations](https://weboost-at.github.io/Typeshift/guide/conversations.md): Store a conversation under an id, resume it after a crash, steer and watch a run, and compact a long one. - [Serving a chat endpoint](https://weboost-at.github.io/Typeshift/guide/chat-endpoint.md): Run an agent from ASP.NET Core endpoints, stream its answer to a chat UI as server-sent events, and answer tool approvals by their ids. - [In production](https://weboost-at.github.io/Typeshift/guide/production.md): The spans and metrics every run records for OpenTelemetry, and what your app needs to publish with Native AOT. ### Controlling runs - [Approval and modes](https://weboost-at.github.io/Typeshift/guide/tool-approval.md): Pause a run until your app approves a tool call, let rules decide the calls you are sure about, and pick the default, plan or auto mode. - [Middleware and context](https://weboost-at.github.io/Typeshift/guide/middleware.md): Wrap every run or tool call for logging, guardrails or audits, and add memory, documents or the customer's profile to an agent's runs. ### Reference - [Registration](https://weboost-at.github.io/Typeshift/guide/registration.md): What a project needs, the id type, and every service AddTypeshift() and its chain register, with lifetimes. - [Builders](https://weboost-at.github.io/Typeshift/guide/builders.md): Every call a toolset or agent constructor can make, and the chat and run options with their defaults. - [Generated members and the host](https://weboost-at.github.io/Typeshift/guide/generated-members.md): Every member the generator writes for your toolsets and agents, what triggers it, and every member of AgentHost with its signature. - [Diagnostics](https://weboost-at.github.io/Typeshift/guide/diagnostics.md): Every TSHnnn error and warning the Typeshift analyzer reports, what causes it and how to fix it. - [Glossary](https://weboost-at.github.io/Typeshift/guide/glossary.md): The words these docs use and what exactly they mean in Typeshift.