Helix workflow engine for governed enterprise operations Learn more →

Custom agents

Pre-beta · last updated 2026-06-01
Pre-betaCustom agent registration is available to design partners. The agent card schema is stable. Apply to the design partner program for early access.

What is an agent?

An agent is a callable unit of intelligence that the Cendriix orchestrator can invoke as a step in a workflow. Every agent receives a typed context from the Cortex knowledge graph, executes a task, and writes structured output back to the graph.

Agents are stateless. They do not hold memory between calls — all persistent state lives in the Cortex knowledge graph. This makes agents individually testable and composable into arbitrarily complex A2A workflows.

Built-in agents

The following agents are available out of the box on all plans:

AgentInputOutput
cortex-readerEntity queryEntity data
code-writerImplementation planPR diff
test-runnerPR diff, repoTest result
github-pr-openerPR diff, title, ticketPR URL
deploy-canaryPR URL, environmentDeploy event
jira-updaterTicket ID, status, commentUpdated ticket
slack-notifierChannel, messageMessage ID
blast-radius-scorerService IDsScore, affected services

Custom agents

You can register your own agents using the Cendriix agent SDK (TypeScript and Python). A custom agent is a function that accepts a typed AgentContext and returns a typed AgentOutput.

typescript
import { Agent, AgentContext, AgentOutput } from '@cendriix/sdk';

export const myAgent: Agent = {
  id: 'my-custom-agent',
  description: 'Analyses a diff against internal coding standards.',

  async execute(ctx: AgentContext): Promise<AgentOutput> {
    const diff = ctx.get('pr_diff');
    const standards = ctx.cortex.query({
      entity: 'coding_standard',
      team: ctx.workspace.teamId,
    });

    // Your logic here
    const violations = await analyseAgainstStandards(diff, standards);

    return ctx.output({
      violations,
      passed: violations.length === 0,
    });
  },
};

Agent context & Cortex

The AgentContext object provides access to:

  • ctx.get(key) — read a named input bound in the workflow step
  • ctx.cortex.query(selector) — query the Cortex knowledge graph
  • ctx.cortex.write(entity, data) — write an entity back to the graph
  • ctx.workspace — workspace metadata (team ID, cost cap remaining, etc.)
  • ctx.model — the model selected by the Model Router for this step

A2A handoffs

Agents can hand off to other agents using ctx.handoff(agentId, context). Handoffs are recorded as A2A events in the audit trail. The receiving agent inherits the caller's Cortex context plus any additional bindings passed in the handoff call.

typescript
// In a custom agent
const planResult = await ctx.handoff('code-writer', {
  implementation_plan: myPlan,
  repo: ctx.get('repo'),
});

Registering an agent

Agents are registered in the Cendriix agent catalog using the CLI or API. Once registered, your agent is available as a step type in any workflow.

bash
# Register via CLI (when available)
cendriix agent register ./my-agent.ts

# Or via API
curl -X POST https://api.cendriix.ai/v1/agents \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-custom-agent",
    "description": "Analyses a diff against internal coding standards.",
    "runtime": "typescript",
    "entry": "dist/my-agent.js"
  }'