openagent-sdk is the Rust reference facade. It wraps OAS, Arsenal, AEGIS, and the skills policy hook while re-exporting the lower-level SDKs for advanced use.

Install

cargo add openagent-sdk --git https://github.com/OpenAgentID/openagent-sdk

Create an agent

use openagent_sdk::{OpenAgent, CreateAgentOptions};

let agent = OpenAgent::create_agent(CreateAgentOptions {
    parent: Some("did:oas:l1fe:hmr:alice".parse()?),
    name: "ops-bot",
    scopes: &["openai:chat:invoke", "github:repo:read"],
    ..Default::default()
}).await?;

println!("agent did: {}", agent.did());

Production builder

Use the builder when you need to attach a real Arsenal broker, AEGIS registry, or custom skills policy.
use openagent_sdk::{OpenAgentBuilder, CreateAgentOptions, OpenAgentConfig};

let agent = OpenAgentBuilder::new()
    .config(OpenAgentConfig::default())
    .build(CreateAgentOptions {
        parent: Some("did:oas:l1fe:hmr:alice".parse()?),
        name: "ops-bot",
        scopes: &["github:repo:read"],
        ..Default::default()
    })
    .await?;

Verify with AEGIS context

use openagent_sdk::{authenticate_with_verifier, Verifier};

let ctx = authenticate_with_verifier(&verifier, "did:oas:l1fe:agent:ops-bot").await?;
assert!(ctx.is_valid());
AEGIS consumes the OAS verifier result and adds revocation, liveness, trust tier, and policy decisions.

Broker credentials

let creds = agent.credentials_for("openai").await?;

let response = creds
    .post("https://api.openai.com/v1/chat/completions")
    .body(payload)
    .send()
    .await?;
The provider key remains in Arsenal. The agent receives only a scoped broker handle.

Skills policy

use openagent_sdk::AllowListPolicy;

let agent = agent.with_skills_policy(
    AllowListPolicy::with_skills(["frontend-design", "code-review"])
);

agent.check_skill("frontend-design")?;

Re-exports

The crate re-exports the wrapped SDKs for advanced adapters:
pub use aegis_sdk;
pub use arsenal_sdk;
pub use oas_sdk;

Current status

FieldValue
Crateopenagent-sdk
Version0.1.0
MSRVRust 1.78
LicenseApache-2.0 OR MIT
UnsafeForbidden