openagent-sdk · builder
Declared module signatures, types, configuration, and source documentation.
Source: openagent-sdk/sdks/rust/src/builder.rs. SHA-256: e0ecff2f40b0c2c8b5021827630f5991d14020c8561aee684e80447db77856a7.
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.
builder::OpenAgentBuilder
Fluent builder for an [OpenAgent].
All setters consume self and return a new builder; the builder itself is
Default-friendly so you can chain straight from a function call.
Setters for a disabled Cargo feature are absent rather than ignored: a
with_arsenal_client call cannot exist in a build that would discard the
client.
#[derive(Default)]
pub struct OpenAgentBuilder {
}Source line: 36.
builder::OpenAgentBuilder::new
Start a new builder with default config.
pub fn new() -> Self;Source line: 50.
builder::OpenAgentBuilder::config
Replace the SDK config.
pub fn config(mut self, config: OpenAgentConfig) -> Self;Source line: 55.
builder::OpenAgentBuilder::with_arsenal_client
Wire in an existing [ArsenalClient].
Without this call, agents built by this builder cannot fetch
credentials and [OpenAgent::credentials_for] will return a
[crate::errors::OpenAgentError::Config].
#[cfg(feature = "arsenal")]
pub fn with_arsenal_client(mut self, client: ArsenalClient) -> Self;Source line: 66.
builder::OpenAgentBuilder::with_aegis_client
Wire in an existing [AegisClient].
#[cfg(feature = "aegis")]
pub fn with_aegis_client(mut self, client: AegisClient) -> Self;Source line: 73.
builder::OpenAgentBuilder::with_aegis_registry
Wire in an AEGIS plugin registry. The builder will materialise an
[AegisClient] from this when needed.
#[cfg(feature = "aegis")]
pub fn with_aegis_registry(mut self, registry: Arc<PluginRegistry>) -> Self;Source line: 81.
builder::OpenAgentBuilder::with_skills_policy
Wire in a custom skills policy.
pub fn with_skills_policy<P: SkillsPolicy + 'static>(mut self, policy: P) -> Self;Source line: 87.
builder::OpenAgentBuilder::with_parent
Provide a real parent identity (with its own keypair) so the new agent can be derived from it cryptographically.
This is the production path. The convenience
[crate::OpenAgent::create_agent] mints a fresh transient root from
the parent DID instead, which is useful for tests but not for
long-lived deployments.
pub fn with_parent(mut self, parent: AgentIdentityRecord) -> Self;Source line: 99.
builder::OpenAgentBuilder::build
Finish the build and produce an [OpenAgent].
Errors
Returns [OpenAgentError::Identity] if document construction fails or
[OpenAgentError::Config] if the supplied options are invalid.
pub async fn build(self, opts: CreateAgentOptions<'_>) -> Result<OpenAgent>;Source line: 110.