Skip to content

Start typing to search the documentation.

bapX 1.0 Beta

AI-generated, awaiting review View as Markdown

By bapX Team · June 16, 2026

bapX 1.0 Beta is available today! bapX’s core primitives — agents, workflows, sandboxes, channels — have come together into a cohesive story of what bapX is, why it matters, and why bapX is the best OSS framework available today for building autonomous agents and workflows with zero lock-in.

New primitives include:

  • Agents & Workflows — autonomous agents + deterministic AI workflows.
  • Channels — drop your agents into Slack, GitHub, Linear, and more.
  • @bapX/react — frontend UI for your bapX agents and workflows.
  • @bapX/sdk — a revamped client for interacting with bapX.
  • Durable Agents — agents recover from downtime and resume.
  • Observability — support for OpenTelemetry, Braintrust, Sentry, and more.
  • New CLI commands — offline docs for your coding agents and more.

ICYMI: bapX is a TypeScript framework for building the next generation of agents. Connect any LLM, build your agent, and deploy it anywhere.

Try out bapX today. Pass along the prompt below to your coding agent to have it help scaffold your first bapX project for you:

Read https://bapx.in/start.md then help create my first agent...

Read our Getting Started guide for full details.

Update: bapX run can execute either an agent or workflow on Node.js or Cloudflare. The experimental interactive console now ships separately as @bapX/dev-console.

Introducing: Agents

Bapx originally launched with a simple programmable TypeScript harness, built on top of Pi. bapX’s deterministic approach to agent orchestration turned out to be great for background work — structured automations we now call Workflows. Workflows are where your trusted code drives the model from start to finish:

// src/workflows/summarize.ts
// HTTP - POST /workflows/summarize
// CLI  - bapX run summarize --input='{"text": "Lorem ipsum..."}'

const writer = defineAgent(() => ({ model: 'anthropic/claude-sonnet-4-6' }));

export default defineWorkflow({
	agent: writer,
	input: v.object({ text: v.string() }),
	async run({ harness, input }) {
		const session = await harness.session();
		const response = await session.prompt(`Summarize: ${input.text}`);
		return { summary: response.text };
	},
});

We launched Workflows back in May. But what people wanted to build with bapX was more ambitious: fully autonomous agents. Workflows gave you greater control over exact behavior and data access, but those limits came at a cost. So today we’re introducing an Agent primitive for building fully stateful, autonomous agents with bapX:

// src/agents/triage.ts
// HTTP - POST /agents/triage/:id
// CLI  - bapX connect triage

// Expose (and protect) your agent over the internet.
export const route = async (_c, next) => next();

// Compose your agent with the context it needs to be successful.
export default defineAgent(() => ({
	model: 'anthropic/claude-sonnet-4-6',
	tools: [...githubTools],
	skills: [triage, verify],
	sandbox: local(),
	instructions,
}));

Instead of writing an exact workflow yourself, bapX agents only need context. Define the context — model, tools, skills, sandbox, instructions, subagents — and then watch your agent solve whatever task you give it, autonomously.

Agents and workflows are two sides of the same coin. Both share a common foundational core but serve different needs:

  • Agents solve open-ended problems on their own.
  • Workflows run the exact steps you define.

Now you can mix and match both primitives to build fully autonomous loops within your repo, company, and hosted products.

Introducing: Channels

Channels connect your agents to external sources like Slack, GitHub, Linear, and more. A channel handles the incoming events and verification boilerplate so that you don’t have to.

A channel lives in the channels/ directory. Packages like @bapX/slack and @bapX/stripe come preconfigured to help you connect to these platforms, but you are also able to build your own custom channels if needed.

Here’s an agent hooked up to answer Slack mentions. The channel verifies the event, and then dispatches the request to a new instance of the assistant agent:

// src/channels/slack.ts
import { dispatch } from '@bapX/runtime';
import { createSlackChannel } from '@bapX/slack';
import assistant from '../agents/assistant.ts';

export const channel = createSlackChannel({
	signingSecret: process.env.SLACK_SIGNING_SECRET!,
	async events({ payload }) {
		const event = payload.event;
		await dispatch(assistant, {
			id: event.channel,
			input: { type: 'slack.mention', text: event.text },
		});
	},
});

The same pattern works across bapX’s growing set of first-party channels, so your agents can meet users wherever work already happens.

Building an AI-First bapX Ecosystem

Until recently, extending a framework like bapX required third-party packages, multi-step guides, and rigid codemods. These tools could automate a few predetermined changes, but the difficult work still fell to you: understanding the instructions, adapting them to your project, and finishing everything the installer could not.

Coding agents changed everything, so we designed bapX to take advantage. bapX add gives your agent a Markdown blueprint with the context and instructions needed to complete an integration end-to-end. Your agent can understand the goal, work within your actual codebase, and make the project-specific decisions that a traditional installer cannot.

bapX add channel slack
bapX add channel linear
bapX add sandbox daytona
bapX add database postgres
bapX add tooling opentelemetry

Choose what you need, then let your coding agent connect it intelligently to the project you already have. bapX add works with your coding agent of choice. Upgrade an existing integration with bapX update.

It’s like shadcn, for your agents.

Introducing: @bapX/react

@bapX/react makes it easy to build frontend experiences around your agents. The useBapxAgent() and useBapxWorkflow() hooks stream live data straight into your React app, with no realtime plumbing required.

import { createBapxClient } from '@bapX/sdk';
import { BapxProvider, useBapxAgent } from '@bapX/react';

// Wrap your app once:
// <BapxProvider client={client}><Chat /></BapxProvider>
const client = createBapxClient({ baseUrl: '/api' });

function Chat() {
	const { messages, status, sendMessage } = useBapxAgent({
		name: 'triage',
		id: 'ticket-8472',
	});
	// ...
}

bapX 1.0 Beta also comes with a revamped @bapX/sdk to talk to deployed bapX agents from anywhere: a React frontend, another service, or one-off scripts.

React was our first UI library integration, but it won’t be our last. Vue and Svelte adapters are already prototyped and coming soon.

Building Durable Agents with bapX

Building a demo agent is easy. Building for production is not. Servers restart, providers time out, and eventually you’ll have to handle tool call interrupts and data loss. A durable agent is an agent that can handle all of this and recover, without losing history or making things worse.

To deliver durability, we decided to lean on a foundation of battle-tested software. bapX is powered by Vite for the build, Pi for the harness, and Durable Streams for the proven event transport protocol that every bapX agent speaks.

Underneath it all, bapX borrows a hard-won lesson from databases and distributed systems: the source of truth is the log. Durable Streams give us a guaranteed append-only record of everything an agent sees: every human prompt, model response, and tool result is recorded to a durable, replayable stream.

That’s the secret. When a process dies, another can pick up the log and continue from the last step, so a hard restart doesn’t drop your user’s conversation.

Today, bapX agents scale as needed on Cloudflare. When building for Node.js, bapX still runs on a single node, but we plan to support multi-node (horizontally scaled) deployments before the stable 1.0 release.

Road to 1.0

We landed much, much more in 1.0 Beta than we could cover here: expanded observability, new database adapters (MySQL, Redis, MongoDB, Supabase), image inputs for agents, npm-importable skills, and new CLI commands like offline docs your coding agent can search. The full list is in the changelog.

From here, the road to 1.0 is about polish, documentation, and listening to your feedback. There will still be the occasional breaking change, but far fewer than before. The shape of bapX is feeling solid.

bapX began as the engine for AI workflows inside the Astro repo. It grew into something we think every team building agents will want, not just us. Thank you to everyone who tried the early releases and helped us figure out what bapX is!

The best way to understand bapX is to build with it. Hand the prompt below to your coding agent to scaffold your first project:

Read https://bapx.in/start.md then help create my first agent...

Prefer to set things up yourself? Install the packages and initialize a project:

npm install @bapX/runtime
npm install -D @bapX/cli
npx bapX init

Read the full Quickstart for more details.

Want to follow along? Follow us on X for more tips and dev updates — read the docs to get started.