Concepts
Agent is the core runtime object. You construct it with an ISessionService and then configure:
ModelSystemPromptToolsUseStreamingThinkingWorkingDirectoryMaxIterationsAutoCompactionContextBuilderToolTimeoutSubAgentsandPresets
Session
Section titled “Session”A Session stores runtime history across turns. Session services provide the persistence strategy:
InMemorySessionServicefor local development and testsJsonFileSessionServicefor file-backed persistence- SQL storage when the platform is hosted through the server stack
SessionHelpers adds convenient operations such as Fork, Rewind, ResumeAt, RemoveFailedTools, and CreateCheckpoint.
AgentCircuits is event-driven. You do not only receive final text. The runtime emits typed events for:
- text
- tool use
- tool results
- thinking
- images
- metrics
- final result metadata
Those same event types are used in the hosted runtime and UI layers.
Tools extend the agent beyond model-only text generation. You can:
- use built-in tools from
BuiltInTools - register
[Tool]methods with[ToolParam] - build tools fluently with
Tool.Create(...).WithHandler(...).Build() - load external tool inventories through MCP
Hooks let you intercept model and tool activity for cross-cutting concerns like approvals, logging, policy enforcement, or metrics.
Provider
Section titled “Provider”Providers turn a model ID into a live ILanguageModel. The current packages cover Anthropic, OpenAI, Gemini, Bedrock, Ollama, and Grok.
Context and memory
Section titled “Context and memory”Context builders determine how session history is turned back into model input. Memory tools add file-backed, cross-session knowledge that the agent can read and update over time.