nined-agents package gives you a single Agent class that handles the entire lifecycle of an AI agent: storing and searching memory, managing tasks with a full audit trail, handing off to other agents, and running autonomous worker loops.
Installation
Quick start
Constructor
Modes
| Mode | Capabilities |
|---|---|
safe | Memory + task management |
team | Everything in safe + handoffs, locks, multi-agent coordination |
autonomous | Everything in team + worker loops, escalation, full governance contracts |
Memory
Tasks
Start a task
Check what’s allowed next
Work on, complete, or fail
Coordination (team and autonomous modes)
Worker loop (autonomous mode)
Run the agent as a continuous worker that claims and processes tasks automatically.
on_task returns {"done": True}, the worker completes the task and claims the next one. When it returns {"release": True}, it releases without completing — useful for tasks that need a different worker type.
Observability
Full example — incident response agent
agent.get_timeline(task_id).