freshcrate
Home > MCP Servers > hrafn

hrafn

Lightweight, modular AI agent runtime โ€” thinks (Hrafn) and remembers (MuninnDB) ๐Ÿฆโ€โฌ›

Description

Lightweight, modular AI agent runtime โ€” thinks (Hrafn) and remembers (MuninnDB) ๐Ÿฆโ€โฌ›

README

Hrafn

hrafn

Lightweight, modular AI agent runtime. Hrafn thinks. MuninnDB remembers.

CI License Release

Quickstart ยท Architecture ยท Contributing ยท Discussions


What is Hrafn?

Hrafn is an autonomous AI agent runtime written in Rust. It connects to the messaging platforms you already use (Telegram, Discord, WhatsApp, Signal, Matrix, and more), runs on hardware as small as a Raspberry Pi, and keeps your data local.

Unlike monolithic agent frameworks, Hrafn is modular by design. You compile only what you need. Runtime extensibility comes through MCP -- every MCP server is a plugin.

Why Hrafn?

Modular, not monolithic. Channels, tools, providers, and memory backends are Cargo features. The default build is small. You opt in to what you need.

MCP as the plugin protocol. No custom plugin API. Any MCP server works as a Hrafn plugin, in any language. The OpenClaw Bridge lets you test OC plugins via MCP before porting them to native Rust.

MuninnDB. Cognitive memory with Ebbinghaus-curve decay and Hebbian association learning. The Dream Engine consolidates memories via local LLM inference (Ollama), so your data never leaves your machine.

A2A protocol. Native Agent-to-Agent communication. Discover, delegate, and receive tasks from other agents over HTTP using the open A2A standard.

Community-first governance. Every PR gets a response within 48 hours. No silent closes. Public roadmap. Weekly community calls. See CONTRIBUTING.md for our promises.

Quickstart

# Install from source
git clone https://github.com/5queezer/hrafn.git
cd hrafn
cargo build --release --locked
cargo install --path . --force --locked

# Guided setup
hrafn onboard

# Or quick start
hrafn onboard --api-key "sk-..." --provider openrouter

# Start the gateway (web dashboard + webhook server)
hrafn gateway

# Chat directly
hrafn agent -m "Hello, Hrafn!"

# Interactive mode
hrafn agent

# Full autonomous runtime
hrafn daemon

# Diagnostics
hrafn status
hrafn doctor

Minimal feature build

# Full default build (all channels, tools, gateway, metrics)
cargo build --release --locked

# Selective channels: only Telegram + shell, no Matrix/Nostr/WhatsApp
cargo build --no-default-features --features "desktop,channel-telegram,tool-shell"

# Stripped-down ESP32 build (no CLI, no gateway, no optional channels)
cargo build --bin hrafn-esp32 --no-default-features --features target-esp32

Architecture

Hrafn's architecture is trait-based. Every subsystem is a Rust trait. Swap implementations through configuration, not code changes.

src/
โ”œโ”€โ”€ agent/         # Orchestration loop
โ”œโ”€โ”€ config/        # TOML configuration
โ”œโ”€โ”€ providers/     # LLM backends          โ†’ Provider trait
โ”œโ”€โ”€ channels/      # Messaging platforms    โ†’ Channel trait
โ”œโ”€โ”€ tools/         # Agent capabilities     โ†’ Tool trait
โ”œโ”€โ”€ memory/        # Persistence            โ†’ Memory trait
โ”œโ”€โ”€ gateway/       # HTTP/WS control plane
โ”œโ”€โ”€ security/      # Policy, secrets, audit
โ”œโ”€โ”€ hardware/      # Device discovery, I2C/SPI/GPIO
โ”œโ”€โ”€ peripherals/   # Peripheral management  โ†’ Peripheral trait
โ”œโ”€โ”€ runtime/       # Runtime adapters       โ†’ RuntimeAdapter trait
โ”œโ”€โ”€ observability/ # Metrics, tracing
โ”œโ”€โ”€ plugins/       # WASM plugin runtime
โ”œโ”€โ”€ daemon/        # Background service
โ”œโ”€โ”€ skills/        # Skill management
โ”œโ”€โ”€ rag/           # Retrieval-augmented generation
โ”œโ”€โ”€ hooks/         # Lifecycle hooks
โ”œโ”€โ”€ cron/          # Scheduled tasks
โ”œโ”€โ”€ identity/      # Identity management
โ”œโ”€โ”€ tunnel/        # Tunnel/relay support
โ””โ”€โ”€ ...            # approval, auth, commands, cost, doctor, hands, health,
                   # heartbeat, integrations, nodes, onboard, routines,
                   # service, skillforge, sop, trust, verifiable_intent

Compile-time modularity

Every channel, tool, and subsystem is gated behind a Cargo feature. The desktop feature bundles everything needed for a full CLI build; opt-in features add extra backends.

Feature Default Description
desktop Yes Full CLI + interactive features (depends on gateway)
gateway Yes HTTP/WebSocket gateway server (axum/hyper/tower)
Channels
channel-telegram Yes Telegram bot channel
channel-discord Yes Discord bot channel
channel-whatsapp Yes WhatsApp Cloud API channel
channel-signal Yes Signal messenger channel
channel-matrix No Matrix/Element E2EE channel
channel-nostr No Nostr protocol channel
channel-lark No Lark/Feishu channel
channel-feishu No Alias for channel-lark
whatsapp-web No Native WhatsApp Web client (wa-rs)
Tools
tool-shell Yes Shell command execution tool
tool-a2a Yes Agent-to-Agent protocol tool + gateway routes
Memory
memory-muninndb Yes MuninnDB memory backend
Observability
observability-prometheus Yes Prometheus metrics
observability-otel No OpenTelemetry tracing
Hardware
hardware No USB device discovery + serial
peripheral-rpi No Raspberry Pi GPIO
probe No probe-rs debug probe support
Sandbox
sandbox-landlock No Linux Landlock sandboxing
sandbox-bubblewrap No Bubblewrap sandboxing
Other
browser-native No Fantoccini WebDriver backend
voice-wake No Voice wake word detection
plugins-wasm No WASM plugin runtime (extism)
skill-creation Yes Autonomous skill creation
rag-pdf No PDF ingestion for RAG
webauthn No WebAuthn/FIDO2 auth
target-esp32 No Stripped-down ESP32-S3 build

Use --no-default-features and opt in to individual features for minimal builds. Configuring a disabled module logs a warning at startup.

Runtime extensibility

Any MCP server is a plugin. Configure in config.toml:

[mcp]
servers = [
  { name = "my-tool", command = "npx", args = ["-y", "my-mcp-server"] },
]

No recompilation needed. MCP plugins can be written in any language.

OpenClaw Bridge

The OC Bridge lets Hrafn users run OpenClaw plugins via MCP without a native Rust port. It serves as a validation funnel: plugins that see sustained community usage get queued for native porting.

OC Plugin โ†’ MCP Adapter (Node.js) โ†’ Hrafn tests it โ†’ Community validates
  โ†’ Port Queue โ†’ Native Rust implementation โ†’ Review & merge

OC Bridge is planned for a future release (M3).

Key Integrations

MuninnDB

Cognitive memory backend with Ebbinghaus-curve decay (memories fade naturally) and Hebbian learning (co-activated memories strengthen each other). The Dream Engine runs periodic consolidation via local LLM inference.

[memory]
backend = "muninndb"

[memory.muninndb]
url = "http://127.0.0.1:8475"   # optional; falls back to MUNINNDB_URL env var
vault = "default"               # optional; falls back to MUNINNDB_VAULT env var
# api_key = "your-api-key"     # optional; falls back to MUNINNDB_API_KEY env var

A2A Protocol

Native Agent-to-Agent communication per the open A2A standard.

[a2a]
enabled = true
bearer_token = "your-secret"
# agent_name = "my-agent"        # defaults to config agent name
# public_url = "https://my-agent.example.com"  # auto-derived from gateway if omitted
# capabilities = ["research", "coding"]

Inbound tasks route through the gateway server and the existing agent pipeline (A2A uses the same gateway port; no separate bind). The agent card is auto-generated from your configuration.

Roadmap

See the GitHub Projects board for current status.

Contributing

We believe open-source communities deserve transparent governance and respect for contributors' work. Read CONTRIBUTING.md for our promises and workflow.

The short version:

  • Every PR gets a response within 48 hours.
  • No silent closes. Rejections come with explanations.
  • Your code stays your code. Maintainers never re-submit contributor work under their own name.

Community

  • GitHub Discussions -- questions, RFCs, show & tell
  • Weekly community calls (schedule in Discussions)

Origin

Hrafn originated as a fork of ZeroClaw (Apache-2.0). We thank the ZeroClaw contributors for the foundation.

License

MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE. You retain copyright of your contributions.

memory-muninndb feature gate: Enabling this feature pulls in MuninnDB, which is licensed under BSL 1.1 (not open source) and patent pending (U.S. Provisional Application No. 63/991,402). Commercial use of MuninnDB requires a separate license. See muninndb.com for details.

Release History

VersionChangesUrgencyDate
master@2026-04-18Latest activity on master branchHigh4/18/2026
v0.1.0-beta.99Latest release: v0.1.0-beta.99High4/11/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

edgecrabEdgeCrab ๐Ÿฆ€ A Super Powerful Personal Assistant inspired by NousHermes and OpenClaw โ€” Rust-native, blazing-fast terminal UI, ReAct tool loop, multi-provider LLM support, ACP protocol, gateway adaptersv0.7.0
Boucle-frameworkAutonomous agent framework with structured memory, safety hooks, and loop management. Built by the agent that runs on it.v0.12.0
Awareness-LocalLocal-first AI agent memory โ€” one command, works offline, no account needed. Give your Claude Code, Cursor, Windsurf, OpenClaw agent persistent memory. Markdown storage, hybrid search (FTS5 + embeddinmain@2026-04-20
moltisA secure persistent personal agent server in Rust. One binary, sandboxed execution, multi-provider LLMs, voice, memory, Telegram, WhatsApp, Discord, Teams, and MCP tools. Secure by design, runs on you20260420.02
openyakๅผ€ๆบ็‰›ๅญ Rust-first local coding-agent CLI with a local /v1/threads server, plugins/skills, and Python/TypeScript SDK alphas.main@2026-04-11