AURA
Advanced

Swarm

Initialize and join shared agent swarm spending pools.

Pre-alpha — not production ready

aura-sdk targets Solana devnet only. APIs may change without notice. Do not use for real funds until a stable release and audit are published.

A swarm pool is a shared spending counter across multiple agent treasuries. Use configure_swarm (in Governance) to attach a treasury to a swarm. Use the instructions below to create and join the pool account itself.

init_swarm_pool

Create the shared swarm pool account. Must be done before any treasury can join.

// Build only
let instruction = client.init_swarm_pool_instruction(accounts, args);

// Build + send
client.init_swarm_pool(&creator, accounts, args)?;
client.init_swarm_pool(
    &creator,
    aura_core::accounts::InitSwarmPool {
        creator: creator.pubkey(),
        swarm_pool: swarm_pool_pda,
        system_program: anchor_lang::system_program::ID,
    },
    aura_core::InitSwarmPoolArgs {
        swarm_id: "swarm-alpha".to_string(),
        shared_pool_limit_usd: 100_000,
        timestamp: now,
    },
)?;

join_swarm

Add a treasury to an existing swarm pool.

// Build only
let instruction = client.join_swarm_instruction(accounts, now);

// Build + send
client.join_swarm(&owner, accounts, now)?;
client.join_swarm(
    &owner,
    aura_core::accounts::JoinSwarm {
        owner: owner.pubkey(),
        treasury,
        swarm_pool: swarm_pool_pda,
    },
    now,
)?;

After joining, pass swarm_pool in the proposal accounts to enforce the shared limit.

On this page