TemporalCommunity.Extensions.Agents 0.8.0

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.8.0
                    
NuGet\Install-Package TemporalCommunity.Extensions.Agents -Version 0.8.0
                    
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.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TemporalCommunity.Extensions.Agents" Version="0.8.0" />
                    
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.8.0
                    
#r "nuget: TemporalCommunity.Extensions.Agents, 0.8.0"
                    
#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.8.0
                    
#: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.8.0
                    
Install as a Cake Addin
#tool nuget:?package=TemporalCommunity.Extensions.Agents&version=0.8.0
                    
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 give AI workloads durability by default — conversation history, LLM calls, and tool invocations are persisted in Temporal's event history and replayed deterministically after crashes or restarts.

Overview

TemporalCommunity.Extensions.AI

A lightweight middleware layer for Microsoft.Extensions.AI (MEAI). Wraps any IChatClient with Temporal durability via a DelegatingChatClient middleware. No agent framework, no heavy abstractions — just MEAI pipelines made crash-resilient.

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 →

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

Samples

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 HITL approval gates via RequestApprovalAsync and SubmitApprovalAsync
DurableEmbeddings Extensions.AI IEmbeddingGenerator wrapped for durable per-chunk activity dispatch
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]

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 project's committed appsettings.json and do not need to be set via 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

# 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 (requires temporal server start-dev)
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 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. 
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