</>MCP Agents Market
Agent

Krebs

by canwhite1.1kJavaScriptUpdated 2026-07-29

An agent focused on attention management

Krebs is a self-hosted AI gateway featuring a stateful general-purpose AI agent focused on attention management through intelligent context compression and drift detection. The agent supports multi-turn dialogue, tool execution via Lua scripts, and autonomous subagent spawning for task delegation. It provides both a browser UI and HTTP/WebSocket APIs for integration with CI/CD pipelines and scripts. Built on Bun and TypeScript, Krebs includes advanced features like BM25-based session history retrieval, two-phase memory consolidation, goal constraint monitoring, and self-verification to maintain conversation coherence even during long sessions.

Key Features

Multi-layered context compression with automatic triggers at 50%, 70%, 75%, and 83.5% token thresholds to break token limits
Autonomous subagent system with fleet management, task queuing, and cron/interval scheduling for recurring jobs
Two-phase memory consolidation that summarizes conversations to MEMORY.md at 50% token usage and reinjects on session start
BM25 session history RAG retrieval that injects relevant past conversations during perception phase
Goal constraint monitoring with drift detection using hybrid BM25 scoring and automatic correction injection
WASM-based sandbox for write commands (echo, mkdir, rm, cp, mv) with wasmtime isolation
Self-verification post-response checking with up to 5 retry attempts to ensure alignment with original tasks
Extensible Lua tooling system where dropping .lua scripts into lua-tools/ makes them immediately callable by the agent

Use Cases

  • 01Building CI/CD automation workflows that require stateful multi-turn AI assistance with context preservation
  • 02Orchestrating complex task hierarchies by spawning specialized subagents for parallel work execution
  • 03Managing long-running research or analysis sessions where conversation drift needs automatic detection and correction
  • 04Creating scheduled AI-driven monitoring jobs using cron or interval-based task automation
  • 05Integrating custom tools via Lua scripts for domain-specific operations within AI workflows
  • 06Developing conversational applications that maintain coherent memory across extended dialogue sessions

Related Agents

View more

Krebs — FAQ

What is Krebs?+

Krebs is a self-hosted AI gateway with a general-purpose agent that focuses on attention management through context compression, memory consolidation, and drift detection. It supports both DeepSeek and Claude models and provides HTTP/WebSocket APIs alongside a browser UI.

How do I install and run Krebs?+

Install dependencies with bun install, set your DEEPSEEK_API_KEY or ANTHROPIC_API_KEY environment variable, then run bun run server/index.ts. The server starts on port 3333 by default and a bearer token is printed to the console on first launch.

What API keys or prerequisites does Krebs require?+

Krebs requires either a DeepSeek API key (DEEPSEEK_API_KEY) or an Anthropic API key (ANTHROPIC_API_KEY). You'll also need Bun runtime installed, and optionally wasmtime if using the write command sandbox feature.

Which AI clients or platforms work with Krebs?+

Krebs is a standalone agent with its own web UI and APIs rather than a plugin for existing clients. You interact with it through its browser interface at localhost:3333, HTTP POST requests to /api/messages, or WebSocket connections to /ws.

Is Krebs free to use?+

Krebs itself is open-source under the MIT license and free to use. However, you'll incur costs from the underlying AI model provider (DeepSeek or Anthropic) based on your API usage.

How does the subagent system work?+

The agent can spawn autonomous subagents using the Agent tool, manage task queues with TaskCreate/TaskExecute, and schedule recurring jobs via the Schedule tool. FleetView lets you monitor all running agents, and you can steer subagents mid-execution or retrieve their results.

How do I install Krebs?+

Open the source repository on GitHub and follow its README. Krebs is a agent — MCP Agents Market links you directly to the official repo.

Is Krebs free?+

Krebs is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches