# Gobare

> The work your backend does, done by an agent. Gobare runs the agent loop, the sandboxed computer, the browser, the tools and the workspace behind it, and returns everything it did — transcript, events, files and a preview URL — as data your own product can read.

Gobare is an API, not a chat product. A caller creates a session, sends it work,
and reads back a transcript, an event stream, the artifacts it produced, and a
URL where what it built is serving. The work is not only software: the sandbox
carries a real browser, web search and a shell, so the same session researches,
drives a website, turns a folder of PDFs into validated JSON, or builds and
serves an application. The agent inside every session is pi, an open-source
coding agent, run as published — it works by writing and running code on a real
computer, which is how it does the rest of it too. The model is yours: bring a key from
any provider, or any OpenAI- or Anthropic-compatible endpoint, and pay that
provider directly. Gobare does not resell model credits and takes no margin on
tokens.

When to use this API: reach for Gobare when the work needs a computer rather
than a completion. Specifically:

- A task needs a real computer, not just a completion: running a build, executing a test suite, installing packages, starting a server, using a browser.
- A task needs to keep going across minutes or hours, with state that survives between rounds — a workspace with files and git history, not a chat transcript.
- A task should end in something runnable at a URL, or in files the caller collects afterwards, rather than in prose describing what could be done.
- A task needs a human or your own code to approve a step partway through, and the run must wait rather than guess.

Do not use it for these — something simpler will be faster, cheaper or safer:

- Plain text generation, classification, summarisation or extraction with no execution — call a model directly; a session would be slower and cost more for the same answer.
- Sub-second interactive responses. A session boots a sandbox first, so the first turn is measured in seconds.
- Running untrusted code you have not chosen to run. A session is isolated from other tenants, but it executes exactly what you or your agent tells it to.

To call it: mint a token in the Console, then `POST https://api.gobare.dev/v1/sessions`
with `Authorization: Bearer <token>`. Every endpoint lives under the `/v1`
path segment. Every failure returns the same JSON shape — an `error` object
with a machine-readable `code`, a human-readable `message`, and a
`request_id` to quote in a bug report. The full contract is the OpenAPI
document linked below, and it is generated from the service rather than written
by hand.

Reading this site: every page on https://gobare.dev is served as markdown as well as
HTML, from the same source. Send `Accept: text/markdown` to any URL here, or
append `.md` to its path — `https://gobare.dev/about.md` and `https://gobare.dev/about`
with that header are the same document. Unknown paths return a real 404 with a
markdown body rather than an application shell, so a path that does not answer
is a path that does not exist.

## How to integrate

- [AGENTS.md](https://docs.gobare.dev/AGENTS/): the whole API as one page, written to be executed rather than browsed — every prerequisite, endpoint and rule inline, with no link a machine has to follow
- [OpenAPI 3.1 description](https://api.gobare.dev/v1/openapi.json): every operation with a unique operationId, typed parameters and typed responses, including the error schema
- [Quickstart](https://docs.gobare.dev/quickstart.md): token to completed turn, in one page
- [Documentation index](https://docs.gobare.dev): every page is also available as markdown by appending `.md` to its path
- [Docs llms.txt](https://docs.gobare.dev/llms.txt): the same index, machine-readable

## Reference

- [Sessions](https://docs.gobare.dev/sessions.md): the resource that holds a repo, files, secrets and limits
- [Input](https://docs.gobare.dev/input.md): sending the agent a message, a tool result, a steer or a stop
- [Events](https://docs.gobare.dev/events.md): watching a session instead of polling it
- [Tools](https://docs.gobare.dev/tools.md): giving the agent your own functions, or an MCP server
- [Required actions](https://docs.gobare.dev/required-actions.md): how the agent asks your code or a person to act, and waits
- [Webhooks](https://docs.gobare.dev/webhooks.md): being told rather than watching
- [Idempotency](https://docs.gobare.dev/idempotency.md): safe retries on every write
- [Preview](https://docs.gobare.dev/preview.md): making what the agent built reachable at a URL
- [Errors](https://docs.gobare.dev/errors/): the error codes and what to do about each
- [API versioning](https://gobare.dev/api-versioning): what is additive within v1, what counts as breaking, and how the contract is published

## About this company

- [About Gobare](https://gobare.dev/about): Gobare is a managed runtime for agents.
- [Contact Gobare](https://gobare.dev/contact): How to reach the people who build Gobare, report a problem with the API, or get an integration question answered.
- [Privacy at Gobare](https://gobare.dev/privacy): What this website stores, what the Agent API does with your model key and your session data, and what leaves the machine a session runs on.
- [Console](https://app.gobare.dev): where an API key is minted and every session your code creates can be inspected

## Optional

- [pi, the agent Gobare runs](https://github.com/earendil-works/pi): open source, run unmodified
- [Design decisions](https://docs.gobare.dev/design-decisions/): how this API differs from OpenAI's Agents API, and why
- [Guides](https://docs.gobare.dev/guides.md): whole scenarios rather than single endpoints
