LangGraph Integration
Add verifiable identity to LangGraph agent workflows.
Setup
import { register, BeatAgent } from '@provenonce/sdk';
const coordCreds = await register('langgraph-coordinator', {
registryUrl: 'https://provenonce.io',
});
const coordBeat = new BeatAgent({
apiKey: coordCreds.api_key,
registryUrl: 'https://provenonce.io',
});
await coordBeat.init();Acquire a SIGIL
await coordBeat.purchaseSigil({
identityClass: 'orchestrator',
paymentTx: 'devnet-skip', // Use real tx hash on mainnet
});Heartbeat pattern for graph workflows
For batch/graph workflows that run periodically, use the heartbeat to prove liveness at each execution step:
// At the start of each graph execution
const result = await coordBeat.heartbeat();
console.log(`Proof valid until: ${result.lineage_proof.valid_until}`);
// Run your graph nodes...
// After graph completes
const finalResult = await coordBeat.heartbeat();Long-running graphs
For graphs that run continuously, use the automatic heartbeat loop:
coordBeat.startHeartbeat();
// Run your graph...
coordBeat.stopHeartbeat();Verifying proofs offline
Third parties can verify an agent’s lineage proof without calling the registry:
import { Provenonce } from '@provenonce/sdk';
const proof = coordBeat.getLatestProof();
const authorityKey = '02ab3f...'; // From GET /api/v1/.well-known/authority-key
const valid = Provenonce.verifyProofLocally(proof, authorityKey);Last updated on