Tracon.Client 1.0.0-preview.3

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

Tracon.Client

A typed client for Tracon's management API, generated from its published OpenAPI document. Covers every /api/* operation: agents, runs, sessions, evals, workflows, tenants, and the rest of the control plane.

dotnet add package Tracon.Client --prerelease

Setup

services.AddTraconClient(options =>
{
    // The application root PLUS the MapTracon prefix. The default
    // prefix is "/tracon"; an app that called MapTracon("/control")
    // needs "https://example.com/control/" instead.
    options.BaseAddress = new Uri("https://example.com/tracon/");
    options.Token = configuration["Tracon:Token"]; // a secret - read it, don't hard-code it

    // Optional. HttpClient caps every request at 100 seconds by default, which
    // applies underneath any longer budget you set yourself. Timeout.InfiniteTimeSpan
    // leaves the budget entirely to the cancellation token you pass in.
    options.Timeout = TimeSpan.FromSeconds(30);
});

Resolve TraconApiClient from the container and call any of its generated methods — one per operation in the document:

var client = provider.GetRequiredService<TraconApiClient>();
var agents = await client.TraconListAgentsAsync(cancellationToken);

Streaming endpoints have a second method

Some endpoints answer with Server-Sent Events rather than JSON. Each of them has a ...StreamAsync sibling that hands you one raw SSE frame at a time, as the server flushes it:

await foreach (var frame in client.TraconRunAgentStreamAsync("support", request))
{
    Console.WriteLine(frame); // "id: 3\nevent: update\ndata: {...}"
}

Leaving the loop early, or cancelling the token, stops the read and releases the connection. Comment-only keep-alive frames are skipped.

The two OpenAI-compatible endpoints (/v1/responses, /v1/chat/completions) answer with either shape, chosen by the stream flag in the request body, so they have both methods and you pick one:

var body = JsonSerializer.SerializeToElement(
    new { model = "support", input = "Where is order 4182?", stream = true });

await foreach (var frame in client.TraconOpenAIResponsesStreamAsync(body))
{
    Console.WriteLine(frame);
}

The body is sent exactly as written — the client never rewrites stream to match the method. If the two disagree, the call throws TraconApiException with a message naming the fix, instead of failing obscurely later.

Why the base address needs the prefix

MapTracon's prefix is a runtime parameter, not a fixed value — the document every operation is generated from carries no prefix at all. If the client sent requests to the document's bare paths, a consumer that moved the mount point off the default /tracon would get a silent 404 on every call. TraconClientOptions.BaseAddress is where the prefix goes instead: it must be the address MapTracon is actually mounted at, with a trailing /.

The DTOs are not Tracon.Abstractions types

TraconApiClient's request and response types are generated straight from the OpenAPI document. They are not the same CLR types as Tracon.Abstractions's RunRecord, AgentDefinition, and so on — same shape, different type, because generating against the abstractions package would fight the code generator and would leak server-side interfaces (IRunStore and similar) into an HTTP consumer that never needs them.

Dependencies

No Tracon package. One NuGet package — Microsoft.Extensions.DependencyInjection.Abstractions, for AddTraconClient(this IServiceCollection ...) — which carries no transitive dependencies of its own. Serialization goes through a source-generated JsonSerializerContext, not runtime reflection; IHttpClientFactory is deliberately not used, for the same "no extra package" reason Tracon.Voice avoids it.

Licence: PolyForm Small Business 1.0.0 - free below 100 people and 1,000,000 USD (2019, inflation adjusted) revenue; a commercial licence applies above that. Terms ship in the package as LICENSE.md. Details: https://tracon.dev/reference/licensing/

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
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
1.0.0-preview.3 41 9/24/2026
1.0.0-preview.2 78 9/20/2026
1.0.0-preview.1 61 9/20/2026