Skip to main content

Crate agent_infra_sdk

Crate agent_infra_sdk 

Source
Expand description

Unified client for Agent Infra services.

Context, Trace, Runtime Identity, Model, Delivery, Evaluate, and Environment APIs use one Gateway endpoint. Runtime filesystem access is modeled through Environment Space resources rather than the removed managed Workspace API.

§Usage

ⓘ
use agent_infra_sdk::InfraClient;

let client = InfraClient::new("http://127.0.0.1:5200")?;

let messages = client
    .context()
    .recent_messages("conv-1", Some(50), &[])
    .await?;

Re-exports§

pub use agent_memory_contract as memory_contract;
pub use agent_context_contract as context_contract;
pub use agent_delivery_contract as delivery_contract;
pub use agent_evaluate_contract as evaluate_contract;
pub use agent_execution_contract as execution_contract;
pub use agent_model_contract as model_contract;
pub use agent_registry_contract as agent_contract;
pub use agent_runtime_identity_contract as runtime_identity_contract;
pub use agent_source_contract as source_contract;
pub use agent_trace_contract as trace_contract;
pub use agent_workspace_contract as workspace_contract;
pub use infra_api_gateway_contract as gateway_contract;

Structs§

AdminClient
Unified administrator facade for Agent, Context, Runtime Identity, Workspace, and Trace resources.
AgentClient
BearerCredential
CallOptions
Per-call reliability controls. Retries remain disabled unless the caller explicitly proves the operation idempotent.
CancellationToken
ClientOptions
ContextClient
Client for the Context service (agent-context-server).
ContextCompressionConfig
Configuration for context compression.
CredentialError
DelegationLeaseCredentials
Mints short-lived service credentials from an opaque execution delegation lease. The lease reference is never exposed through Debug, and the workload credential remains owned by the configured source provider.
DeliveryClient
EnvironmentClient
EvaluateClient
ExecutionClient
Typed client for durable execution runs and events.
ExecutionProjectionWorker
Stateless application worker. Durable attempts, leases, fencing and retry deadlines remain owned by Execution Infra, so replicas can run this safely.
GatewayClient
GatewayExchangeCredentials
Exchanges one external workload credential for short-lived, audience-bound service credentials. Cache growth is bounded by the explicitly configured audience map, and refresh is single-flight.
InfraClient
Unified developer client for Agent Infra.
InfraClientBuilder
Builder for the Infra SDK. Gateway-backed clients share one immutable reqwest::Client, one connection pool, and one Gateway endpoint.
MemoryClient
ModelClient
Typed transport owner for Model Infra’s JSON data plane.
ModelStream
Raw SSE bytes from a Model Infra streaming response.
NoopTelemetry
OperationHandle
OperationObservation
ProjectionWorkerResult
RetryPolicy
RuntimeIdentityClient
RuntimeRecoveryCredentials
RuntimeWorkloadCredentials
SourceClient
StaticCredentials
TelemetryEvent
TraceClient
Client for the Trace service (agent-trace-server).
WaitOptions

Enums§

InfraClientError
OperationProgress
TelemetryPhase

Traits§

CredentialsProvider
OperationPoller
TelemetryObserver

Functions§

compress_context
Compress a context window (list of messages) to fit within the configured limits.