Agent Infra SDK
Rust SDK for Agent Infra APIs. Applications configure one Gateway URL and one
credential provider, then use typed clients for Agent Registry, context,
workspace, trace, runtime identity, model, deployment, and evaluation APIs.
Workspace data operations use Gateway by default, but may bind an in-process
Workspace port for direct local filesystem access. Other APIs remain
Gateway-backed.
use InfraClient;
let client = new?;
let agents = client.agents;
let context = client.context;
# Ok::
Local Workspace binding is selected once at the composition root; runtime
business code still calls the same client.workspace() facade:
use InfraClient;
use LocalWorkspace;
use ;
let workspace = new;
let client = builder
.local_workspace
.build?;
let readme = client.workspace.read_file.await?;
Feature flags can be used to include only the required typed clients.
Model streaming returns raw SSE bytes as soon as they arrive. The streaming
methods set stream=true; chunks preserve wire order but are not guaranteed to
align with SSE event boundaries:
use CallOptions;
use json;
let mut stream = client
.model
.responses_stream
.await?;
while let Some = stream.next_chunk.await