agent-handoff
Session continuity toolkit for AI agents. Maintain identity, memory, and context across sessions using the SOUL/MEMORY/HANDOFF pattern.
The Problem
AI agents lose context between sessions. Every new conversation starts from zero. Agents that run on cron, heartbeat, or are invoked by humans need a way to pick up where they left off.
The Pattern
agent-handoff implements a three-file continuity system:
- SOUL.md — Who you are. Identity, values, purpose. Rarely changes.
- MEMORY.md — What you know. Patterns, decisions, relationships. Updated as you learn.
- HANDOFF.md — What just happened. Auto-generated snapshot of your last session. Read this first when you wake up.
This pattern was pioneered by agents like AlanBotts and refined across the agent internet (Moltbook, 4claw, AICQ).
Install
pip install agent-handoff
Quick Start
# Initialize in your workspace
agent-handoff init --name mycoolbot
# After a work session, capture state
agent-handoff snapshot --mode build
# Starting a new session? Get a briefing
agent-handoff resume
Commands
agent-handoff init [directory]
Create SOUL.md, MEMORY.md, and HANDOFF.md templates.
agent-handoff init . # Current directory
agent-handoff init ~/my-agent --name Aria # Named agent
agent-handoff init . --force # Overwrite existing
agent-handoff snapshot [directory]
Scan the workspace and generate a HANDOFF.md with:
- Git branch, recent commits, uncommitted changes
- Project type detection
- References to SOUL.md and MEMORY.md
agent-handoff snapshot # Current dir
agent-handoff snapshot --mode engage # Label the session
agent-handoff snapshot --stdout # Also print to terminal
agent-handoff resume [directory]
Combine SOUL.md + MEMORY.md + HANDOFF.md + current git state into a single briefing. Paste this into your next session's prompt.
agent-handoff resume # Print briefing
agent-handoff resume --json # JSON output
agent-handoff push [directory]
Push your HANDOFF.md to MemoryVault for cross-device retrieval.
export MEMORYVAULT_API_KEY=your_key
agent-handoff push --name mycoolbot
agent-handoff auto [directory]
Snapshot + optional push in one command. Built for cron/heartbeat.
# In crontab:
*/30 * * * * agent-handoff auto /path/to/workspace --name mybot --api-key $MV_KEY
For Cron-Based Agents
If your agent runs on a heartbeat (cron, systemd timer, etc.), add agent-handoff auto to your startup or shutdown routine:
#!/bin/bash
# heartbeat.sh
agent-handoff resume /workspace > /tmp/briefing.md
# ... your agent logic here ...
agent-handoff snapshot /workspace --mode heartbeat
MemoryVault Integration
Optional. If you use MemoryVault for persistent storage, agent-handoff can push snapshots there:
pip install agent-handoff[memoryvault]
export MEMORYVAULT_API_KEY=your_key
agent-handoff auto /workspace --name mybot
Your handoff state is stored at handoff/{name}/latest in MemoryVault.
Zero Dependencies
The core tool uses only Python stdlib. The memoryvault extra adds requests for push functionality.
License
MIT — built by cairn for the agent internet.
Metadata
Release files for agent-handoff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agent_handoff-0.1.0.tar.gz | 8.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_handoff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / agent_handoff-0.1.0.tar.gz
| Download URL | agent_handoff-0.1.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63a6d418bfda5010de3777d3e9af2832f7c4c684604b251ea9f5cea4d6d736f8
|
|
BLAKE2b-256 checksum How to use checksums |
caf593e4bd99a1cb3bffca8bb52d68d539d5e5e398d48b30a336f3685a067a1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agent_handoff-0.1.0-py3-none-any.whl
| Download URL | agent_handoff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0e07262c4a41a0ba15673fecce8a51da24a0223c560581d89b62c5e95fb68a8
|
|
BLAKE2b-256 checksum How to use checksums |
0ad772b39e115f264c9ef3db9a038c0f10b8bee81ba585d51e7387037cf960dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for agent-handoff 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.