LevelUp.Strategos.Agents
2.2.0
See the version list below for details.
dotnet add package LevelUp.Strategos.Agents --version 2.2.0
NuGet\Install-Package LevelUp.Strategos.Agents -Version 2.2.0
<PackageReference Include="LevelUp.Strategos.Agents" Version="2.2.0" />
<PackageVersion Include="LevelUp.Strategos.Agents" Version="2.2.0" />
<PackageReference Include="LevelUp.Strategos.Agents" />
paket add LevelUp.Strategos.Agents --version 2.2.0
#r "nuget: LevelUp.Strategos.Agents, 2.2.0"
#:package LevelUp.Strategos.Agents@2.2.0
#addin nuget:?package=LevelUp.Strategos.Agents&version=2.2.0
#tool nuget:?package=LevelUp.Strategos.Agents&version=2.2.0
Strategos.Agents
Microsoft Agent Framework integration for Strategos. Provides abstractions for LLM-powered workflow steps with conversation continuity and streaming responses.
Installation
dotnet add package LevelUp.Strategos.Agents
Features
Agent Steps
Create workflow steps powered by LLM agents:
public class AnalyzeDocumentStep : IAgentStep<DocumentState>
{
public string GetSystemPrompt() => """
You are a document analyst. Analyze the provided document and extract key insights.
Focus on: main topics, sentiment, key entities, and actionable recommendations.
""";
public Type? GetOutputSchemaType() => typeof(DocumentAnalysis);
public async Task<StepResult<DocumentState>> ExecuteAsync(
DocumentState state,
StepContext context,
CancellationToken ct)
{
// Agent execution handled by generated worker
return StepResult<DocumentState>.FromState(state);
}
}
Conversation Continuity
Enable per-agent conversation threads for context retention:
public record MyState : IWorkflowState, IConversationalState
{
public Guid WorkflowId { get; init; }
public ImmutableDictionary<string, string> SerializedThreads { get; init; }
= ImmutableDictionary<string, string>.Empty;
public IConversationalState WithSerializedThread(string agentType, string thread)
=> this with { SerializedThreads = SerializedThreads.SetItem(agentType, thread) };
}
Streaming Responses
Handle real-time token streaming:
public class WebSocketStreamingCallback : IStreamingCallback
{
public async Task OnTokenReceivedAsync(
string token, Guid workflowId, string stepName, CancellationToken ct)
{
await _hubContext.Clients.Group(workflowId.ToString())
.SendAsync("TokenReceived", token, ct);
}
public async Task OnResponseCompletedAsync(
string fullResponse, Guid workflowId, string stepName, CancellationToken ct)
{
await _hubContext.Clients.Group(workflowId.ToString())
.SendAsync("ResponseCompleted", fullResponse, ct);
}
}
Configuration
services.AddStrategosAgents()
.AddConversationThreadManager<MyThreadManager>()
.AddStreamingCallback<WebSocketStreamingCallback>();
Core Abstractions
| Interface | Purpose |
|---|---|
IAgentStep<TState> |
Workflow step powered by LLM agent |
IConversationalState |
State with per-agent conversation threads |
IConversationThreadManager |
Manages conversation thread lifecycle |
IStreamingCallback |
Handles real-time token streaming |
Documentation
- Agent Selection Guide - Configuring agents in workflows
- Agents API Reference - Complete API documentation
License
MIT
| Product | Versions 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. |
-
net10.0
- LevelUp.Strategos (>= 2.2.0)
- Microsoft.Extensions.AI (>= 10.0.1)
- Microsoft.Extensions.AI.Abstractions (>= 10.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LevelUp.Strategos.Agents:
| Package | Downloads |
|---|---|
|
LevelUp.Strategos.Rag
[DEPRECATED] Vector store adapters for Strategos RAG integration. Use Strategos.Ontology with IObjectSetProvider instead. |
|
|
LevelUp.Strategos.Agents.Mcp
Model Context Protocol adapter for Strategos.Agents. Provides the McpToolSource IToolSource implementation wrapping the ModelContextProtocol C# SDK. |
GitHub repositories
This package is not used by any popular GitHub repositories.