Durable agent runtime. Sessions survive crashes. Agents are just files. One binary, zero dependencies.
Detail proyek
duragent
Durable agent runtime. Sessions survive crashes. Agents are just files. One binary, zero dependencies.
README
Duragent
Duragent — A durable, self-contained runtime for AI agents.
Sessions survive crashes. Agents are just files. One binary, zero dependencies.
Use it as a personal AI assistant, or as the foundation for agent-powered products.
| What you get | How |
|---|---|
| Sessions that survive crashes | Append-only event log, attach/detach like tmux |
| Agents you can read and version | YAML + Markdown — no code required |
| State you can inspect | Just files on disk — cat, grep, git diff |
| Deploy anywhere | Single binary, ~10MB, no Python/Node/Docker |
| Your choice of parts | Swap LLM providers, gateways, and storage backends or bring your own |
Quick Start
1. Install and initialize
Download a prebuilt binary from GitHub Releases (Linux x86_64, macOS Intel/ARM), or build from source:
cargo install --git https://github.com/giosakti/duragent.git
duragent init
# Follow the interactive setup
2. Authenticate
export OPENROUTER_API_KEY=your-key # or: duragent login anthropic
3. Chat with your agent (server starts automatically)
duragent chat --agent <YOUR_AGENT_NAME>
4. Attach to a session later
duragent attach --list # List attachable sessions
duragent attach SESSION_ID # Reconnect to existing session
Features
- Durable sessions — crash, restart, reconnect; your conversation survives
- Portable agent format — define agents in YAML + Markdown; inspect, version, and share them
- Memory — agents recall past conversations, remember experiences, and reflect on long-term knowledge
- Tools — bash execution, CLI tools, web search/fetch, scheduled tasks, and background processes, with configurable approval policies
- Skills — modular capabilities defined as Markdown files (Agent Skills standard)
- Context management — token budgeting, history truncation, and priority-based context rendering
- Multiple LLM providers — Anthropic, OpenAI, OpenRouter, Ollama
- Platform gateways — Telegram and Discord via subprocess plugins; group chat with mention gating and debouncing
- HTTP API — REST endpoints with SSE streaming
- Operational tooling —
duragent doctorfor diagnostics,duragent upgradefor self-update
Modular by Design
Use the built-ins, or swap in your own:
| Component | Default | Swappable |
|---|---|---|
| Gateways | CLI, HTTP, SSE, Telegram, Discord | Any platform via gateway plugins |
| LLM | OpenRouter | Anthropic, OpenAI, Ollama, or any provider |
| Sandbox | Trust mode | bubblewrap, Docker (planned) |
| Storage | Filesystem | Postgres, S3 (planned) |
Workspace Layout
./.duragent/
├── agents/<agent-name>/
│ ├── agent.yaml # Agent definition (Duragent Format)
│ ├── SOUL.md # "Who the agent IS" (identity and personality)
│ ├── SYSTEM_PROMPT.md # "What the agent DOES" (core system prompt)
│ ├── INSTRUCTIONS.md # Additional runtime instructions (optional)
│ ├── policy.yaml # Tool execution policy (optional)
│ ├── skills/ # Modular capabilities (SKILL.md files)
│ ├── tools/ # Agent-specific auto-discovered tools
│ └── memory/
│ ├── MEMORY.md # Curated long-term memory
│ └── daily/ # Daily experience logs
├── sessions/
│ └── <session_id>/
│ ├── events.jsonl # Append-only event log
│ └── state.json # Snapshot for fast resume
├── tools/ # Workspace-level auto-discovered tools
├── schedules/ # Scheduled tasks and run logs
├── processes/ # Background process metadata and logs
└── memory/
└── world/ # Shared knowledge across all agents
Documentation
Read the Duragent Guide for installation, configuration, and usage.
For contributors: CONTRIBUTING.md | Project Status | Internal Specs