agent-infra-sdk 0.2.0

Unified Rust SDK for Gateway-backed and local Agent Infra APIs
docs.rs failed to build agent-infra-sdk-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: agent-infra-sdk-0.2.1

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. Platform consoles and operations tools use the typed AdminClient, whose resource methods all stay inside the Gateway-owned /admin/api namespace. Workspace file operations go through Environment Space APIs. Other APIs remain Gateway-backed.

use agent_infra_sdk::InfraClient;

let client = InfraClient::new("http://127.0.0.1:5200")?;
let agents = client.agents();
let context = client.context();
let admin = client.admin();
# Ok::<(), agent_infra_sdk::InfraClientError>(())

Feature flags can be used to include only the required typed clients.

The unified administrator facade covers Agent IDs, managed Workspaces, Context search, Runtime IDs, built-in model configuration, and usage accounting:

use agent_infra_sdk::agent_contract::ListAgentsRequest;

let agents = client.admin().list_agents(&ListAgentsRequest {
    limit: Some(100),
    ..Default::default()
}).await?;
let workspaces = client.admin().list_workspaces(None, Some(100)).await?;
let runtimes = client.admin().list_runtime_identities(&Default::default()).await?;

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 agent_infra_sdk::CallOptions;
use serde_json::json;

let mut stream = client
    .model()
    .responses_stream(
        &json!({"model": "model-1", "input": "hello"}),
        CallOptions::default(),
    )
    .await?;
while let Some(chunk) = stream.next_chunk().await {
    forward_sse_bytes(chunk?).await?;
}