roger

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: MIT

README

Roger

CI Release Go Report Card

You give the task. Roger handles it.

Roger is a self-hosted AI agent gateway for teams that need to own their infrastructure. It connects your channels to your models, runs your tools, and gets work off your desk — on your hardware, under your control, with no cloud dependency.

Single Go binary. 15MB. Runs as a systemd service. Works while you sleep.

┌─────────────┐     ┌──────────────────────────────────────────┐     ┌──────────────┐
│  Telegram    │     │                Roger                     │     │  Anthropic   │
│  Discord     │────▶│                                          │────▶│  OpenAI      │
│  Slack       │     │  Agent Loop ─ Tools ─ Sessions ─ Cron   │     │  Copilot     │
│  HTTP API    │◀────│                                          │◀────│  Ollama      │
│  Webhooks    │     │  MCP Server ─ Gateway ─ Orchestrator     │     │  OpenRouter  │
└─────────────┘     └──────────────┬───────────────────────────┘     └──────────────┘
                                   │
                           ┌───────▼───────┐
                           │    Eidetic     │
                           │    Semantic    │
                           │    Memory      │
                           └───────────────┘

Why Roger?

You can't always use a managed agent. Regulated industries, air-gapped networks, defense systems, data sovereignty requirements — sometimes the work has to stay on your hardware. Roger gives you the same capabilities as managed AI agent platforms, fully self-hosted.

Model independence. Route to Anthropic, OpenAI, GitHub Copilot, Ollama, OpenRouter, Groq, or any OpenAI-compatible endpoint. Swap providers without changing your workflow. Run local models when you need to.

Work off the desk, not onto it. Roger doesn't generate briefings for you to read. It takes tasks and finishes them. Cron jobs run overnight. Multi-agent orchestration breaks complex work into parallel subtasks. You check in when you're ready.

Auditable by design. CycloneDX SBOM on every release. govulncheck and gosec on every build. Six direct dependencies. One binary to audit.


Quick Start

# Install from GitHub Releases (deb)
curl -LO https://github.com/EMSERO/roger/releases/latest/download/roger_0.6.0_linux_amd64.deb
sudo dpkg -i roger_0.6.0_linux_amd64.deb

# First-time setup
roger init

# Run
roger

# As a systemd user service
systemctl --user enable --now roger

# Update
roger update

Or build from source:

go build -o roger ./cmd/roger
go build -o roger-mcp ./cmd/roger-mcp

Requires Go 1.26+.


What Roger Does

Multi-provider model routing with automatic fallback. Primary model goes down? Roger falls through to the next configured provider with exponential backoff and cooldown tracking.

Three-tier multi-agent orchestration. Main agent handles simple requests. Orchestrator plans complex work as a JSON task graph. Specialists execute in parallel with dependency ordering and failure handling.

Persistent sessions with JSONL history, TTL, token-aware pruning, daily/idle resets, and LLM-powered context compaction.

Cron scheduler with @daily, @hourly, @every 1h, HH:MM specs, per-job model/timeout overrides, deterministic stagger, and result delivery to channels.

Tool execution including shell commands (with destructive command confirmation), web search/fetch (with SSRF protection), file I/O, browser automation (chromedp), and semantic memory.

Semantic memory via Eidetic — self-hosted on PostgreSQL + pgvector. Your agents remember things across conversations, forever, on your hardware.

Hot-reload via fsnotify — edit config.json and changes apply without restart.


MCP Server

Roger ships roger-mcp, a standalone MCP server binary that exposes its tools to Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.

{
  "mcpServers": {
    "roger": {
      "command": "/usr/bin/roger-mcp",
      "args": ["--config", "~/.roger/config.json"]
    }
  }
}

Available tools: browser automation (navigate, screenshot, click, type, eval, scrape), semantic memory (search, append), web search/fetch, file I/O, notifications.


Channels

Roger connects to your messaging platforms as a persistent agent:

  • Telegram — bot with debounce queue, reactions, pairing, slash commands
  • Discord — bot with thread support
  • Slack — Socket Mode bot
  • HTTP API — OpenAI-compatible /v1/chat/completions endpoint
  • Webhooks — inbound event triggers per session

Security

  • govulncheck on every PR and release
  • gosec static analysis
  • CycloneDX SBOM attached to every release artifact
  • Destructive command confirmation — blocklist intercepts dangerous commands before execution
  • SSRF protection — blocks requests to private, loopback, and link-local addresses
  • Gateway auth — bearer token required, auto-generated if not configured
  • Rate limiting — per-IP token-bucket limiting
  • Telegram pairing — random 6-digit code required

Eidetic Integration

{
  "eidetic": {
    "enabled": true,
    "baseURL": "http://localhost:7700",
    "apiKey": "your-key"
  }
}

Eidetic gives your agents persistent semantic memory — search by meaning, not just keywords. Self-hosted on PostgreSQL + pgvector + Ollama. No cloud required.


Migrating from OpenClaw

Roger can import your existing OpenClaw configuration and sessions. Run roger --migrate or roger init to migrate automatically.


Acknowledgements

Special thanks to Nate B Jones whose videos on AI agents and autonomous workflows helped inspire both Roger and Eidetic.


Built by EMSERO — software engineering for defense, federal, and commercial systems.

Directories

Path Synopsis
cmd
roger command
roger-mcp command
internal
agent
Package agent — compaction.go implements LLM-powered context compaction (REQ-400, REQ-401).
Package agent — compaction.go implements LLM-powered context compaction (REQ-400, REQ-401).
agentapi
Package agentapi defines the shared interfaces and types used across the agent, tools, orchestrator, gateway, and cron packages.
Package agentapi defines the shared interfaces and types used across the agent, tools, orchestrator, gateway, and cron packages.
channels/common
Package common – chunker.go provides code-fence-aware message splitting.
Package common – chunker.go provides code-fence-aware message splitting.
commands
Package commands provides a unified slash-command handler shared by all channels.
Package commands provides a unified slash-command handler shared by all channels.
cron
Package cron provides a lightweight cron-like scheduler for agent jobs.
Package cron provides a lightweight cron-like scheduler for agent jobs.
digest
Package digest generates periodic summaries of recent Eidetic memories and delivers them to channel bots.
Package digest generates periodic summaries of recent Eidetic memories and delivers them to channel bots.
eidetic
Package eidetic implements a thin HTTP client for the Eidetic memory service.
Package eidetic implements a thin HTTP client for the Eidetic memory service.
embeddings
Package embeddings provides a thin wrapper around OpenAI-compatible /v1/embeddings endpoints for generating vector embeddings.
Package embeddings provides a thin wrapper around OpenAI-compatible /v1/embeddings endpoints for generating vector embeddings.
heartbeat
Package heartbeat implements periodic agent turns that check a HEARTBEAT.md checklist and optionally deliver results to channel bots.
Package heartbeat implements periodic agent turns that check a HEARTBEAT.md checklist and optionally deliver results to channel bots.
hooks
Package hooks provides an event-driven lifecycle hook system for Roger.
Package hooks provides an event-driven lifecycle hook system for Roger.
initialize
Package initialize implements the `roger init` first-run wizard.
Package initialize implements the `roger init` first-run wizard.
log
migrate
Package migrate converts OpenClaw session history to Roger format.
Package migrate converts OpenClaw session history to Roger format.
security
Package security implements the security audit system (REQ-440).
Package security implements the security audit system (REQ-440).
session
Package session — writelock.go implements file-based session write locks (REQ-460).
Package session — writelock.go implements file-based session write locks (REQ-460).
skills/builtin
Package builtin provides embedded SKILL.md files for built-in skills.
Package builtin provides embedded SKILL.md files for built-in skills.
updater
Package updater checks for new Roger releases and self-updates the binary.
Package updater checks for new Roger releases and self-updates the binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL