agents library

Classes

A2AAgent
An AIAgent that communicates with remote agents via the A2A protocol.
A2AAgentHandler
Bridges an AIHostAgent to the A2A (Agent2Agent) protocol.
A2AAgentOptions
Configuration options for an A2AAgent, including its identifier, name, and description.
A2AAgentSession
Session for A2A-based agents.
A2AContinuationToken
Continuation token for polling a background A2A task response.
A2AHostingJsonUtilities
Provides utility configurations for JSON serialization within the A2A hosting layer.
A2ARunDecisionContext
Provides context for a custom A2A run-mode decision.
A2AServerRegistrationOptions
Options for configuring A2A server registration.
ActionExecutor<TInput>
Handles messages by invoking an action that does not produce output.
Activity
Mirrors System.Diagnostics.Activity.
ActivityEvent
Mirrors System.Diagnostics.ActivityEvent.
ActivityNames
Activity name constants used in workflow telemetry.
ActivitySource
Mirrors System.Diagnostics.ActivitySource.
AgentAbstractionsJsonUtilities
Provides utility configurations for JSON serialization within the agent abstractions layer.
AgentClassSkill<TSelf>
Abstract base class for defining skills as Dart classes that bundle all components together.
AgentEvaluationResults
Aggregate evaluation results across multiple items.
AgentEvaluator
Batch-oriented evaluator interface for agent evaluation.
AgentFileSkill
An AgentSkill discovered from a filesystem directory backed by a SKILL.md file.
AgentFileSkillFilterContext
Provides contextual information about a discovered file to the AgentFileSkillsSourceOptions.scriptFilter and AgentFileSkillsSourceOptions.resourceFilter predicates.
AgentFileSkillResource
A file-path-backed skill resource. Reads content from a file on disk relative to the skill directory.
AgentFileSkillScript
A file-path-backed skill script.
AgentFileSkillsSource
A skill source that discovers skills from filesystem directories containing SKILL.md files.
AgentFileSkillsSourceOptions
Configuration options for file-based skill sources.
AgentFileStore
Provides an abstract base class for file storage operations.
AgentInlineSkill
A skill defined entirely in code with resources and scripts.
AgentInlineSkillContentBuilder
Internal helper that builds XML-structured content strings for code-defined and class-based skills.
AgentInlineSkillResource
A skill resource defined in code, backed by either a static value or a delegate.
AgentInlineSkillScript
A skill script backed by a delegate.
AgentInMemorySkillsSource
A skill source that holds AgentSkill instances in memory.
AgentJsonUtilities
Provides utility methods for working with JSON data in the context of agents.
AgentMcpSkill
An AgentSkill discovered from MCP skill metadata.
AgentMcpSkillResource
A skill resource backed by content returned from an MCP server.
AgentMcpSkillsSource
An AgentSkillsSource that discovers Agent Skills exposed over MCP.
AgentMcpSkillsSourceOptions
Configuration options for AgentMcpSkillsSource.
AgentMode
Represents an agent operating mode with a name and description.
AgentModeProvider
An AIContextProvider that tracks the agent's operating mode (e.g., "plan" or "execute") in the session state and provides tools for querying and switching modes.
AgentModeProviderOptions
Options controlling the behavior of AgentModeProvider.
AgentModeState
Represents the state of the agent's operating mode, stored in the session's AgentSessionStateBag.
AgentRequestMessageSourceAttribution
Attribution information for the source of an agent request message, including the component type and its identifier.
AgentRequestMessageSourceType
The source of an agent request message.
AgentResponse
Represents the response to an AIAgent run request, containing messages and metadata about the interaction.
AgentResponseEvent
Workflow output event carrying an AgentResponse.
AgentResponseOf<T>
Represents a typed response from an AIAgent run, containing both the standard AgentResponse data and a deserialized result of type T.
AgentResponseUpdate
Represents a single streaming response chunk from an AIAgent.
AgentResponseUpdateEvent
Workflow output event carrying an AgentResponseUpdate.
AgentRunContext
Provides context for an in-flight agent run.
AgentRunMode
Specifies how the A2A hosting layer decides whether to run an agent in background mode.
AgentRunOptions
Optional parameters and configuration settings for controlling agent run behavior.
AgentSession
Base abstraction for all agent threads.
AgentSessionStateBag
A key-value store for managing session-scoped state with type-safe access and JSON serialization support.
AgentSessionStateBagJsonConverter
Provides JSON encode/decode helpers for AgentSessionStateBag that delegate to AgentSessionStateBag.serialize and AgentSessionStateBag.deserialize.
AgentSessionStateBagValue
Stores a single value in an AgentSessionStateBag.
AgentSessionStateBagValueJsonConverter
Provides JSON encode/decode helpers for AgentSessionStateBagValue that delegate to AgentSessionStateBagValue.toJson and AgentSessionStateBagValue.fromJson.
AgentSessionStore
Defines the contract for storing and retrieving agent conversation threads.
AgentSkill
Abstract base class for all agent skills.
AgentSkillFrontmatter
Represents the YAML frontmatter metadata parsed from a SKILL.md file.
AgentSkillResource
Abstract base class for skill resources. A resource provides supplementary content (references, assets) to a skill.
AgentSkillScript
Abstract base class for skill scripts. A script represents an executable action associated with a skill.
AgentSkillsProvider
An AIContextProvider that exposes agent skills from one or more AgentSkillsSource instances.
AgentSkillsProviderBuilder
Fluent builder for constructing an AgentSkillsProvider backed by a composite source.
AgentSkillsProviderOptions
Configuration options for AgentSkillsProvider.
AgentSkillsSource
Abstract base class for skill sources. A skill source provides skills from a specific origin (filesystem, remote server, database, in-memory, etc.).
AgentSkillsSourceContext
Provides contextual information about the agent and session to an AgentSkillsSource when retrieving skills.
AgentWorkflowBuilder
Provides utility methods for constructing common agent workflows.
AggregateTurnMessagesExecutor
Aggregates received chat messages for release to a downstream executor.
AggregatingAgentSkillsSource
A skill source that aggregates multiple child sources, preserving their registration order.
AggregatingExecutor<T, TOutput>
Abstract base for fan-in aggregation executors.
AIAgent
Provides the base abstraction for all AI agents, defining the core interface for agent interactions and conversation management.
AIAgentBinding
Binds an AIAgent into a workflow as a chat protocol executor.
AIAgentBuilder
Provides a builder for composing a pipeline of AIAgent decorators.
AIAgentHostExecutor
Hosts an AIAgent as a workflow executor.
AIAgentHostOptions
Configuration options for hosting AI agents as workflow executors.
AIAgentIdEqualityComparer
Compares AIAgent instances by their AIAgent.id property.
AIAgentMetadata
Metadata about an AIAgent instance for identification, telemetry, and logging.
AIAgentUnservicedRequestsCollector
Scans AI response messages for unserviced tool-approval and function-call requests and submits them to registered external handlers.
AIContentExternalHandler<TRequestContent extends AIContent, TResponseContent extends AIContent>
Manages pending AI content requests and matches them to external responses.
AIContext
Additional context that AIContextProvider instances supply to enhance AI model interactions during agent invocations.
AIContextProvider
Provides an abstract base class for components that enhance AI context during agent invocations.
AIContextProviderChatClient
A delegating chat client that enriches input messages, tools, and instructions by invoking a pipeline of AIContextProvider instances before delegating to the inner chat client.
AIHostAgent
Provides a hosting wrapper around an AIAgent that adds session persistence capabilities for server-hosted scenarios.
AIJudgeLoopEvaluator
A LoopEvaluator that uses a separate judge ChatClient to decide whether the user's original request has been fully addressed, continuing the loop (with the judge's gap analysis as feedback) while the answer is "no".
AIJudgeLoopEvaluatorOptions
Configuration options for an AI-judge loop evaluator.
AlwaysApproveToolApprovalResponseContent
Wraps a ToolApprovalResponseContent with additional "always approve" settings, enabling the ToolApprovalAgent middleware to record standing approval rules so that future matching tool calls are auto-approved without user interaction.
AnonymousDelegatingAIAgent
Represents a delegating AI agent that wraps an inner agent with implementations provided by delegates.
AnthropicChatClient
A ChatClient implementation backed by Anthropic's Messages API.
AnthropicDefaults
Defaults used by the Anthropic agent integration.
AsyncRunHandle<TOutput>
A live, bidirectional handle to an in-process workflow run.
BackgroundAgentRuntimeState
Holds non-serializable runtime references for in-flight background tasks within a single parent session.
BackgroundAgentRuntimeTask
Tracks the completion state of a Dart Future while preserving the C# provider's explicit task-finalization shape.
BackgroundAgentsProvider
An AIContextProvider that enables an agent to delegate work to background agents asynchronously.
BackgroundAgentsProviderOptions
Options controlling the behavior of BackgroundAgentsProvider.
BackgroundAgentState
Represents the serializable state of background tasks managed by the BackgroundAgentsProvider, stored in the session's AgentSessionStateBag.
BackgroundTaskCompletionLoopEvaluator
A LoopEvaluator that keeps re-invoking the wrapped agent until a BackgroundAgentsProvider reports that no background tasks are still running.
BackgroundTaskCompletionLoopEvaluatorOptions
Provides configuration options for BackgroundTaskCompletionLoopEvaluator.
BackgroundTaskInfo
Represents the metadata and result of a background task managed by the BackgroundAgentsProvider.
BooleanProgressLedgerSlot
A boolean-valued ProgressLedgerSlot.
CachingAgentSkillsSource
A skill source decorator that caches the result of the inner source's getSkills call, returning the cached list on subsequent invocations.
CachingAgentSkillsSourceOptions
Options for configuring a CachingAgentSkillsSource.
CallResult
Captures the result of invoking an executor.
ChatClientAgent
Provides an AIAgent that delegates to a ChatClient implementation.
ChatClientAgentContinuationToken
Represents a continuation token for ChatClientAgent operations that carries additional context needed to resume interrupted responses.
ChatClientAgentOptions
Configuration options for a ChatClientAgent.
ChatClientAgentRunOptions
Provides specialized run options for ChatClientAgent instances, extending the base agent run options with chat-specific configuration.
ChatClientAgentSession
Provides a conversation session for use with ChatClientAgent.
ChatForwardingExecutor
Forwards chat protocol messages to another workflow executor.
ChatHistoryMemoryProvider
A context provider that stores all chat history in a vector store and is able to retrieve related chat history later to augment the conversation.
ChatHistoryMemoryProviderOptions
Options controlling the behavior of ChatHistoryMemoryProvider.
ChatHistoryMemoryProviderScope
Allows scoping of chat history for the ChatHistoryMemoryProvider.
ChatHistoryProvider
Provides an abstract base class for fetching and storing chat history messages for use during agent execution.
ChatMessageJsonConverter
Provides JSON encode/decode helpers for framework ChatMessages.
ChatProtocol
Describes the chat message protocol used by agent workflow executors.
ChatProtocolExecutor
Workflow executor that invokes an AIAgent using the chat protocol.
ChatProtocolExecutorOptions
Configuration for ChatProtocolExecutor.
ChatReducerCompactionStrategy
A compaction strategy that delegates to a ChatReducer to reduce the conversation's included messages.
Checkpoint
Represents a durable workflow checkpoint.
CheckpointableRun
Base contract for run handles that support checkpointing.
CheckpointInfo
Represents a checkpoint with a unique identifier.
CheckpointInfoConverter
Provides serialization and dictionary-key support for CheckpointInfo values.
CheckpointingHandle
Provides checkpointing operations for a running workflow.
CheckpointManager
Minimal checkpoint manager contract for workflow run APIs.
CheckpointManagerImpl
Default checkpoint manager backed by a CheckpointStore.
CheckpointStore
Stores durable workflow checkpoints.
CollectingWorkflowContext
Minimal in-memory workflow context used by tests and lightweight executors.
CompactionMessageGroup
Represents a logical group of ChatMessage instances that must be kept or removed together during compaction.
CompactionMessageIndex
A collection of CompactionMessageGroup instances and derived metrics based on a flat list of ChatMessage objects.
CompactionProvider
A AIContextProvider that applies a CompactionStrategy to compact the message list before each agent invocation.
CompactionStrategy
Base class for strategies that compact a CompactionMessageIndex.
CompactionStrategyChatReducer
A ChatReducer adapter that delegates to a CompactionStrategy.
CompactionTelemetry
Shared telemetry names for compaction operations.
CompactionTriggers
Factory methods for CompactionTrigger predicates.
CompletionMarkerLoopEvaluator
A LoopEvaluator that stops the loop once a configured marker string appears in the agent's latest response, and otherwise continues with feedback asking the agent to keep working and to emit the marker when done.
CompletionMarkerLoopEvaluatorOptions
Configuration options for a completion-marker loop evaluator.
ConcurrentEndExecutor
Aggregates output messages from concurrent agents.
ConcurrentEventSink
An EventSink that forwards events synchronously to a callback.
ConcurrentWorkflowBuilder
Fluent builder for concurrent agent workflows: a fan-out start that broadcasts the incoming messages to every participating agent, a per-agent accumulator that batches each agent's outgoing messages, and a fan-in aggregator that reduces them into a single output list.
Configured<T>
Pairs a workflow object with configuration.
ConfiguredExecutorBinding
Executor binding decorated with configuration metadata.
ContainerUser
UID/GID pair passed to docker run --user.
ContextWindowCompactionStrategy
A compaction strategy that derives token thresholds from a model's context window size and maximum output tokens, applying tool-result eviction before truncation.
ConversationSplitter
Strategy for splitting a conversation into query and response halves for evaluation.
ConversationSplitters
Built-in conversation splitters for common evaluation patterns.
DeduplicatingAgentSkillsSource
A skill source decorator that removes duplicate skills by name, keeping only the first occurrence.
DelayedDeserialization
Supports lazy deserialization of a value when the target type is not known until retrieval time.
DelegateLoopEvaluator
A LoopEvaluator that delegates the re-invocation decision and feedback to a user-supplied callback.
DelegatingAgentSessionStore
Provides an abstract base class for agent session stores that delegate operations to an inner store instance while allowing for extensibility and customization.
DelegatingAgentSkillsSource
Provides an abstract base class for skill sources that delegate operations to an inner source while allowing for extensibility and customization.
DelegatingAIAgent
Abstract base class for AI agents that delegate operations to an inner agent while allowing extensibility via the decorator pattern.
DeliveryMapping
Maps one or more MessageEnvelopes to one or more executor targets.
DirectEdgeData
Edge data for a direct source-to-target connection.
DirectEdgeInfo
Serializable direct edge information.
DirectEdgeRunner
Routes a message across a direct edge.
DockerNetworkMode
Well-known values for the network parameter on DockerShellExecutor.
DockerShellExecutor
A ShellExecutor that runs commands inside a Docker container.
DockerShellExecutorOptions
Configuration options for DockerShellExecutor.
Edge
Represents a workflow edge.
EdgeConnection
Connects an edge to executable routing behavior.
EdgeData
Base data for a workflow edge.
EdgeId
Identifies a workflow edge.
EdgeIdConverter
Provides serialization and dictionary-key support for EdgeId values.
EdgeInfo
Serializable workflow edge information.
EdgeMap
Indexes workflow edges by their source executor identifiers.
EdgeRunner
Base class for all workflow edge runners.
EnvironmentSanitizer
Helpers for the cleanEnvironment mode where the spawned shell does not inherit the parent process environment — except for a small allowlist of variables that the shell needs to locate itself and basic tools.
EvalCheckResult
Result of a single check on a single evaluation item.
EvalChecks
Built-in check functions for common evaluation patterns.
EvalItem
Provider-agnostic data for a single evaluation item.
EvalItemResult
Per-item result from a Foundry evaluation run, with individual evaluator scores and error details.
EvalScoreResult
A single evaluator's score on one evaluation item.
EventNames
Event name constants used in workflow telemetry.
EventSink
Receives workflow events and dispatches them to registered listeners.
Executor<TInput, TOutput>
Base type for workflow executors.
ExecutorBinding
Binds an executor identity to a runtime executor instance factory.
ExecutorCompletedEvent
Event emitted when an executor completes.
ExecutorConfig
Configuration applied while creating or binding an executor.
ExecutorEvent
Base type for events associated with a workflow executor.
ExecutorFailedEvent
Event emitted when an executor fails.
ExecutorIdentity
Identifies an executor instance by an optional case-insensitive string id.
ExecutorIdentityConverter
Provides serialization and dictionary-key support for ExecutorIdentity values.
ExecutorInfo
Serializable executor registration information.
ExecutorInstanceBinding
Binds a workflow executor to an existing shared instance.
ExecutorInvokedEvent
Event emitted when an executor is invoked.
ExecutorOptions
Options that describe runtime behavior for an executor registration.
ExecutorPlaceholder
Placeholder binding used while a workflow is being assembled.
ExpectedToolCall
A tool call that an agent is expected to make.
ExternalRequest<TRequest, TResponse>
Represents a request that must be satisfied outside the workflow runtime.
ExternalRequestContext<TRequest, TResponse>
Tracks an outstanding external request and its eventual response.
ExternalRequestSink
Accepts external requests from executors and delivers their responses.
ExternalResponse<TResponse>
Represents a response to an ExternalRequest.
FanInEdgeData
Edge data for multiple source executors synchronized into one target.
FanInEdgeInfo
Serializable fan-in edge information.
FanInEdgeRunner
Waits for every fan-in source before routing an aggregate message.
FanInEdgeState
Accumulates messages from multiple fan-in sources, releasing all of them as a grouped batch once every source has contributed.
FanOutEdgeData
Edge data for a source executor connected to multiple targets.
FanOutEdgeInfo
Serializable fan-out edge information.
FanOutEdgeRunner
Routes one source message to every fan-out target.
FileAccessProvider
An AIContextProvider that provides file access tools to an agent for writing, reading, deleting, listing, searching, and editing files.
FileAccessProviderOptions
Options controlling the behavior of FileAccessProvider.
FileEditor
Helpers shared by the file access and file memory providers for the replace and replace_lines tools.
FileLineEdit
Represents a single whole-line replacement used by the file access and file memory replace_lines tools.
FileListEntry
Represents a file entry returned by the FileMemoryProvider list files tool, containing the file name and an optional description.
FileMemoryProvider
An AIContextProvider that provides file-based memory tools to an agent for storing, retrieving, modifying, listing, deleting, and searching files.
FileMemoryProviderOptions
Options controlling the behavior of FileMemoryProvider.
FileMemoryState
Represents the state of the FileMemoryProvider, stored in the session's AgentSessionStateBag.
FileSearchMatch
Represents a match found within a file during a search operation.
FileSearchResult
Represents a result from searching files, containing the file name, a content snippet, and matching lines.
FileStoreEntry
Represents a single direct child of a directory in an AgentFileStore, returned by AgentFileStore.listChildrenAsync.
FileSystemAgentFileStore
A file-system-backed implementation of AgentFileStore that stores files on disk under a configurable root directory.
FileSystemJsonCheckpointStore
File-system JSON checkpoint store.
FilteringAgentSkillsSource
A skill source decorator that filters skills using a caller-supplied predicate.
ForwardedOptions
State passed from this instance into the inner agent, circumventing the intermediate OpenTelemetryChatClient.
ForwardingChatClient
The stub ChatClient used to delegate from OpenTelemetryChatClient into the inner AIAgent.
FullSplitter
Splits a conversation at the first user message, returning everything from the start through that message as the query half.
FunctionEvaluator
Factory for creating EvalCheck delegates from typed lambda functions.
FunctionExecutor<TInput, TOutput>
Handles messages by invoking a user-provided Dart callback.
FunctionInvocationDelegatingAgent
Internal agent decorator that adds function invocation middleware logic.
FunctionStatefulExecutor<TState, TInput, TOutput>
Stateful executor backed by a single callback.
GeminiChatClient
A ChatClient implementation backed by the Gemini API.
GeminiClient
Minimal REST client for the Gemini API.
GeminiDefaults
Defaults used by the Gemini agent integration.
GeneratedEvaluatorRef
A reference to a generated rubric evaluator that already exists in the provider's registry.
GroupChatHost
Hosts a group chat workflow and selects participating agents with a manager.
GroupChatManager
A manager that manages the flow of a group chat.
GroupChatWorkflowBuilder
Provides a builder for specifying group chat relationships between agents.
HandlerRegistry
A registry that collects typed message handlers during ReflectingExecutor.configureHandlers.
HandoffAgentExecutor
Utilities for agent executors used by handoff workflows.
HandoffAgentExecutorOptions
Options used by handoff agent executors.
HandoffEndExecutor
Terminates a handoff workflow by emitting the accumulated conversation history from conversation.
HandoffMessagesFilter
Filters handoff function call messages from history before target handoff.
HandoffStartExecutor
Executor used at the start of a handoff workflow.
HandoffState
Represents routing state in a handoff workflow.
HandoffTarget
Describes a handoff to a specific target AIAgent.
HandoffWorkflowBuilder
Provides a builder for specifying handoff relationships between agents.
HarnessAgent
A pre-configured agent that wraps a ChatClient with function invocation, per-service-call chat history persistence, compaction, and the default harness context providers.
HarnessAgentOptions
Configuration options for a HarnessAgent.
HeadTailBuffer
Bounded accumulator that keeps the first half of the input and the most recent half (rolling tail), summing to cap UTF-8 bytes total.
HostedAgentBuilder
Represents a builder for configuring AI agents within a hosting environment.
HostedWorkflowBuilder
Represents a builder for configuring workflows within a hosting environment.
Identified
Identifies a workflow component by stable string identifier.
InMemoryAgentFileStore
An in-memory implementation of AgentFileStore that stores files in a dictionary.
InMemoryAgentSessionStore
In-memory implementation of AgentSessionStore for development and testing scenarios.
InMemoryChatHistoryProvider
In-memory implementation of ChatHistoryProvider with optional message reduction support.
InMemoryChatHistoryProviderOptions
Configuration options for InMemoryChatHistoryProvider.
InMemoryChatHistoryProviderState
The persisted state for InMemoryChatHistoryProvider.
InMemoryCheckpointManager
In-memory checkpoint manager.
InProcessExecutionEnvironment
Executes workflows in the current Dart isolate.
InProcessExecutionOptions
Configuration options for in-process workflow execution.
InProcessRunner
In-process implementation of SuperStepRunnable.
InProcessRunnerContext
Orchestrates in-process workflow execution: instantiates executors, routes messages through edges, manages state, and participates in superstep joins.
InProcExecutionEnvironment
In-process execution environment that uses InProcessRunner.
InProcStepTracer
StepTracer implementation for in-process workflow execution.
InputWaiter
Synchronises the workflow run loop with external input events.
InvokedContext
Context passed to AIContextProvider.invoked.
InvokingContext
Context passed to ChatHistoryProvider.invoking and AIContextProvider.invoking at the start of an agent invocation.
IsolationKeyScopedAgentSessionStore
A delegating agent session store that scopes session keys by an isolation key provided by a SessionIsolationKeyProvider, ensuring that sessions are isolated per logical partition (e.g., user, tenant, or composite key).
IsolationKeyScopedAgentSessionStoreOptions
Options for configuring an IsolationKeyScopedAgentSessionStore.
JsonCheckpointStore
In-memory JSON checkpoint store.
JsonConverter<T>
Mirrors C# System.Text.Json.Serialization.JsonConverter<T>.
JsonConverterBase<T>
Abstract base for JSON converters that serialize and deserialize a specific type T.
JsonConverterDictionarySupportBase<T>
Extends JsonConverterBase with support for using T values as JSON dictionary keys via stringify / parse, and provides escape / unescape helpers that double | characters to avoid collision with the |-based composite key format.
JsonElement
Mirrors C# System.Text.Json.JsonElement (a parsed JSON value). In Dart, JSON values are plain Dart objects from dart:convert.
JsonMarshaller
Serializes JSON-shaped checkpoint values deterministically.
JsonSerializer
Mirrors C# System.Text.Json.JsonSerializer.
JsonSerializerOptions
Stub types for C# System.Text.Json types. These are placeholders until a proper Dart serialization strategy is implemented. The intent is preserved from the original C# source. Mirrors C# System.Text.Json.JsonSerializerOptions.
JsonTypeInfo<T>
Mirrors C# System.Text.Json.Serialization.Metadata.JsonTypeInfo<T>.
JsonWireSerializedValue
Stores a JSON-shaped value together with optional type metadata, supporting lazy deserialization when the target type is determined later.
LastTurnSplitter
Splits a conversation at the last user message, returning everything from the start through that message as the query half.
LocalEvaluator
Evaluator that runs check functions locally without API calls.
LocalShellExecutor
A ShellExecutor that runs commands directly on the host machine.
LocalShellExecutorOptions
Configuration options for LocalShellExecutor.
LockstepRunEventStream
A RunEventStream that drives one superstep at a time.
LoggingAgent
A delegating AIAgent that logs agent operations to a Logger.
LoopAgent
A DelegatingAIAgent that re-invokes the wrapped agent in a loop until the configured LoopEvaluator set decides to stop.
LoopAgentOptions
Configuration options for a loop agent.
LoopContext
The per-run state that a LoopEvaluator uses to decide whether a loop agent should re-invoke the wrapped agent and what feedback to provide.
LoopEvaluation
The result produced by a LoopEvaluator after an agent iteration: whether the loop should re-invoke the wrapped agent and, optionally, the feedback or explicit messages that should inform the next iteration.
LoopEvaluator
The abstract base class for the component that decides, after each agent iteration, whether a loop agent should re-invoke the wrapped agent and what feedback to provide.
MagenticOrchestrator
Centralized, re-entrant Magentic orchestrator.
MagenticOrchestratorEvent
Base type for Magentic orchestration events.
MagenticPlanCreatedEvent
Signals creation of the initial plan.
MagenticPlanReviewRequest
Request for human review of a proposed Magentic plan.
MagenticPlanReviewResponse
Review feedback for a proposed Magentic plan.
MagenticProgressLedger
Maintains a ledger of progress made by a Magentic workflow.
MagenticProgressLedgerUpdatedEvent
Signals an update to the progress ledger during a coordination round.
MagenticReplannedEvent
Signals creation of a new plan in response to a stall.
MagenticWorkflowBuilder
Fluent builder for Magentic One multi-agent orchestration workflows.
McpClientAIFunction
An AIFunction backed by an MCP tool.
McpSkillIndex
DTO for skill://index.json.
McpSkillIndexEntry
A single skill discovery index entry.
McpTaskOptions
Options that control task-augmented MCP tool invocation.
MeaiEvaluatorAdapter
Adapter that wraps an MEAI Evaluator into an AgentEvaluator.
MessageAIContextProvider
Abstract base class for components that enhance AI context during agent invocations by supplying additional chat messages.
MessageAIContextProviderAgent
A delegating AI agent that enriches input messages by invoking a pipeline of MessageAIContextProvider instances before delegating to the inner agent, and notifies those providers after the inner agent completes.
MessageDelivery
Represents a queued message delivery.
MessageEnvelope
Wraps a workflow message with routing metadata.
MessageHandlerInfo
Associates a messageType with a type-erased handler callback.
MessageInjectingChatClient
A delegating chat client that supports injecting messages into the function execution loop.
MessageInvokingContext
Context passed to MessageAIContextProvider.invoking.
MessageMerger
Merges streams of AgentResponseUpdates grouped by response and message identifiers into coherent AgentResponse objects.
MessageRouter
Routes executor outputs across workflow edges.
MiddlewareEnabledFunction
Wraps an AIFunction to inject middleware logic on invocation.
MultiPartyConversation
Stores the shared conversation history for a multi-party workflow.
NonApprovalRequiredFunctionBypassingChatClient
A delegating chat client that automatically removes ToolApprovalRequestContent for tools that do not actually require approval, storing auto-approved results in the session for transparent re-injection on the next request.
NonThrowingChannelReaderAsyncEnumerable<T>
Wraps a Stream and absorbs OperationCanceledExceptions so iteration completes normally when cancelled rather than propagating the exception.
NoopAgentSessionStore
An AgentSessionStore that does not persist sessions.
NullRedactor
A Redactor that returns the original value unchanged.
OpenTelemetryAgent
Provides a delegating AIAgent implementation that instruments agent operations via OpenTelemetryChatClient.
OpenTelemetryAgentTags
OpenTelemetry attribute name constants for the agent identity dimension.
OpenTelemetryConsts
Provides constants used by the agent telemetry services.
OpenTelemetryGenAI
OpenTelemetry attribute name constants for generative-AI operations.
OpenTelemetryOperation
OpenTelemetry attribute name constants for the operation dimension.
OpenTelemetryProvider
OpenTelemetry attribute name constants for the AI provider dimension.
OrchestrationBuilderBase<TBuilder extends OrchestrationBuilderBase<TBuilder>>
Common fluent surface shared by every orchestration-style workflow builder: human-readable name + description, and the withOutputFrom / withIntermediateOutputFrom output-designation pair with memoized defaults-suppression semantics.
OutputFilter
Decides whether an executor is authorised to emit workflow output.
OutputMessagesExecutor
Batches received chat messages and publishes them as the final result.
OutputTag
Identifies the kind of output that a WorkflowOutputEvent represents.
OutputTagJsonConverter
Provides JSON encode/decode helpers for OutputTag that map a tag to and from its string OutputTag.value.
PerEvaluatorResult
Per-evaluator pass/fail breakdown from an evaluation run.
PerServiceCallChatHistoryPersistingChatClient
A delegating chat client that persists chat history and updates session state after each individual service call within the function-invoking loop.
PipelineCompactionStrategy
A compaction strategy that executes a sequential pipeline of CompactionStrategy instances against the same CompactionMessageIndex.
PortableMessageEnvelope
Serializable form of a workflow message envelope.
PortableValue
Wraps an arbitrary value alongside its TypeId, supporting optional lazy deserialization via DelayedDeserialization.
PortableValueConverter
Provides JSON serialization for PortableValue with support for lazy deserialization of the inner value.
PortBinding
Base class for bindings associated with named ports.
PortHandlerExecutor<TRequest, TResponse>
A workflow executor that responds to external requests arriving on port.
ProgressLedgerSlot
A single question slot in a MagenticProgressLedger.
ProtocolBuilder
Builder used by executors to describe their accepted and produced messages.
ProtocolDescriptor
Describes the message protocol supported by an executor or workflow.
ProviderSessionState<TState>
Provides strongly-typed state management for providers, enabling reading and writing of provider-specific state to/from an AgentSession's AgentSessionStateBag.
Redactor
Redacts sensitive values before they are written to diagnostic logs.
ReflectingExecutor
Base executor class that dispatches inbound messages to typed handlers.
ReplacingRedactor
A Redactor that replaces every value with a fixed replacement string.
RequestHaltEvent
Event emitted when a workflow requests that the run halt.
RequestInfoEvent
Event triggered when a workflow executor requests external information.
RequestInfoExecutor<TRequest extends Object, TResponse extends Object>
Executor that routes typed requests to an ExternalRequestSink and returns the external response.
RequestPort<TRequest, TResponse>
Describes an external request/response port available to an executor.
RequestPortBinding<TRequest, TResponse>
Binds a request port to a Dart callback.
RequestPortDescriptor
Non-generic description for a RequestPort.
RequestPortInfo
Serializable request port description.
ResettableExecutor
Implemented by executors that can be reset between workflow runs.
ResolvedShell
A resolved shell binary together with its argv-building methods.
ResponseEdgeRunner
Routes an external response envelope back to the executor that issued the corresponding request.
RoundRobinGroupChatManager
Provides a GroupChatManager that selects agents in round-robin order.
RouteBuilder
Fluent route builder rooted at a workflow executor.
RubricScore
A single dimension's score from a rubric-based evaluator run.
Run
Represents a workflow run that tracks status and emitted events.
RunEventStream
Abstract base for WorkflowEvent event streams.
RunnerContext
Shared context for an in-process workflow runner.
RunnerStateData
Mutable state carried by an in-process workflow runner.
ScopeId
A unique identifier for a scope within an executor.
ScopeKey
A unique key within a specific scope, combining a ScopeId and a key string.
ScopeKeyConverter
Provides serialization and dictionary-key support for ScopeKey values.
SequentialWorkflowBuilder
Fluent builder for sequential agent workflows: a pipeline where the output of one agent is the input to the next, terminating in an aggregator that yields the accumulated ChatMessages as the workflow output.
SessionCheckpointCache
Tracks checkpoints by workflow session.
SessionIsolationKeyProvider
Provides an abstract base class for resolving session isolation keys used to scope agent sessions.
ShellEnvironmentProvider
An AIContextProvider that probes the shell environment and injects instructions describing the OS, shell version, and available tools.
ShellEnvironmentProviderOptions
Configuration options for ShellEnvironmentProvider.
ShellEnvironmentSnapshot
A point-in-time snapshot of the shell environment the agent is using.
ShellExecutor
Pluggable backend that runs shell commands on behalf of a tool.
ShellOutputChunk
A live line of output produced while a shell command is running.
ShellPolicy
Evaluates shell commands against configurable allow/deny regex patterns.
ShellPolicyOutcome
The result of a ShellPolicy evaluation.
ShellRequest
A shell command awaiting a policy decision.
ShellResolver
Resolves which shell binary to use and provides argv builders for both stateless and persistent invocation modes.
ShellResult
The outcome of a single shell command invocation.
ShellSession
Manages a persistent shell subprocess using a sentinel protocol to bracket each command's stdout and capture its exit code.
SlidingWindowCompactionStrategy
A compaction strategy that removes the oldest user turns and their associated response groups to bound conversation length.
StatefulExecutor<TState, TInput, TOutput>
Base class for executors that maintain state across message handling.
StatefulExecutorOptions<TState>
Options for stateful executors.
StateManager
Manages workflow execution state using a two-phase write pattern.
StateScope
Stores key/value state for a single scope, keyed by ScopeId.
StateUpdate
An immutable record of a single state change — either an upsert or a deletion.
StepContext
Workflow context for a single executor invocation.
StepTracer
Emits traces for key step lifecycle events within a workflow execution.
StorePathGlobMatcher
Minimal case-insensitive glob matcher for file names.
StorePaths
Internal helper for normalizing and validating relative store paths and matching glob patterns. Shared across AgentFileStore implementations.
StreamingAggregators
Provides streaming aggregation functions for processing input sequences in a stateful, incremental manner.
StreamingRun
A workflow run instance supporting streaming workflow events.
StreamingRunEventStream
A RunEventStream backed by a broadcast StreamController.
StringProgressLedgerSlot
A string-valued ProgressLedgerSlot.
SubworkflowBinding
Binds a sub-Workflow as a WorkflowHostExecutor inside a parent workflow.
SubworkflowErrorEvent
Event emitted when a subworkflow encounters an error.
SubworkflowWarningEvent
Event emitted when a subworkflow encounters a warning condition.
SummarizationCompactionStrategy
A compaction strategy that uses an LLM to summarize older portions of the conversation.
SuperStepCompletedEvent
Event triggered when a SuperStep completes.
SuperStepCompletionInfo
Debug information about the SuperStep that finished running.
SuperStepEvent
Base class for SuperStep-scoped events.
SuperStepJoinContext
Context that a sub-workflow runner uses to communicate with its parent.
SuperStepRunnable
Minimal interface for a runner that participates in a superstep.
SuperStepRunner
Executes queued workflow messages in SuperStep order.
SuperStepStartedEvent
Event triggered when a SuperStep starts.
SuperStepStartInfo
Debug information about the SuperStep starting to run.
SwitchBuilder
Fluent builder for routing one source executor to multiple targets.
Tags
Telemetry tag key constants for workflow observability.
TaskAwareMcpClientAIFunction
An MCP tool function that must be invoked through task augmentation.
TextSearchProvider
A text search context provider that performs a search over external knowledge and injects formatted results into the AI invocation context, or exposes a search tool for on-demand use.
TextSearchProviderOptions
Options controlling the behavior of TextSearchProvider.
TextSearchProviderState
Represents the per-session state of a TextSearchProvider.
TextSearchResult
Represents a single retrieved text search result.
TodoCompleteInput
Input for completing a single todo item via TodoProvider.
TodoCompletionLoopEvaluator
A LoopEvaluator that keeps re-invoking the wrapped agent until a TodoProvider has no remaining (incomplete) todo items, optionally only while the agent is operating in one of a configured set of modes tracked by an AgentModeProvider.
TodoCompletionLoopEvaluatorOptions
Configuration options for a todo-completion loop evaluator.
TodoItem
Represents a single todo item managed by the TodoProvider.
TodoItemInput
Represents the input for creating a new todo item via the TodoProvider.
TodoProvider
An AIContextProvider that provides todo management tools and instructions to an agent for tracking work items during long-running complex tasks.
TodoProviderOptions
Options controlling the behavior of TodoProvider.
TodoState
Represents the state of the todo list managed by the TodoProvider, stored in the session's AgentSessionStateBag.
Tokenizer
Provides token counting for compaction metrics.
ToolApprovalAgent
Middleware that handles standing tool-approval rules and queues approval requests so callers see at most one unresolved request at a time.
ToolApprovalAgentOptions
Options for configuring the ToolApprovalAgent middleware.
ToolApprovalRule
Represents a standing approval rule for automatically approving tool calls without requiring explicit user approval each time.
ToolApprovalState
Represents the persisted state of standing tool approval rules, stored in the session's AgentSessionStateBag.
ToolResultCompactionStrategy
A compaction strategy that collapses old tool call groups into single concise assistant messages.
TruncationCompactionStrategy
A compaction strategy that removes the oldest non-system message groups, keeping at least minimumPreservedGroups most-recent groups intact.
TurnToken
Sent to an AIAgent-based executor to request a response to accumulated chat messages.
TypeId
Identifies a serialized Dart type in checkpoint wire data.
UpdateKey
Identifies an update within a specific scope.
Utf8JsonReader
Mirrors C# System.Text.Json.Utf8JsonReader.
Utf8JsonWriter
Mirrors C# System.Text.Json.Utf8JsonWriter.
ValueTaskTypeErasure
Converts a typed MessageHandlerCallback<T> to a type-erased handler.
WireMarshaller
Converts values to and from checkpoint wire values.
Workflow
A class that represents a workflow that can be executed.
WorkflowBuilder
Builder for creating a Workflow from executor bindings and edges.
WorkflowCatalog
Provides a catalog of registered workflows within the hosting environment.
WorkflowChatHistoryProvider
A ChatHistoryProvider that persists chat messages in the agent session state bag and supports bookmark-based incremental retrieval.
WorkflowContext
Context supplied to an executor while handling a workflow message.
WorkflowErrorEvent
Event emitted for a workflow error.
WorkflowEvent
Base type for workflow events.
WorkflowExecutionEnvironment
Defines an execution environment for running and streaming workflows.
WorkflowHostAgent
Hosts a Workflow behind the AIAgent abstraction.
WorkflowHostAgentSession
Agent session used by WorkflowHostAgent.
WorkflowHostExecutor
Hosts a sub-Workflow as an executor inside a parent workflow.
WorkflowInfo
Serializable workflow definition information.
WorkflowInfoOutputExecutorsConverter
JSON converter for WorkflowInfo.outputExecutors that supports both the new map shape ({ "id": ["intermediate"] }) and the legacy array shape (["id1", "id2"]). Legacy-shaped payloads are read as if every id had been registered as a regular (untagged) output source; output is always written in the new map shape.
WorkflowOutputEvent
Event emitted when a workflow yields output.
WorkflowSession
Represents a workflow session.
WorkflowsJsonUtilities
JSON serialization helpers for workflow checkpoints.
WorkflowStartedEvent
Event emitted when a workflow starts.
WorkflowStateContext
Workflow context extended with state read/write support and sub-workflow attachment for in-process execution.
WorkflowTelemetryContext
No-op telemetry context.
WorkflowTelemetryOptions
Configuration options for workflow telemetry.
WorkflowVisualizer
Generates visual representations of a Workflow.
WorkflowWarningEvent
Event emitted for a non-fatal workflow warning.

Enums

ActivityKind
Mirrors System.Diagnostics.ActivityKind.
ActivityStatusCode
Mirrors System.Diagnostics.ActivityStatusCode.
BackgroundTaskStatus
Represents the status of a background task managed by the BackgroundAgentsProvider.
ChatReducerTriggerEvent
Defines when a ChatReducer is triggered in InMemoryChatHistoryProvider.
CompactionGroupKind
Identifies the kind of a CompactionMessageGroup.
EdgeRunnerDeliveryStatus
Describes the outcome of a message delivery attempt through an edge runner.
ExecutionMode
Controls how workflow events are streamed during execution.
HandoffToolCallFilteringBehavior
Specifies how tool calls are filtered from handoff workflow history.
RunStatus
Specifies the current operational state of a workflow run.
SearchBehavior
Behavior choices for the provider.
ShellFamily
Identifies the shell family the agent is talking to.
ShellMode
Specifies how a shell executor dispatches commands to the underlying shell.
ShellOutputChannel
Identifies the process stream that produced a ShellOutputChunk.
TextSearchBehavior
Behavior choices for the provider.
ToolCalledMode
Specifies how a tool-name list matches called tools.

Extensions

A2AAgentCardExtensions on A2AAgentCard
Extension methods for A2AAgentCard that create AIAgent instances.
A2AClientExtensions on A2AClient
Extension methods for A2AClient that create A2AAgent instances.
A2AMetadataToAdditionalPropertiesExtension on A2ASV
Converts A2A metadata to an agent additional-properties dictionary.
A2AServerHostedAgentBuilderExtensions on HostedAgentBuilder
Registers an A2A server bridge for an agent configured through a HostedAgentBuilder.
A2AServerServiceCollectionExtensions on ServiceCollection
Registers A2A server bridges (an A2AAgentExecutor per agent) in a ServiceCollection.
AdditionalPropertiesExtensions on AdditionalPropertiesDictionary
Extension methods for AdditionalPropertiesDictionary that use the runtime type name of T as the dictionary key.
AdditionalPropertiesToA2AMetadataExtension on AdditionalPropertiesDictionary
Converts an agent additional-properties dictionary to A2A metadata.
AgentEvaluationExtensions on AIAgent
Extension methods for evaluating agents and responses.
AgentHostingServiceCollectionExtensions on ServiceCollection
Provides extension methods for configuring AI agents in a service collection.
AgentResponseExtensions on AgentResponse
Extension methods for AgentResponse and AgentResponseUpdate.
AgentResponseToPartsExtension on AgentResponse
Converts an AgentResponse to A2A A2APart objects.
AgentResponseUpdateExtensions on AgentResponseUpdate
Extension methods for AgentResponseUpdate.
AgentResponseUpdateIterableExtensions on Iterable<AgentResponseUpdate>
Extension methods for iterables of AgentResponseUpdate.
AgentResponseUpdateStreamExtensions on Stream<AgentResponseUpdate>
Extension methods for streams of AgentResponseUpdate.
AgentResponseUpdateToPartsExtension on AgentResponseUpdate
Converts an AgentResponseUpdate to A2A A2APart objects.
AgentSessionExtensions on AgentSession
Extension methods for AgentSession.
AgentSkillsProviderBuilderMcpExtensions on AgentSkillsProviderBuilder
MCP-specific extensions for AgentSkillsProviderBuilder.
AIAgentExtensions on AIAgent
Provides extensions for AIAgent.
AIAgentStructuredOutputExtensions on AIAgent
Extension methods on AIAgent for structured (typed) output.
AIContextProviderChatClientBuilderExtensions on ChatClientBuilder
Provides extension methods for adding AIContextProvider support to ChatClientBuilder instances.
AIWorkflowAbstractionsExtensions on Workflow
Extensions for exposing workflows through the AI agent abstractions.
AnthropicClientAgentExtensions on AnthropicClient
Extension methods for creating chat clients and agents from Anthropic clients.
AsyncRunHandleExtensions on AsyncRunHandle<TOutput>
Convenience extensions on AsyncRunHandle.
ChatClientAgentRunOptionsExtension on ChatClientAgent
Convenience extension methods on ChatClientAgent for typed run options.
ChatClientBuilderAgentExtensions on ChatClientBuilder
Provides extension methods for building ChatClientAgent instances from ChatClientBuilder pipelines.
ChatClientExtensions on ChatClient
Provides extension methods for creating ChatClientAgent instances from ChatClient pipelines.
ChatClientHarnessExtensions on ChatClient
Provides extension methods for creating a HarnessAgent from a ChatClient.
ChatMessageContentEquality on ChatMessage?
Content-based equality comparison for ChatMessage instances.
ChatMessageExtensions on ChatMessage
Extension methods for ChatMessage related to agent request message source attribution.
ChatMessageListTextExtensions on List<ChatMessage>
Concatenates ChatMessage.text values across a list of messages.
ChatMessagesToPartsExtension on Iterable<ChatMessage>
Converts a collection of ChatMessage objects to A2A A2APart objects.
ChatStrategyExtensions on CompactionStrategy
Provides extension methods for CompactionStrategy.
CheckpointInfoKey on CheckpointInfo
Converts CheckpointInfo instances to string keys for use in maps.
ConfigurationExtensions on Configured<TSubject>
Extension methods for upcasting Configured values.
ConfiguredExtensions on T
Configuration helpers.
EdgeRepresentation on Edge
Converts Edge instances to their checkpoint representation.
EdgeRunnerDeliveryStatusExtension on EdgeRunnerDeliveryStatus
String-value helpers for EdgeRunnerDeliveryStatus.
ExecutorBindingExtensions on ExecutorBinding
Convenience methods for executor bindings.
ExecutorBindingRepresentation on ExecutorBinding
Converts ExecutorBinding instances to their checkpoint representation.
ExecutorInstanceBindingExtensions on Executor
Convenience methods for executor instances.
ExternalRequestExtensions on ExternalRequest<TRequest, TResponse>
Extension methods for ExternalRequest.
FunctionInvocationDelegatingAgentBuilderExtensions on AIAgentBuilder
Provides extension methods for configuring and customizing AIAgentBuilder instances.
GeminiClientAgentExtensions on GeminiClient
Extension methods for creating chat clients and agents from Gemini clients.
HostApplicationBuilderAgentExtensions on HostApplicationBuilder
Provides extension methods for configuring AI agents in a host application builder.
HostApplicationBuilderWorkflowExtensions on HostApplicationBuilder
Provides extension methods for configuring AI workflows in a host application builder.
HostedAgentBuilderExtensions on HostedAgentBuilder
Provides extension methods for configuring HostedAgentBuilder.
HostedWorkflowBuilderExtensions on HostedWorkflowBuilder
Provides extension methods for HostedWorkflowBuilder to enable additional workflow configuration scenarios.
LoggingAgentBuilderExtensions on AIAgentBuilder
Provides extension methods for adding logging support to AIAgentBuilder instances.
MapTryExtensions on Map<K, V>
Extension methods to port .NET ConcurrentDictionary / Dictionary patterns to Dart's Map API.
McpClientTaskExtensions on McpClient
Extensions for exposing MCP tools as extensions AI functions.
OpenAIAgentResponseExtensions on AgentResponse
OpenAI conversion helpers for AgentResponse.
OpenAIAgentResponseUpdateStreamExtensions on Stream<AgentResponseUpdate>
OpenAI conversion helpers for Streams of AgentResponseUpdate.
OpenAIChatClientAgentExtensions on OpenAIChatClient
Convenience methods for creating ChatClientAgent instances backed by OpenAIChatClient.
OpenTelemetryAgentBuilderExtensions on AIAgentBuilder
Provides extension methods for adding OpenTelemetry instrumentation to AIAgentBuilder instances.
OpenTelemetryWorkflowExecutionEnvironmentExtensions on WorkflowExecutionEnvironment
Adds OpenTelemetry instrumentation to a WorkflowExecutionEnvironment.
ReflectionExtensions on WorkflowBuilder
WorkflowBuilder extensions for ReflectingExecutor.
RequestPortDescriptorRepresentation on RequestPortDescriptor
Converts RequestPortDescriptor instances to their checkpoint representation.
RequestPortExtensions on RequestPort<TRequest, TResponse>
Extension helpers for matching ExternalResponse to a RequestPort.
RouteBuilderExtensions on WorkflowBuilder
WorkflowBuilder edge-routing extensions for ReflectingExecutor.
ToolApprovalAgentBuilderExtensions on AIAgentBuilder
Provides extension methods for adding tool approval middleware to AIAgentBuilder instances.
ToolApprovalRequestContentExtensions on ToolApprovalRequestContent?
Provides extension methods on ToolApprovalRequestContent for creating AlwaysApproveToolApprovalResponseContent instances that instruct the ToolApprovalAgent middleware to record standing approval rules.
WorkflowBuilderExtensions on WorkflowBuilder
C#-style workflow builder convenience methods.
WorkflowContextExtensions on WorkflowContext
Extension methods for working with WorkflowContext instances.
WorkflowEvaluationExtensions on WorkflowExecutionEnvironment
Evaluation helpers for WorkflowExecutionEnvironment.
WorkflowHostingExtensions on Workflow
Extension methods for hosting a Workflow as an AIAgent.
WorkflowOutputEventExtensions on WorkflowOutputEvent
Extension helpers for inspecting WorkflowOutputEvent tag membership.
WorkflowRepresentation on Workflow
Converts Workflow instances to their checkpoint representation.
WorkflowSpanExtensions on Span
Extension methods on Span for workflow-specific attribute and status helpers.
WorkflowTracerExtensions on Tracer
Extension methods on Tracer for creating workflow-specific spans.

Constants

inProcessExecution → const InProcessExecutionEnvironment
Default in-process workflow execution environment.
inProcExecution → const InProcExecutionEnvironment
Default InProcExecutionEnvironment instance.
localHistoryConversationId → const String
A sentinel conversation ID used to signal to FunctionInvokingChatClient that the conversation is service-managed (for internal bookkeeping only — never sent to the underlying service).

Functions

activityEvent(String name, {Map<String, Object?> tags = const {}}) ActivityEvent
Factory function to create an ActivityEvent (mirrors C# constructor call pattern new ActivityEvent(name, ...)).
checkpointStringList(Object? value) List<String>
Converts a JSON list into a string list.
replacingRedactor(String replacement) Redactor

Typedefs

Action = void Function()
A zero-argument void callback.
Action1<T> = void Function(T)
A single-argument void callback.
Action2<T1, T2> = void Function(T1, T2)
A two-argument void callback.
Action3<T1, T2, T3> = void Function(T1, T2, T3)
A three-argument void callback.
Action4<T1, T2, T3, T4> = void Function(T1, T2, T3, T4)
A four-argument void callback.
AgentFileSkillScriptRunner = Future<Object?> Function(AgentFileSkill skill, AgentFileSkillScript script, JsonElement? arguments, ServiceProvider? serviceProvider, {CancellationToken? cancellationToken})
Function for running file-based skill scripts.
CatchAllFn = Future<CallResult?> Function(Object message, WorkflowContext context, CancellationToken cancellationToken)
A catch-all handler for messages whose exact type has no registered handler.
ChatHistoryMemoryProviderState = State
Public alias for State, which the package barrel hides because its name collides with Flutter's widget State.
CompactionTrigger = bool Function(CompactionMessageIndex index)
Defines a condition based on CompactionMessageIndex metrics.
ConfigureA2AServerOptions = void Function(A2AServerRegistrationOptions options)
A callback that configures A2AServerRegistrationOptions.
EvalCheck = EvalCheckResult Function(EvalItem item)
Function for a synchronous evaluation check on a single item.
Func<TIn, TOut> = TOut Function(TIn)
Generic function type aliases ported from C# delegate conventions.
Func2<T1, T2, TOut> = TOut Function(T1, T2)
A function that takes two arguments and returns TOut.
Func3<T1, T2, T3, TOut> = TOut Function(T1, T2, T3)
A function that takes three arguments and returns TOut.
Func4<T1, T2, T3, T4, TOut> = TOut Function(T1, T2, T3, T4)
A function that takes four arguments and returns TOut.
FunctionInvocationDelegateFunc = Func4<AIAgent, FunctionInvocationContext, Func2<FunctionInvocationContext, CancellationToken, Future<Object?>>, CancellationToken, Future<Object?>>
Delegate type used to intercept and customise AI function invocations.
LoopEvaluateCallback = Future<LoopEvaluation> Function(LoopContext context, {CancellationToken? cancellationToken})
A callback that decides whether to re-invoke the agent and what feedback to provide, given the full LoopContext.
MessageHandlerCallback<T> = Future<Object?> Function(T message, WorkflowContext context, CancellationToken? cancellationToken)
A callback that handles a single message of type T.
MessageHandlerFn = Future<CallResult?> Function(Object message, WorkflowContext context, CancellationToken cancellationToken)
A function that handles a typed message and returns a CallResult.
RunAgentDelegate = Future<AgentResponse> Function(Iterable<ChatMessage> messages, AgentSession? session, AgentRunOptions? options, AIAgent innerAgent, CancellationToken? cancellationToken)
Function type for a custom non-streaming agent run delegate.
RunInBackgroundCallback = Future<bool> Function(A2ARunDecisionContext context, CancellationToken? cancellationToken)
A delegate that decides whether an agent run should be wrapped in a background A2A task.
RunStreamingAgentDelegate = Stream<AgentResponseUpdate> Function(Iterable<ChatMessage> messages, AgentSession? session, AgentRunOptions? options, AIAgent innerAgent, CancellationToken? cancellationToken)
Function type for a custom streaming agent run delegate.
SessionCreatedCallback = Future<void> Function(AgentSession session, CancellationToken? cancellationToken)
A callback invoked whenever the loop agent creates a new session, so the caller can capture the latest session.
SharedAgentRunDelegate = Future<AgentResponse> Function(Iterable<ChatMessage> messages, AgentSession? session, AgentRunOptions? options, Future<AgentResponse> innerInvoker(Iterable<ChatMessage>, AgentSession?, AgentRunOptions?, CancellationToken?), CancellationToken? cancellationToken)
Function type for a shared delegate that handles both run and streaming.
ShellOutputCallback = void Function(ShellOutputChunk chunk)
Receives live shell output as a command executes.
TextSearchAsync = Future<Iterable<TextSearchResult>> Function(String input, CancellationToken cancellationToken)
Async delegate that performs a text search and returns an iterable of TextSearchResult instances.
ToolCallFormatter = String Function(CompactionMessageGroup group)
Formats a CompactionMessageGroup representing a tool-call exchange into a concise summary string.

Exceptions / Errors

ShellCommandRejectedException
Thrown by a ShellExecutor when a ShellPolicy denies a command.