cacheplane/b4run
Ridiculous speed. Readable code.
What it solves
B4.run reduces the boilerplate of building and shipping LLM agents with LangGraph.js. Instead of manually wiring routes, tool sets, state types, and deployment details, developers author a single route file and B4.run discovers the routing, generates TypeScript declarations, and provides a deterministic local test loop. It also adds runtime guardrails like tool approval, permissions, and sandboxing.
How it works
Developers write one agent, workflow, graph, or chain entry in a route's index.ts under src/app/**/. Shared tools live in src/tools/, and route-local tools can sit beside the route. B4.run generates TypeScript route, parameter, state, and tool declarations during typegen and build. The default state uses SQLite, which can persist across restarts. Tests are fixture-backed: they replay committed responses and fail on unmatched interactions unless explicitly set to live or recording mode. The build emits a Node server, a Dockerfile, and LangSmith graph artifacts. Tool policies like tools.deny remove tools, and tools.approve pauses calls for human approval using single-use grants. An optional sandbox isolates workspace tools, and permissions gate shell commands and file paths.
Who it's for
TypeScript teams building agents with LangGraph.js who want application conventions instead of manual wiring. It's a fit for teams that need a local dev and test loop, persistence, and deployment targets—while keeping LangChain and LangGraph.js available. It's not for Python projects or teams that prefer raw LangGraph.js without the framework's conventions.
Highlights
- File-system routing: expose an entry in
src/app/**/index.tsand B4.run discovers the route. - Generated types: route, parameter, state, and tool declarations emitted automatically.
- Deterministic tests: fixture-backed tests replay responses offline without API keys.
- Tool approval:
tools.approvepauses calls for human sign-off with single-use grants. - Security controls: permissions gate shell commands and file paths; optional sandbox isolates workspace tools.
- Build targets: default build produces a Node server, Dockerfile, and LangSmith artifacts; other targets (edge, Vercel, Kubernetes) are opt-in.
Related
- Project
- Project
- Project
- Project
- Dispatch