OpenAgentID documentation
Source referencesRust module referenceopenagent-sdk

openagent-sdk · config

Declared module signatures, types, configuration, and source documentation.

Source: openagent-sdk/sdks/rust/src/config.rs. SHA-256: 60a0684c92cb70612b9eda9b841a39dfed78ad80c39f2df3a6d8afbb7f1baa3c.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

config::OpenAgentConfig

Top-level configuration for the OpenAgent SDK.

Most users can call [OpenAgentConfig::default] and never touch this type. Advanced users construct it via [crate::builder::OpenAgentBuilder].

#[derive(Debug, Clone)]
pub struct OpenAgentConfig {
/// The OAS namespace used when minting new identities. Default: `"openagent"`.

pub namespace: String,
/// Optional Arsenal broker URL for credential proxying.

/// When `None`, agents are created with identity only and credential

/// fetching will return [`crate::errors::OpenAgentError::Config`].

pub broker_url: Option<String>,
/// Optional broker mTLS configuration. Required when `broker_url` is set

/// in production.

pub broker_mtls: Option<BrokerMtlsConfig>,
/// Default audience advertised on broker capability requests.

pub default_audience: String,
/// Default capability TTL in seconds. Default: 300 (5 minutes).

pub default_ttl_seconds: i64,
/// Whether to auto-renew capability tokens before expiry. Default: `true`.

pub auto_renew: bool,
/// Optional path to a key file for loading the SDK's master signing key.

/// When `None`, a fresh ephemeral key is generated.

pub key_file: Option<PathBuf>
}

Source line: 14.

config::BrokerMtlsConfig

mTLS bundle for the Arsenal broker connection.

All three fields are file paths to PEM-encoded material on disk. The SDK passes them through to [arsenal_sdk::ArsenalClientBuilder::broker_mtls].

#[derive(Debug, Clone)]
pub struct BrokerMtlsConfig {
/// PEM-encoded client certificate chain.

pub client_cert: PathBuf,
/// PEM-encoded client private key.

pub client_key: PathBuf,
/// Optional PEM-encoded CA certificate to trust for the broker server.

pub ca_cert: Option<PathBuf>
}

Source line: 60.

On this page