SDK overview
Last updated
View as Markdown
The client SDK is exported from @bapX/sdk. Use it from applications that consume deployed Bapx agents and workflows.
import { createBapxClient } from '@bapX/sdk';
const client = createBapxClient({
baseUrl: 'https://example.com/api',
token: process.env.FLUE_TOKEN,
});
Client
createBapxClient(...) configures access to a deployed Bapx application.
API namespaces
client.agentsinvokes persistent agent instances and streams their events.client.workflowsstarts workflow runs.client.runsinspects and streams runs exposed by their owning workflows.
Deployment-wide listing (all runs, all agents) is a server-side concern: compose your own endpoints from the listRuns(), getRun(), and listAgents() primitives exported by @bapX/runtime. See compose your own admin endpoints.
Shared types
- Events and records describes observable events, records, and normalized model-turn data.
- Errors describes HTTP and stream errors.