cacheplane/b4run
Ridiculous speed. Readable code.
What it solves
B4.run reduces the boilerplate and complexity involved in building AI agents and workflows with LangGraph.js. It transforms the process of creating these agents into a structured application development experience similar to building a Next.js app, removing the need for manual route wiring and repetitive setup.
How it works
B4.run acts as a meta-framework built on top of LangGraph.js. It introduces several key mechanisms:
- File-system Routing: Agents and workflows are defined as routes in the file system (
src/app/**/index.ts), which the framework automatically discovers. - Type Generation: It automatically generates TypeScript declarations for routes, parameters, state, and tools during the build process.
- Tool Management: Tools can be organized as shared (in
src/tools/) or route-local, allowing for specific runtime policies per route. - Deterministic Testing: It uses fixture-backed tests that replay committed responses, preventing unexpected provider calls and ensuring consistent test results.
- Build Pipeline: It compiles the project into runnable Node servers, Dockerfiles, and LangSmith graph artifacts.
Who it’s for
TypeScript developers and teams who want to use LangGraph.js but prefer a structured application framework with built-in routing, type safety, and a streamlined local development and testing loop.
Highlights
- Next.js-like experience: Uses file-system routing for agent discovery.
- Automated Typegen: Generates types for state and tool signatures automatically.
- Deterministic Tests: Replays fixtures to avoid silent provider calls during testing.
- Durable Threads: Provides persistence primitives and SQLite-backed state for local development.
- Build Artifacts: Emits production-ready Node servers and Dockerfiles.
Related
- Project
- Project
- Project
- Project