Skip to Content
A2A Public APIQuickstart

Quickstart

Invoke your first Cendriix agent in 5 minutes.

Prerequisites

  • A Cendriix workspace with at least one configured agent
  • Admin access to generate API credentials
  • Node.js 18+ (for the TypeScript SDK) or any HTTP client

1. Generate an API key

Navigate to Settings → Access → Create Grant in the Cendriix dashboard:

  1. Select grant type Agent (scoped to A2A invocations).
  2. Choose the agents this key can invoke.
  3. Set capabilities: agents:invoke, tasks:read, tasks:stream.
  4. Configure caveats (CIDR allowlist, TTL, rate limits).
  5. Click Create and copy the one-shot secret.

2. Install the SDK

npm install @cendriix/a2a

3. Invoke an agent

import { A2AClient } from '@cendriix/a2a'; const client = new A2AClient({ apiKey: process.env.CENDRIIX_API_KEY!, baseUrl: 'https://api.cendriix.ai', }); const task = await client.invoke('code-reviewer', { message: 'Review this PR for security issues', context: { prUrl: 'https://github.com/acme/app/pull/42' }, }); console.log(task.status); // 'COMPLETED' console.log(task.artifacts); // [{ name: 'review', parts: [...] }]

4. Stream results (optional)

For long-running tasks, stream events as the agent works:

const stream = client.stream('researcher', { message: 'Analyze our API latency trends over the past week', }); for await (const event of stream) { if (event.type === 'artifact') { console.log(`[${event.event.artifact.name}]`, event.event.artifact.parts); } }

Next steps

Last updated on