Skip to main content
Use machine-readable sources when an AI coding agent or API tool needs StefanBrain context. Do not make an agent scrape rendered HTML.

Machine-readable sources

The OpenAPI specification is authoritative for endpoint and schema shape. These guides explain behavior, billing, lifecycle, and integration choices that a generated endpoint page cannot capture by itself.

Brief an implementation agent

Give the agent /llms-full.txt and the OpenAPI URL, then include the requirements relevant to the integration:

Choose the richest integration available

If the host supports MCP, connect the StefanBrain product MCP. The agent receives StefanBrain’s tools directly instead of generating HTTP calls from the REST schema. Use REST when you are building an automated application, pipeline, or service. Start with Quickstart, then read Agent Runs or Tools and jobs. In TypeScript, install the SDK. @stefanbrain/sdk ships an AGENTS.md quickstart that a coding agent can read from node_modules. In a shell, install the CLI. @stefanbrain/cli ships an AGENTS.md quickstart and an installable Agent Skill in SKILL.md. sb prints JSON only on stdout and uses stable exit codes, so an agent can parse each result and branch on failures.

Report where the API gets in the way

Tell your agent to send feedback when the API gets in its way: a failed call, an unclear error, wrong docs, or a missing capability. It can send a report with POST /api/developers/v1/feedback, the MCP send_feedback tool, client.feedback.send in SDK 0.5.0, or sb feedback send in CLI 0.5.0. The StefanBrain team reads every report and replies, and the reply reaches the agent. Reports are free. See Agent feedback.

Implementation checks

  • Treat OpenAPI response schemas as additive. Tolerate fields you do not recognize.
  • Store run_id for traceability.
  • Reuse chat for follow-up turns in the same conversation.
  • Use a separate chat or session label for independent parallel work.
  • Follow lifecycle URLs returned by runs and jobs instead of reconstructing them.
  • Poll with the same project and session used by a submit call. Job lookups are chat-scoped.
  • Use POST /api/developers/v1/files to stage local files and pass the returned ids to ask_stefanbrain.
  • For strict structured output, set additionalProperties: false on every object and list every property in required.
  • When structured_output is null, read output and last_error before deciding how to recover.
  • Check is_error in successful direct-tool responses.