CasCap.AgentRuntime.Client 1.7.0

Prefix Reserved
dotnet add package CasCap.AgentRuntime.Client --version 1.7.0
                    
NuGet\Install-Package CasCap.AgentRuntime.Client -Version 1.7.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="CasCap.AgentRuntime.Client" Version="1.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CasCap.AgentRuntime.Client" Version="1.7.0" />
                    
Directory.Packages.props
<PackageReference Include="CasCap.AgentRuntime.Client" />
                    
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 CasCap.AgentRuntime.Client --version 1.7.0
                    
#r "nuget: CasCap.AgentRuntime.Client, 1.7.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 CasCap.AgentRuntime.Client@1.7.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=CasCap.AgentRuntime.Client&version=1.7.0
                    
Install as a Cake Addin
#tool nuget:?package=CasCap.AgentRuntime.Client&version=1.7.0
                    
Install as a Cake Tool

CasCap.AgentRuntime.Client

Typed HTTP execution and definition-administration clients for .NET 10 and .NET 11 applications using the CasCap multi-tenant Agent Runtime. The application owns authentication, resilience and presentation; the runtime owns agent execution and session state.

Installation

dotnet package add CasCap.AgentRuntime.Client

The source targets net10.0 and net11.0 and depends on CasCap.AgentRuntime.Contracts. Use a stable .NET 11 SDK for source development; installed packages use their selected target's runtime.

Usage

In an existing Generic Host application (with Microsoft.Extensions.Hosting referenced), use the connection options below in the application's configuration:

using CasCap.AgentRuntime.Client.Abstractions;
using CasCap.AgentRuntime.Contracts.V1;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddAgentRuntimeClient();
using var host = builder.Build();

var client = host.Services.GetRequiredService<IAgentRuntimeClient>();
var response = await client.RunAgentAsync(
    "assistant",
    new RunAgentRequest
    {
        SessionId = "conversation-example",
        Input = "Summarize the available capabilities.",
    },
    CancellationToken.None);
Console.WriteLine(response?.OutputText);

Add a caller-owned authentication handler to the returned IHttpClientBuilder for authenticated deployments. The token needs agent.execute and its application identity must map to a runtime tenant. The snippet does not acquire a token.

Configuration Examples

Minimal connection settings:

{
  "CasCap": {
    "AgentRuntimeClientOptions": {
      "BaseAddress": "https://runtime.example.com/"
    }
  }
}

With an explicit timeout:

{
  "CasCap": {
    "AgentRuntimeClientOptions": {
      "BaseAddress": "https://runtime.example.com/",
      "TimeoutMinutes": 15
    }
  }
}

BaseAddress is required. TimeoutMinutes defaults to 10 and accepts 1–60. Both client registrations bind and validate these same options at startup.

Execution and Sessions

Register IAgentRuntimeClient with AddAgentRuntimeClient() and configure CasCap:AgentRuntimeClientOptions:BaseAddress and optional TimeoutMinutes. The registration returns an IHttpClientBuilder; authentication and resilience belong to the consuming application and are attached through that pipeline.

RunAgentAsync returns null when the named agent is unavailable to the authenticated tenant and throws for other non-success responses. Session methods inspect/reset/compact active state, manage named snapshots, and get or replace complete per-session runtime overrides without exposing raw session JSON. GetInstructionsAsync returns the effective instructions, or null when the agent is unavailable or its tenant has not enabled instructions disclosure.

StreamAgentAsync incrementally yields live delegation/compaction events and then the final response using a streamed JSON response. Callers opt into tool arguments and property bags through RunAgentRequest.IncludeDiagnosticDetails only when their diagnostic destination is operator-controlled. Unlike RunAgentAsync, streaming throws on any non-success response, including 404. The stream is a JSON array consumed incrementally, not Server-Sent Events.

Overlapping turns or mutations of the same session return HTTP 409, surfaced as HttpRequestException with StatusCode=Conflict. Reads remain available during a turn. Do not automatically retry interrupted runs or streams: a provider or tool may already have performed work. A stream that fails after its HTTP headers are sent terminates without a final response rather than changing its status code.

Document Knowledge

The current source adds SearchKnowledgeAsync and GetKnowledgePassageAsync to IAgentRuntimeClient. These require a caller-owned token with agent.knowledge.search, not merely agent.execute or agent.realtime. They return null on 404 and throw for other non-success responses.

Search sends one short query to the server's existing Azure embedding deployment only when an eligible corpus exists; it is not automatically invoked by RunAgentAsync or every prompt. Source previews do not invoke a model. Do not configure automatic retries for search: an uncertain embedding call may already have incurred usage. Tenant, collection and profile are server-owned. Responses contain bounded untrusted passages with protected generation/chunk references. The retrieval contract describes limits and pending rollout/consumer gates. These additions are not yet a published package.

Definition Administration

Register IAgentDefinitionAdminClient separately with AddAgentDefinitionAdminClient(). It publishes inactive immutable snapshots, reads active/version/history state, activates or rolls back versions, evaluates fixture scenarios, deactivates active definitions, and reads activation audit history. Attach control-plane credentials carrying definition scopes to that client; execution workloads need not receive those permissions.

Operation Permission
Snapshot and history reads agent.definition.read
Publish agent.definition.publish
Evaluate, activate, roll back or deactivate agent.definition.activate

The server can require a passing evaluation before activation. Deactivation requires a reason and is refused while another active agent delegates to the target.

Realtime Voice Calls

CreateRealtimeCallAsync sends a WebRTC SDP offer and returns the SDP answer and a runtime call id; EndRealtimeCallAsync ends the call and returns its RealtimeCallSummaryResponse (end reason, duration, token usage and optional estimated cost), including for a call the runtime already ended. Audio flows directly between the client and the provider, while the runtime applies the agent's instructions and executes its allowlisted tools. Both require agent.realtime.

Documentation

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CasCap.AgentRuntime.Client:

Package Downloads
CasCap.Comms.AI

AI agent responder for the Signalizr communications pipeline: agent turns, slash commands, polls and diagnostics.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.7.0 0 11/15/2026
1.6.0 93 11/14/2026
1.5.0 72 11/12/2026
1.4.0 257 11/5/2026
1.3.0 151 11/1/2026
1.2.0 216 10/24/2026
1.1.0 106 10/22/2026
1.0.1 104 10/21/2026
1.0.0 177 10/21/2026