Quick Start
Installation
Section titled “Installation”pip install idprovanpm install @idprova/core[dependencies]idprova-core = "0.1"cargo install idprova-cliCreate Your First Agent Identity
Section titled “Create Your First Agent Identity”from idprova import AgentIdentity
# 1. Create an agent identity (generates Ed25519 keypair)identity = AgentIdentity.create("my-agent", domain="example.com")print(identity.did) # did:idprova:example.com:my-agent
# 2. Issue a delegation tokendat = identity.issue_dat( "did:idprova:example.com:sub-agent", ["mcp:tool:*:read", "mcp:resource:docs:write"], expires_in_seconds=86400, # 24 hours)print(dat.to_compact()) # JWS compact serialization
# 3. Verify the tokendat.verify_signature(identity.public_key_bytes)dat.validate_timing()print(f"Scopes: {dat.scope}")print(f"Expired: {dat.is_expired}")import { AgentIdentity } from '@idprova/core';
// 1. Create an agent identity (generates Ed25519 keypair)const identity = AgentIdentity.create('my-agent', 'example.com');console.log(identity.did); // did:idprova:example.com:my-agent
// 2. Issue a delegation tokenconst dat = identity.issueDat( 'did:idprova:example.com:sub-agent', ['mcp:tool:*:read', 'mcp:resource:docs:write'], 86400, // 24 hours);console.log(dat.toCompact()); // JWS compact serialization
// 3. Verify the tokendat.verifySignature(identity.publicKeyBytes);dat.validateTiming(); // throws if expiredconsole.log(`Scopes: ${dat.scope}`);console.log(`Expired: ${dat.isExpired}`);use idprova_core::crypto::KeyPair;use idprova_core::aid::AidBuilder;use idprova_core::dat::DelegationToken;use std::time::Duration;
fn main() -> idprova_core::Result<()> { // 1. Generate keypairs let controller_keys = KeyPair::generate()?; let agent_keys = KeyPair::generate()?;
// 2. Create AID let aid = AidBuilder::new() .id("did:idprova:example.com:my-agent") .controller("did:idprova:example.com:alice") .add_verification_key(agent_keys.public_key()) .model("anthropic/claude-opus-4") .runtime("custom/v1.0") .build()?;
println!("Created AID: {}", aid.id());
// 3. Issue delegation let dat = DelegationToken::issue( &controller_keys, "did:idprova:example.com:alice", "did:idprova:example.com:my-agent", &["mcp:tool:*:read"], Duration::from_secs(86400), )?;
println!("Issued DAT: {}", dat.compact());
// 4. Verify let verified = dat.verify(&controller_keys.public_key())?; println!("Verified: scopes = {:?}", verified.scopes());
Ok(())}-
Generate a keypair
Terminal window idprova keygen --output ~/.idprova/keys/alice.keyThis creates an Ed25519 keypair at
~/.idprova/keys/alice.key. The private key never leaves your machine. -
Create an Agent Identity Document (AID)
Terminal window idprova aid create \--id "did:idprova:example.com:my-agent" \--name "My First Agent" \--controller "did:idprova:example.com:alice" \--model "anthropic/claude-opus-4" \--runtime "custom/v1.0" \--key ~/.idprova/keys/alice.keyThis creates a signed AID — a W3C DID Document with agent-specific metadata.
-
Issue a delegation token
Terminal window idprova dat issue \--issuer "did:idprova:example.com:alice" \--subject "did:idprova:example.com:my-agent" \--scope "mcp:tool:*:read,mcp:resource:docs:write" \--expires-in "24h" \--key ~/.idprova/keys/alice.keyThe agent now has a time-bounded, scoped token proving what it’s authorised to do.
-
Verify a delegation token
Terminal window idprova dat verify "eyJhbGciOiJFZERTQSIs..."Verification checks the signature, expiry, scope, and delegation chain integrity.
What’s Next?
Section titled “What’s Next?”- Python SDK Guide — Full Python SDK documentation
- TypeScript SDK Guide — Full TypeScript SDK documentation
- Rust SDK Guide — Rust crate API guide
- CLI Usage — CLI workflows and CI/CD integration
- Concepts: Identity — Understanding Agent Identity Documents
- Concepts: Delegation — Scoped delegation and token chains
- Concepts: Audit — Hash-chained action receipts