leantoken
Code intelligence for agents: find the code that matters and keep your context window and tokens lean.
- 178
- Rust
- Apache-2.0
- 2 d ago
Code intelligence for agents: find the code that matters and keep your context window and tokens lean.
Cost-efficient coding-agent runtime: prefix-aware prompt-cache routing, poisoning-safe semantic cache, budgeted context compression, request batching/dedup, cascading model routing with DP-optimal policies, hard budget scheduling, span-level cost attribution, sandboxed tools, synthetic workload factory. NumPy core, CPU-only torch extra.
Self-hosted model routing gateway and agent control plane for OpenAI, Anthropic, Gemini and A2A agents behind one OpenAI-compatible API, protocol-first. MCP server security, governed tools, prompt enhancement, virtual-key budgets, cache, observability, audit chain and agent governance. Zero-key local first run; public preview.
Embeddable, zero-dependency durable execution for agents and NHEs. Deterministic replay, retries, cycle detection, a token budget, and a multi-agent task board, with no sidecar service.
Cross-platform prompt refinement for Codex, Gemini CLI, and Claude Code, plus Claude-native context guard and telemetry statusline plugins. Portable refine-gate binds vague prompts to evidence; optional hooks enforce checkpoints, track subagent spend, and surface context and quota telemetry.
Open-source deployment and governance control plane for internal AI agents — hosts each agent, scopes its tools and domains, meters token spend against budgets, and gives IT a kill switch and audit trail. TypeScript monorepo (CLI, runtime, Convex + Hono control plane).
TypeScript SDK that adds cost limits, token/call budgets, timeouts, and circuit breakers to AI agent/LLM workflows, with adapters for OpenAI, Anthropic, Vercel AI, and observability/reporting support.
Text generation model, used with transformers.
Context engineering for AI agents: decide what goes into the model's window — knowledge, memory, history — within a token budget, with a trace and an eval that proves it. In design.
Text generation model, used with transformers.
Context window selection for LLM coding tools. Treats context as a constrained optimization problem, not retrieval.
Text generation model, used with transformers.
Image text to text model, used with transformers.
Token Squeezer — compress LLM prompts, plan token budgets, and measure what survives. Offline BPE tokenizer built from scratch, 5-stage prompt compression, budget planner, retention benchmark. Saves ~19% tokens with 100% keyword retention. Python, no API key.
Image text to text model, used with transformers.
Text generation model, used with transformers.
Image text to text model, used with transformers.
Text generation model, used with transformers.
Image text to text model, used with transformers.
Level-2 recursive meta-harness auditing agent skills, token budgets, invariants, and hooks
Image text to text model, used with transformers.
Token-capped 4-step search funnel & attention protection eliminating context rot for AI agents
Text generation model, used with transformers.
Experiment on budgeting a fleet of coding agents under a fixed weekly token budget: does skipping maintenance raise the cost of later implementation work? Simulation first, then real agent runs.
Image text to text model, used with transformers.
repomap: token-budgeted repo map for AI coding agents. Walks any repo, ranks files by import refs, emits orientation in under 4000 tokens. Stdlib-only Go, zero deps, tree/JSON/HTML. go install github.com/AkashPriyadarshii/repomap/cmd/repomap@latest
Token budget allocator for LLM prompts: named zones, dynamic rebalancing, and a CLI for inspecting context-window usage.
Benchmark for runtime token budget control in chain-of-thought generation, comparing plateau detectors against an oracle stop point.
Hands-on Antigravity SDK codelab: give an autonomous agent a hard token budget, with a live usage monitor and a deny-all kill-switch that halts a runaway loop before it overspends.