Declaragent
An agent for enterprises to build and manage fleets of agents.
One agent.yaml in git describes identity, capabilities, tools, skills, event sources, channels, secrets, and who can call whom. One CLI — declaragent — is itself an agent built on @declaragent/core, the same runtime you'd ship to production. No second implementation, no vendor dashboard locked out of your repo.
The four pillars
- Define agents declaratively — capabilities, skills, inbound + outbound channels, peers to call.
- Deploy + monitor fleets — one-command rollout, rolling + canary strategies, Prometheus + OpenTelemetry out of the box.
- Independent by default — each agent owns its session, secrets, and sources. Delegation between agents is explicit via
rpc-peers.yaml. - Tools + MCP — seven built-in tools, full MCP server support (stdio / HTTP / SSE / OAuth PKCE), plugin-contributed extensions.
See FIRST_PRINCIPLES_AUDIT.md for an evidence-backed map of intent → code.
Where to go next
- Quickstart → — the 10-minute path. Install, run
declaragent init, observe it with Prometheus + OTel. - Reference → — the
agent.yamlschema, CLI verbs, env vars, provider matrix, extension registry. - Cookbook → — walkthroughs for each template and cross-cutting recipes (multi-agent fleets, deploys, secrets rotation, multi-tenant).
- Troubleshooting → — error-code reference, install + deploy flowcharts, runbook index.
Status
This site tracks v0.5.21 (latest on npm) with 0.6.0 staged (eight slices merged; tag + publish gated by operator sign-off — see RELEASE_0_6_0_READINESS.md). See the changelog for the per-release deltas.
What's new in 0.6.0 (staged)
- Prometheus
/metricsendpoint (Slice 1) — scrape on127.0.0.1:9464when runningdeclaragent up -d. Source + channel counters flow through the shared registry automatically. - OpenTelemetry auto-enable (Slice 2) — set
OTEL_EXPORTER_OTLP_ENDPOINT, install the peer deps, andupwires the bridged tracer into every source + channel. No code changes. - Per-skill circuit breakers (Slice 3) — 10 consecutive failures trip the breaker, 30-s cooldown, half-open probe re-closes. State + transitions exported as Prometheus counters.
declaragent events list --state circuit-openfilter. - Default provider rate limits (Slice 4) — token bucket at the LLM call site. Anthropic 50 rps / OpenRouter 20 rps / unknown 10 rps. Env escape hatches for loud-dev workloads.
- Dispatch DLQ (Slice 5) —
rejected_eventstable tracks every rejected dispatch;declaragent dlq list/show/drop --kind dispatchfor audit + acknowledge. - Inbound channels → skills (Slice 6) —
channels.json#inbound.routesmaps Slack mentions / Telegram DMs / Discord / WhatsApp events to skills with one line of config. - Kafka RPC transport (Slice 7) —
createKafkaTransportcarriesRequestAgentenvelopes across processes. Nightly integration CI against Redpanda. - Canary fleet deploys (Slice 8) —
declaragent fleet deploy --canary --canary-wait-ms <n>: deploy one agent, soak, re-probe, then roll out the rest. Auto-rollback on post-soak failure.
What's new in 0.5.x (shipped)
The five runtime-activation slices that unlocked end-to-end 0.6.0 work:
- External source adapter discovery (0.5.0) —
declaragent upnow auto-discovers@declaragent/source-*packages installed innode_modules. Kafka, NATS, SQS, AMQP, MQTT all start when installed. - MCP runtime activation (0.5.0–0.5.1) — stdio + HTTP + SSE + OAuth PKCE +
@server:resourcereferences. - Channel runtime +
SendMessage(0.5.0) —upspins every channel inchannels.json; skills can callSendMessage({kind:'channel', …})without plugin wiring. - Plugin runtime activation (0.5.0) — consented plugins load at
uptime, contributing tools / skills / commands / hooks. - Non-memory RPC transports +
RequestAgent(0.5.0) —declaragent fleet runhonors every transport kind declared incapabilities.yaml;RequestAgentis appended to the per-agent tool list whenrpc-peers.yamlis present.