@cdr-kit/Agent kit

CdrAgent

Autonomous agent client: discover vaults on the factory, subscribe from its own wallet, decrypt, and use the data — no human in the loop. The headless object every framework adapter wraps.
import { CdrAgent } from "@cdr-kit/agent"

Usage

agent-demo.ts
import { CdrAgent } from "@cdr-kit/agent";

const agent = new CdrAgent({
privateKey: process.env.PRIVATE_KEY as `0x${string}`,
apiUrl: process.env.CDR_API_URL,
});

const vaults = await agent.discover();
const bytes = await agent.subscribeAndAccess({
uuid: vaults[0].uuid,
periods: 1n,
maxPricePerPeriod: 5n * 10n ** 18n,
value: 5n * 10n ** 18n,
});

Framework adapters