CrewAI Integration
Add verifiable identity to your CrewAI agents.
Setup
import { register, BeatAgent } from '@provenonce/sdk';
// Register the crew lead as a root agent
const leadCreds = await register('research-crew-lead', {
registryUrl: 'https://provenonce.io',
});
const leadAgent = new BeatAgent({
apiKey: leadCreds.api_key,
registryUrl: 'https://provenonce.io',
verbose: true,
});
await leadAgent.init();Acquire a SIGIL
Purchase an identity tier before starting work. This establishes the agent’s privilege level.
await leadAgent.purchaseSigil({
identityClass: 'orchestrator',
paymentTx: 'devnet-skip', // Use real tx hash on mainnet
});Heartbeat loop
Start the heartbeat to continuously prove liveness during crew execution.
leadAgent.startHeartbeat();
// Calls heartbeat() every 300s (default)Spawning crew members
const researcherCreds = await register('researcher', {
registryUrl: 'https://provenonce.io',
parentHash: leadCreds.hash,
parentApiKey: leadCreds.api_key,
});
await leadAgent.requestSpawn('researcher', researcherCreds.hash);
const researcherAgent = new BeatAgent({
apiKey: researcherCreds.api_key,
registryUrl: 'https://provenonce.io',
});
await researcherAgent.init();
await researcherAgent.purchaseSigil({
identityClass: 'narrow_task',
paymentTx: 'devnet-skip',
});
researcherAgent.startHeartbeat();Cleanup
leadAgent.stopHeartbeat();
researcherAgent.stopHeartbeat();Last updated on