Quickstart

Get CntrlNode running and connect your first two agents in under 5 minutes.

1. Start the server

The fastest way is Docker — zero installation required:

docker run -p 7474:7474 ghcr.io/meetpatell07/cntrlnode:latest

Or download the binary for your platform from GitHub Releases and run:

./cntrlnode start

Verify it's running:

curl http://localhost:7474/health
# {"status":"ok","version":"0.1.0-alpha"}

2. Install the SDK

TypeScript

npm install @cntrlnode/sdk

Python

pip install cntrlnode-sdk

3. Share state between two agents

TypeScript

import { CntrlNodeClient } from '@cntrlnode/sdk'

const client = new CntrlNodeClient({ baseUrl: 'http://localhost:7474' })

// Agent A — writes shared state
await client.state.set('workflow-1', 'research-results', {
  summary: 'Q4 revenue up 12%',
  sources: 3,
})

// Agent B — reads that same state
const { value, version } = await client.state.get('workflow-1', 'research-results')
console.log(value) // { summary: 'Q4 revenue up 12%', sources: 3 }

Python

from cntrlnode import CntrlNodeClient

client = CntrlNodeClient(base_url="http://localhost:7474")

# Agent A — writes
await client.state.set("workflow-1", "research-results", {
    "summary": "Q4 revenue up 12%",
    "sources": 3,
})

# Agent B — reads
entry = await client.state.get("workflow-1", "research-results")
print(entry["value"])

4. Register an agent and submit a task

// Register your agent
await client.registry.register({
  id: 'summarizer-agent',
  tags: ['summarize', 'research'],
})

// From an orchestrator — submit a task
const task = await client.tasks.submit({
  workflowId: 'workflow-1',
  agentId: 'summarizer-agent',
  payload: { query: 'Summarise the Q4 report' },
})

console.log(task.id, task.status) // "2Kx..." "SUBMITTED"

5. Cancel the whole workflow

// Cancels the task AND all child tasks recursively
await client.tasks.cancel(task.id)

Next steps