TemporalCommunity.Extensions.Agents 0.10.4

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package TemporalCommunity.Extensions.Agents --version 0.10.4
                    
NuGet\Install-Package TemporalCommunity.Extensions.Agents -Version 0.10.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TemporalCommunity.Extensions.Agents" Version="0.10.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TemporalCommunity.Extensions.Agents" Version="0.10.4" />
                    
Directory.Packages.props
<PackageReference Include="TemporalCommunity.Extensions.Agents" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TemporalCommunity.Extensions.Agents --version 0.10.4
                    
#r "nuget: TemporalCommunity.Extensions.Agents, 0.10.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TemporalCommunity.Extensions.Agents@0.10.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TemporalCommunity.Extensions.Agents&version=0.10.4
                    
Install as a Cake Addin
#tool nuget:?package=TemporalCommunity.Extensions.Agents&version=0.10.4
                    
Install as a Cake Tool

TemporalAgents

Temporal .NET SDK integrations for building durable AI applications. Two packages, two levels of abstraction:

Package Description
TemporalCommunity.Extensions.AI Make any IChatClient durable — no Agent Framework required
TemporalCommunity.Extensions.Agents Durable agent sessions built on Microsoft Agent Framework

Both packages make their supported session and activity boundaries durable. Conversation history and LLM calls are persisted in Temporal history; registered durable tool invocations are separate activities and replay safely after crashes or restarts.

Overview

TemporalCommunity.Extensions.AI

A lightweight integration for Microsoft.Extensions.AI (MEAI). It provides direct IChatClient middleware for custom workflows and DurableChatSessionClient for managed multi-turn sessions. Managed sessions own their model/tool loop and use AddDurableTools for durable function dispatch. No Agent Framework dependency is required.

Start here if: you are already using MEAI's IChatClient directly and want Temporal durability without adopting the full Agent Framework.

dotnet add package TemporalCommunity.Extensions.AI

Full documentation →

TemporalCommunity.Extensions.Agents

A Temporal integration for Microsoft Agent Framework (Microsoft.Agents.AI). Each AIAgent session maps to a long-lived Temporal workflow with full session management: history, StateBag persistence, HITL approval gates, LLM-powered routing, and parallel agent fan-out.

Start here if: you are building with the Microsoft Agent Framework and want durable, stateful, multi-agent sessions.

dotnet add package TemporalCommunity.Extensions.Agents

Full documentation →

For help choosing between the two packages, see the Library Combinations Guide. For the shared approval lifecycle, retry outcomes, and MAF-only scope boundary, see Durable approvals.

How It Works

Both packages share the same core pattern: LLM calls run inside Temporal activities (never directly in workflows), and conversation turns are delivered via Temporal Updates — a durable, acknowledged request/response primitive that eliminates polling.

External Caller
    │
    │  WorkflowUpdate (chat turn / agent message)
    ▼
Temporal Workflow  ←── persists history, serializes turns, handles ContinueAsNew
    │
    │  ExecuteActivityAsync
    ▼
Activity  ←── calls real IChatClient / AIAgent — retried automatically on failure

Prerequisites

  • .NET 10 SDK or later to build the repository and run samples
  • Temporal Service 1.31.0 or newer (local development: temporal server start-dev)
  • An LLM provider (e.g., Azure OpenAI, OpenAI, Ollama)

The repository is tested against Microsoft.Extensions.AI 10.8.3 and Microsoft.Agents.AI 1.17.0 and pins embedded tests to Temporal Server 1.31.2. Package consumers should use those library versions or compatible newer releases and Temporal Service 1.31.0 or newer.

The published libraries ship net10.0 and netstandard2.1 assets. netstandard2.1 supports .NET Core 3.1+ and modern .NET; .NET Framework is out of scope. See each package README for down-level limitations.

Samples

TemporalCommunity.Extensions.AI

Sample Package Description
DurableChat Extensions.AI Multi-turn durable chat with DurableChatSessionClient and tool functions
DurableTools Extensions.AI Per-tool activity dispatch with AsDurable() and AddDurableTools
OpenTelemetry Extensions.AI OTel tracing — span hierarchy, ActivitySource names, and token attributes
HumanInTheLoop Extensions.AI Workflow-owned approval gates with RequireApproval() and retry-safe ResolveApprovalAsync
DurableEmbeddings Extensions.AI IEmbeddingGenerator wrapped for durable per-chunk activity dispatch
ToolInterceptor Extensions.AI Intercept, pause, skip, or block tool calls
CustomWorkflow Extensions.AI Extend the durable chat workflow with a domain-typed result

TemporalCommunity.Extensions.Agents

Sample Package Description
BasicAgent Extensions.Agents External caller pattern — send messages to an agent from a console app
SplitWorkerClient Extensions.Agents Worker and client in separate processes
WorkflowOrchestration Extensions.Agents Sub-agent orchestration inside a Temporal workflow
EvaluatorOptimizer Extensions.Agents Generator + evaluator loop pattern
MultiAgentRouting Extensions.Agents LLM-powered routing, parallel execution, and OpenTelemetry
HumanInTheLoop Extensions.Agents HITL approval gates via [WorkflowUpdate]
WorkflowRouting Extensions.Agents Static and dynamic durable routing patterns
AmbientAgent Extensions.Agents Signal-driven ambient monitoring agent
ConfigurableAgent Extensions.Agents Per-agent settings and read-only tools
PerToolActivities Extensions.Agents Per-tool activity options and no-retry write tools
ContextProviders Extensions.Agents Custom AIContextProvider implementations
DurableContextProvider Extensions.Agents Context-provided tools dispatched durably
MixedActivities Extensions.Agents Regular and AI activities in one workflow
ApprovalScopes Extensions.Agents Scope-aware approvals persisted across turns
ToolInterceptor Extensions.Agents Pre-tool policy decisions and approval pauses
WorkingSet Extensions.Agents Working-set file context for coding agents
Skills Extensions.Agents Progressive-disclosure skill catalog and durable loading

Sample credentials

API keys are managed with dotnet user-secrets — stored outside the repo in ~/.microsoft/usersecrets/ and loaded automatically by Host.CreateApplicationBuilder() in the Development environment.

Set OPENAI_API_KEY for each sample project you want to run:

dotnet user-secrets set "OPENAI_API_KEY" "sk-..." --project samples/MEAI/DurableChat

Non-sensitive settings (OPENAI_API_BASE_URL, OPENAI_MODEL, TEMPORAL_ADDRESS) have working defaults in each sample's committed appsettings.json where applicable, or directly in its code. They do not need user-secrets unless you want to override them.

Alternatively, set OPENAI_API_KEY as an environment variable — the samples pick it up automatically via IConfiguration.

# Start Temporal (separate terminal)
temporal server start-dev --namespace default \
  --search-attribute AgentName=Keyword \
  --search-attribute SessionCreatedAt=Datetime \
  --search-attribute TurnCount=Int

# Run a sample
dotnet run --project samples/MEAI/DurableChat
dotnet run --project samples/MAF/BasicAgent

Building

just build        # Restore + Release build
just test-unit    # Unit tests (no server required)
just test         # Unit + integration tests (starts embedded Temporal test servers)
just pack         # Build NuGet packages → artifacts/packages/
just ci           # Full pipeline: clean → build → test-unit → pack

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.12.1 71 8/11/2026
0.12.0 86 8/10/2026
0.10.4 80 8/9/2026
0.10.3-preview.11 98 7/15/2026
0.8.1-preview.21 53 7/8/2026
0.8.1-preview.18 57 7/8/2026
0.8.1-preview.11 59 7/8/2026
0.8.0 129 7/8/2026