Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
An agent focused on attention management
| Date | Stars |
|---|---|
| 2026-07-31 | 1121 |
| 2026-08-03 | 1121 |
| 2026-08-06 | 1121 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Krebs
> A self-hosted AI gateway with a general-purpose agent at its core.
[](#)
[](#)
**An agent focused on attention management**
---
## Features
| | | |
|:---|:---|:---|
| 🤖 **General Purpose Agent** | Stateful AI assistant with multi-turn dialogue, tool execution, and skill invocation | |
| 📦 **Context Compression** | Intelligent compression to break token limits (via pi-coding-agent) | |
| 🌐 **Browser UI** | Real-time chat, Markdown rendering, no account needed | |
| 🔌 **HTTP / WebSocket API** | One `POST /api/messages` for CI/CD, scripts, integrations | |
| 💾 **Persistent Sessions** | Resume any past conversation by `sessionId` | |
| 🔧 **Tools & Lua** | Drop a `.lua` in `lua-tools/`, agent can call it immediately | |
| 🧩 **Skills** | 7 built-in skills the agent reads in relevant contexts | |
| 🔄 **Multi-Model** | Switch between DeepSeek / Claude with one env var | |
| 🏖️ **Sandbox** | WASM-based write command sandbox (wasmtime + coreutils) | |
| 🧠 **Memory** | Two-phase memory: 50% trigger consolidation, session start injection | |
| 📚 **Session History RAG** | BM25 retrieval of relevant past sessions at perception phase | |
| 🎯 **Goal Constraint** | Auto-detect conversation drift and inject correction messages |
| ✅ **Self-Verification** | Post-response verification that checks alignment with original task, injects corrections on drift |
| 🤖 **Subagent** | Launch autonomous sub-agents, Task queue, Fleet view, Scheduled recurring tasks |
### Context Compression Layers
```
Token Usage
│
├── Perception ── Session History RAG ──── Inject relevant past sessions (BM25)
│
├── 50% ─── Memory ───────────── Consolidate to MEMORY.md
│
├── 70% ─── Micro Compact ───── Prune old tool outputs
│
├── 75% ─── Context Collapse ── Summarize dialogue to projection
│
└── 83.5% ─ Auto Compact ────── Built into pi-coding-agent
Perception Phase ── Goal Constraint ───────── Monitor drift, inject correction
```
### Sandbox (Write Command Isolation)
Write commands execute in a WASM sandbox via `wasmtime` + `coreutils.wasm`:
| Type | Commands | Routing |
|:-----|:---------|:-------|
| Read | `ls`, `cat`, `grep`, `find` | Passthrough to bash |
| Write | `echo`, `mkdir`, `rm`, `cp`, `mv` | WASM sandbox |
- Sandbox restricts file system access to `cwd` via `--dir` flag
- Read commands bypass sandbox for full shell capabilities
- Only simple commands supported (no pipes, redirects, or chaining)
### Memory (Two-Phase Consolidation)
```
50% Token ──► LLM Summarize ──► MEMORY.md (append)
Session Start ──► Read MEMORY.md ──► Inject into systemPrompt
```
- **Write Phase**: At 50% token usage, LLM generates a summary of recent messages → appends to `MEMORY.md`
- **Read Phase**: On session start, `MEMORY.md` content is injected into agent's system prompt
- **Rollback**: Sessions can invalidate prior consolidations via session entries
### Session History RAG (Perception Phase)
```
User Message → before_agent_start → BM25 retrieval → Inject relevant past sessions
```
- **Timing**: `before_agent_start` hook (perception phase), once per session
- **Retrieval**: BM25 algorithm matches current query with historical session firstQuestions
- **Injection**: Top-2 relevant sessions (1000 chars each) formatted and injected into systemPrompt
- **Protection**: Skip if context >80% full, skip on intent (restart/clear), 3s timeout
### Goal Constraint (Perception Phase)
```
Context Event → Token threshold detection → Drift detection → Inject correction
```
- **Goal Extraction**: At 25%/40%/55% token thresholds, LLM extracts core goal from conversation history
- **Drift Detection**: BM25 hybrid scoring (keyword weight 0.6 + semantic weight 0.4) compares current dialogue with goal
- **Correction Injection**: On drift detection, prepend `[GOAL CONSTRAINT]` correction message to messExcerpt of 17,161 characters
Read on GitHub78
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:c5c10733a4d027cb, llm:Repository description: 'An agent focused on attention management' (no topics, JavaScript).