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 |
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 setupexport OPENROUTER_API_KEY=your-key # or: duragent login anthropicduragent chat --agent <YOUR_AGENT_NAME>duragent attach --list # List attachable sessions
duragent attach SESSION_ID # Reconnect to existing session- 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
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) |
./.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
Read the Duragent Guide for installation, configuration, and usage.
For contributors: CONTRIBUTING.md | Project Status | Internal Specs