Shared operational memory and coordination for mixed AI agent fleets.
Project description
Agent Nerve
Agent Nerve is a local-first shared operations layer for mixed agent fleets.
It gives Claude Code, Codex, Hermes, and custom agents a small common place to:
- write durable task updates
- hand off work across sessions and machines
- claim shared resources before they step on each other
- resume a task from what another agent already did
This is not a vector-memory product. It is an append-only coordination layer with task state, event history, and lease-based claims.
Install
pip install agent-nerve
Why it exists
Most agent tools remember prompts. Fewer solve operational continuity.
The problem people actually hit is:
- one Claude session starts the work
- another Claude or Codex session picks it up later
- a server-side worker like Hermes does the heavy lifting
- nobody has a clean, shared, machine-readable history of what happened, what is still blocked, and who currently owns a risky resource
Agent Nerve is the missing shared log.
What you get
- stdlib-only Python server
- SQLite storage
- bearer-token protected write API
- queued writes for flaky networks
- task records with
next_action - append-only event history
- lease-based claims for shared resources
- built-in redaction for common secrets and user-home paths
- CLI helpers for agents and operators
Quickstart
git clone https://github.com/kyletusing34/agent-nerve.git
cd agent-nerve
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
export AGENT_NERVE_API_KEY="change-me"
agent-nerve serve --host 127.0.0.1 --port 8787
In another terminal:
export AGENT_NERVE_SERVER="http://127.0.0.1:8787"
export AGENT_NERVE_API_KEY="change-me"
agent-nerve task create \
--namespace demo \
--title "Build the launch page" \
--owner claude-code \
--summary "Initial task created"
agent-nerve event emit \
--namespace demo \
--agent claude-code \
--kind progress \
--summary "Read the repo and found the landing page entrypoint" \
--details "Next: patch headline and CTA."
agent-nerve claim acquire \
--namespace demo \
--resource repo:landing-page \
--agent claude-code \
--ttl-seconds 1800 \
--note "Editing homepage hero"
Inspect state:
agent-nerve task list --namespace demo
agent-nerve event tail --namespace demo --limit 20
agent-nerve claim list --namespace demo
Core concepts
Namespace
A namespace is the shared scope for a project, team, or incident.
Examples:
client-acme-siteinfra-maxxxoffer-launch-june
Task
A task is the current durable snapshot:
- title
- status
- owner
- summary
- next action
Event
An event is the historical timeline:
- progress updates
- blockers
- handoffs
- notes
- completion
Claim
A claim is a temporary lease on a shared resource:
- a file or repo section
- a deploy slot
- a migration
- a queue item
Claims expire automatically based on lease_expires_at, so abandoned sessions do
not lock the system forever.
Safe-by-default behavior
Before data is written, Agent Nerve redacts:
sk-...style API keys- bearer tokens
- AWS access key ids
- PEM private-key blocks
- local home-directory paths
You should still keep high-risk secrets out of summaries when possible, but the server adds a defensive scrub instead of trusting every agent to behave.
More detail: docs/security.md
Suggested pattern for Claude Code / Codex / Hermes
- Create or claim the task.
- Emit short progress events at meaningful checkpoints.
- Write blockers as explicit events, not hidden in chat.
- Update
next_actionbefore handing off. - Use claims before editing risky shared resources.
- Release claims when done.
CLI reference
Start server:
agent-nerve serve --host 0.0.0.0 --port 8787 --db ./data/agent_nerve.sqlite3
Create task:
agent-nerve task create --namespace ops --title "Review queue" --owner hermes
Update task:
agent-nerve task update \
--task-id 3 \
--status blocked \
--summary "Waiting on Cloudflare token" \
--next-action "Human restores token"
Emit event:
agent-nerve event emit \
--namespace ops \
--agent codex \
--kind handoff \
--summary "Patched source and need maxxx deploy" \
--details "Source is ready locally; remote deploy still pending."
Acquire claim:
agent-nerve claim acquire \
--namespace ops \
--resource service:lead-intake \
--agent hermes \
--ttl-seconds 900
Release claim:
agent-nerve claim release --claim-id 4
API
Read endpoints:
GET /api/healthGET /api/state?namespace=<name>GET /api/tasks?namespace=<name>GET /api/events?namespace=<name>&limit=100GET /api/claims?namespace=<name>
Write endpoints:
POST /api/tasksPATCH /api/tasks/<id>POST /api/eventsPOST /api/claimsDELETE /api/claims/<id>
Write calls require one of:
Authorization: Bearer <key>X-Agent-Nerve-Key: <key>
Example integrations
See examples/claude-codex-hermes.md
What this is not
- not a central planner
- not a vector store
- not a chat relay
- not a secret store
- not a replacement for repo-local docs or issue trackers
It is the smallest useful shared ops layer between agents.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_nerve-0.1.1.tar.gz.
File metadata
- Download URL: agent_nerve-0.1.1.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1596890088ce3255e1606c7c474576426d6c64723fdac06096e134945c9e5192
|
|
| MD5 |
28c6bc83b1a6842794f87c9e746c47d4
|
|
| BLAKE2b-256 |
d108e9c3ddffc8324f481f127f1a03bb27071233884148729d636ea2725dc29a
|
Provenance
The following attestation bundles were made for agent_nerve-0.1.1.tar.gz:
Publisher:
publish.yml on kyletusing34/agent-nerve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_nerve-0.1.1.tar.gz -
Subject digest:
1596890088ce3255e1606c7c474576426d6c64723fdac06096e134945c9e5192 - Sigstore transparency entry: 1840249212
- Sigstore integration time:
-
Permalink:
kyletusing34/agent-nerve@cb3e622aa29dfe79c9cb667cbc7330762804a836 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kyletusing34
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cb3e622aa29dfe79c9cb667cbc7330762804a836 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_nerve-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agent_nerve-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c99068aff99e60ad14c7d5b0478025fb1fcc96c4d14a39cdf864be5e4db7067
|
|
| MD5 |
a7daa81b73261fa1b21d74bc0fa311ae
|
|
| BLAKE2b-256 |
30f761e61443e30d7985d2900aeccfaefbe45159b25f572308070f5997bb0fba
|
Provenance
The following attestation bundles were made for agent_nerve-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on kyletusing34/agent-nerve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_nerve-0.1.1-py3-none-any.whl -
Subject digest:
0c99068aff99e60ad14c7d5b0478025fb1fcc96c4d14a39cdf864be5e4db7067 - Sigstore transparency entry: 1840249241
- Sigstore integration time:
-
Permalink:
kyletusing34/agent-nerve@cb3e622aa29dfe79c9cb667cbc7330762804a836 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kyletusing34
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cb3e622aa29dfe79c9cb667cbc7330762804a836 -
Trigger Event:
release
-
Statement type: