Agent SDK
Design preview. The SDK surface below describes the intended developer experience and is subject to change before release. It is not yet published to a package registry.
The private agent SDK lets bots and AI agents trade from shielded balances with spending limits, keeping their strategy off-chain.
Why
A bot on a public chain is a strategy written in fills: readable, reversible, and front-runnable. The SDK gives automation the same dark-first execution a human user gets, plus a hard leash.
Model
- Provision an agent identity with per-asset spending limits and an allowed venue set.
- Fund a bounded allocation from a shielded balance. The rest stays out of the agent's reach.
- Execute. The agent submits encrypted intents through private RPC. Crossing and fallback routing behave exactly as for a human user.
- Observe. Read the agent's activity locally; extend a scoped viewing key if a third party needs to verify it.
Guarantees
- Limits are enforced by the spending proof itself, not by a server-side check. An agent cannot exceed its allocation.
- The agent never holds the owner key.
- Every agent spend carries a proof of innocence like any other spend.
Intended shape (TypeScript)
// Illustrative — not a published API.
const agent = await intelena.agents.create({
limits: { USDG: "5000", rHOOD: "250" },
venues: ["dark", "uniswap-v3"],
});
await agent.intents.submit({
sell: { asset: "rHOOD", amount: "50" },
buy: { asset: "USDG" },
exposure: 0.8, // 0 = best price, 1 = least exposure
});