Bifra

Concepts

How Bifra turns a source into a typed API.

Bifra is an agent that genuinely does the work — it studies a source, shapes an API, builds and deploys it, and verifies it works — by calling tools. Each phase is a typed contract, enforced inside the tool the agent calls.

The phases

Study

The agent drives a real browser (via Steel) and captures the data endpoints a source calls, scoring and replay-probing them. When a site is server-rendered with no data API, the agent probes further with bash (curl, sitemaps, CSV/JSON endpoints) before deciding anything.

Spec

The agent designs the agent-facing API — tools shaped for how an agent wants to use them, not 1:1 mirrors of raw endpoints — and commits it. You approve the shape once.

Build

The approved spec is bundled into a Cloudflare Worker that serves a typed REST surface, an MCP server at /mcp, and an OpenAPI document at /openapi.json.

Deploy

The worker is shipped live and its URL returned.

Verify

Structural checks run against the live API. If they fail, the agent reads the real error, adjusts the spec, and rebuilds — healing on its own until it works or reports a clear diagnosis.

Where the loop runs

The agent is the same everywhere; only its sandbox differs:

  • Self-hosted — the Claude Agent SDK runs the loop in a sandbox you control.
  • Managed — the same agent runs on Anthropic's Managed Agents sandbox.

One prompt, one toolset, one model. Provider secrets (Steel, Cloudflare) run in tool handlers on your side and never enter the model's context.

Every API is also an MCP server

Because rails serves /mcp alongside the REST routes, every API Bifra builds is immediately usable by an agent over MCP — no extra step.

On this page