
anvil-js
Created Jul 2026
Cleaned up the public repository to remove internal PRD references and milestone-based project framing, shifting focus to a clearer feature summary and roadmap. Updated documentation across the core repo and Mintlify site to ensure examples are linked, setup instructions are accurate, and developers have a cohesive onboarding experience. This ensures the repo reflects a professional, production-focused framework rather than internal planning notes. 
This milestone marks the completion of the project's original PRD roadmap (M0-M9). We've added a comprehensive suite of documentation covering everything from routing and agents to observability and durability, alongside two new practical examples: an MCP server integration and a human-in-the-loop agent with durably checkpointed states. The README has been overhauled to provide a clearer path for new developers to get started. 
This update introduces the M8 milestone, adding the A2A (Agent-to-Agent) protocol server and a sandboxed execution environment. The new A2AServer enables unified interface support (REST, MCP, and A2A) through the AgentRegistry, while the local runSandboxed utility provides a memory-capped, time-limited environment for executing untrusted code via Node.js worker threads. This milestone includes comprehensive testing across protocol endpoints and sandbox safety constraints. 
This update introduces asynchronous agent scheduling and multi-agent orchestration as outlined in the PRD. We've added cron-based task triggering with failure isolation and a robust AgentRegistry that enables seamless delegation between agents via 'agentAsTool'. These changes empower complex, multi-step workflows by allowing agents to orchestrate sub-agents within their own execution loops. 
This update introduces a SemanticCache that leverages cosine similarity over VectorStores for more intelligent response caching compared to traditional exact matching. We also rolled out a modular assembleContext strategy to streamline how retrieval results, token budgets, and system instructions are prepared before agent loops. These changes enhance both performance and RAG accuracy by ensuring context is efficiently managed and cached based on meaningful semantic intent. 
This update introduces core memory and RAG infrastructure, adding a namespaced MemoryStore for persistent session context and a flexible RAG framework for semantic retrieval. New primitives include typed memory operations with middleware support, a modular Embedder interface for vector-based search, and full tracing integration for retrieval spans to improve agent transparency. These additions provide the foundational tools for long-term state management and context-aware responses. 
This update introduces a robust Prompt Registry for version-controlled prompt management with support for immutable versions and diffing, alongside an LLM-as-judge evaluation harness. The new anvil eval CLI command allows for running deterministic test suites covering output assertions and LLM-based verification, significantly improving our agent development workflow. These changes replace M6 stubs and ensure better reliability for prompt and agent logic through 13 new comprehensive test cases. 
We've finalized M5 by introducing a comprehensive guardrail system, including content filtering, PII redaction, and a robust prompt-injection taint layer. Untrusted content is now tracked, automatically gating downstream tool calls with configurable policy enforcement—like block-or-approve workflows for tainted context. This significantly tightens our agent's security posture against malicious inputs. 
We've added robust state management to our agents, featuring a new StateStore interface with memory-backed and persistent SQLite options. The agent runtime now supports durable execution by writing checkpoints after each iteration, ensuring that crashes or redeployments resume exactly where they left off without re-executing completed side-effect tools. Additionally, we've integrated a Human-in-the-Loop (HITL) system allowing agents to request approval via tool calls, pausing execution and surfacing the status through the AI-SDK data stream. 
We've completed the M4 milestone by introducing a self-contained observability dashboard at /_anvil and adding support for OpenTelemetry GenAI semantic conventions. The new dashboardMiddleware provides a zero-dependency view into your traces, while traceToOtelSpans and the new OTLP/HTTP exporter allow for seamless telemetry integration with your favorite collectors. We also improved the dev loader to ensure singleton trace stores are shared reliably across route files during development. 
We've integrated a new observability and cost management layer into the agent loop, introducing structured span tracing for models, tools, and retrievals, alongside a cost governor to enforce per-request budget caps. The system includes both in-memory and SQLite-backed storage options, with the runtime now automatically gating execution based on configured token and USD limits. This ensures better visibility into execution costs and provides critical safety guards against budget overruns. 