{"_id":"@addbrain/dagr","_rev":"2-527edef4d1c5d5a018382f63b2cff6a8","name":"@addbrain/dagr","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@addbrain/dagr","version":"0.0.1","keywords":["agent swarm","harness","nats","multi-agent","claude-code","opencode"],"author":{"name":"teknicus"},"license":"ISC","_id":"@addbrain/dagr@0.0.1","maintainers":[{"name":"teknicus","email":"npm@thomasrob.in"}],"bin":{"dagr":"dist/index.js"},"dist":{"shasum":"d270df88555da2d57b9012bc85c93054a6abc3c9","tarball":"https://registry.npmjs.org/@addbrain/dagr/-/dagr-0.0.1.tgz","fileCount":2,"integrity":"sha512-H4K9Tcmu70RPaz1q0AREkR12Id8T0/7ivxFIhNTRjMQdUC7OKI+nMwUfUsajh+m0soQ1jFGaYWMrBL7z96kv5g==","signatures":[{"sig":"MEQCICMBDRCtXD0E7L/XYpv2+2aEcgJmcUUSWU1RQCBSeAqJAiBvnl2sgWjTxKbG19aCx2H5gQ/Z8pzRMPMYEloSkERRWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1189},"main":"dist/index.js","gitHead":"ce9408e91e03eb6b63b13f4854ab4988ec08a997","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"teknicus","email":"npm@thomasrob.in"},"_npmVersion":"10.9.4","description":"Distributed Agent Runtime (DAgR) - The Distributed Harness for Autonomous Agents","directories":{},"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"commander":"^14.0.2","typescript":"^5.9.3","@types/node":"^25.0.10"},"_npmOperationalInternal":{"tmp":"tmp/dagr_0.0.1_1769395445994_0.42145229962726405","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@addbrain/dagr","version":"0.0.2","description":"Distributed Agent Runtime (DAgR) - The Distributed Harness for Autonomous Agents","publishConfig":{"access":"public"},"main":"dist/index.js","bin":{"dagr":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["agent swarm","harness","nats","multi-agent","claude-code","opencode"],"author":{"name":"teknicus"},"license":"ISC","devDependencies":{"@types/node":"^25.0.10","commander":"^14.0.2","typescript":"^5.9.3"},"_id":"@addbrain/dagr@0.0.2","gitHead":"ce9408e91e03eb6b63b13f4854ab4988ec08a997","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-C9oxBQFKZID3vPREqMyQsNwaPA2/+sQmkIYpXh6ldg0wQbmRssaO4NKsl/b0Ne4idyyl8pCkK667vP86MPlS6w==","shasum":"fe3c9c69122bbfced6f054f81c78fd3e93f05460","tarball":"https://registry.npmjs.org/@addbrain/dagr/-/dagr-0.0.2.tgz","fileCount":3,"unpackedSize":3868,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFwQi1EYosJ6sg/qa6JvTCkBDupgAkGa9t8t6nnFOJbsAiEAoJ69gLv5GQD5MrZi9dRzO0xiW+WP4cVPHvlxNa0sgaI="}]},"_npmUser":{"name":"teknicus","email":"npm@thomasrob.in"},"directories":{},"maintainers":[{"name":"teknicus","email":"npm@thomasrob.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dagr_0.0.2_1769395855493_0.08248254828273338"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-26T02:44:05.879Z","modified":"2026-01-26T02:50:55.752Z","0.0.1":"2026-01-26T02:44:06.140Z","0.0.2":"2026-01-26T02:50:55.635Z"},"author":{"name":"teknicus"},"license":"ISC","keywords":["agent swarm","harness","nats","multi-agent","claude-code","opencode"],"description":"Distributed Agent Runtime (DAgR) - The Distributed Harness for Autonomous Agents","maintainers":[{"name":"teknicus","email":"npm@thomasrob.in"}],"readme":"# DAgR: Distributed Agent Runtime\n\n> **A serverless execution environment for autonomous AI agents.**\n\nDAgR provides a runtime where agents can schedule themselves, spawn sub-agents, and coordinate across time without keeping a process alive. It decouples agent logic from execution infrastructure, enabling truly ephemeral, distributed agent swarms.\n\n## ✨ Features\n\n*   **Ephemeral Agents**: Agents that run, act, and exit—persisting only their state and schedule.\n*   **Time Travel**: Native scheduling. Agents can suspend themselves and wake up minutes or days later.\n*   **Swarm Coordination**: Spawn sub-agents to parallelize work across a distributed mesh.\n*   **Serverless Native**: Built on NATS JetStream for durability, exactly-once delivery, and scale.\n\n## 🚀 Installation\n\n```bash\nnpm install -g @addbrain/dagr\n```\n\n## 💻 Usage\n\nThe `dagr` CLI is your gateway to the runtime. It is designed to be used by both humans and agents (via `bash` tool use).\n\n### Starting an Agent\nStart a local agent session (similar to Claude Code) but with DAgR superpowers enabled.\n\n```bash\ndagr start --agent claude-code\n```\n\n### Registration (Service Discovery)\nRegister a specialist agent so others can find it. This uses NATS KV for service discovery.\n\n```bash\ndagr register specialist \\\n  --name stock-analyst \\\n  --description \"Analyzes stock market data and Reddit sentiment\" \\\n  --topic agents.specialist.stock-analyst \\\n  --config ./agents/stock-analyst/config.md\n```\n\n### Discovery\nFind available specialists in the mesh.\n\n```bash\ndagr list specialists\n# Output:\n# - stock-analyst: \"Analyzes stock market data...\"\n```\n\n### Spawning Sub-Agents\nTrigger a specialist to perform a task.\n\n```bash\ndagr spawn stock-analyst \\\n  --context \"Check GME sentiment on Reddit\" \\\n  --reply-to agents.main.results\n```\n\n### Lifecycle Management\nAgents can choose to suspend execution and satisfy the \"Context Penalty\" by exiting completely.\n\n```bash\ndagr suspend \\\n  --until \"2026-01-22T18:00:00\" \\\n  --resume-context \"Check for stock analyst results\"\n```\n*The agent process terminates. The runtime schedules a wake-up event. When the time comes, a fresh container is spun up with the restored state.*\n\n## 🏗 Architecture\n\nDAgR is built on **NATS JetStream** and **Synadia Nex**.\n\n*   **Messaging**: All agent coordination happens via NATS subjects (`agents.{type}.{id}`).\n*   **State**: Persistent state is stored in NATS Key-Value (KV) buckets.\n*   **Execution**: **Nex** (NATS Execution Engine) listens to topics and spawns workloads (containers/WASM) on demand.\n\n---\n*Distributed Agent Runtime (DAgR) — The Distributed Harness for Autonomous Agents*\n","readmeFilename":"README.md"}