Every script here is standard library only. No SDK to install, in any language.
Before any of them
cli
scope and is refused by every /v1 route.
Then connect a model — POST /v1/model-credentials, or the Console under
Settings › LLM models. Gobare is bring-your-own-key: the model bill is
yours, the computer is ours.
One call proves all three:
model in it is what goes in agent.model.
Four things that will save you an afternoon
These are not trivia. Each one is a mistake that costs hours because it produces plausible behaviour rather than an error. Wait for artifacts, not for the turn. Files the agent writes under/workspace/outputs are published after the turn settles, so for a moment
after status: "completed" the artifact list is legitimately empty — and
indistinguishable from a turn that produced nothing. Poll the turn’s
artifacts field until it leaves pending. With webhooks
you can ignore this: turn.completed is sent once publishing has finished.
Subscribe before you send. Open the event stream first, then post the
message. The other order loses the opening frames whenever the agent starts
quickly — which is to say intermittently, and never on your machine.
Tell the agent not to ask questions, if nothing in your product can answer
one. An agent that meets ambiguity parks on a question and waits. You can
answer it — input.question_answer, see input.md — but an
unattended pipeline with nobody to ask is better off never reaching that state.
One line in instructions prevents it:
429s mean opposite things. rate_limit_exceeded is worth retrying;
project_limit_exceeded means the organization is at its session ceiling and
retrying never clears it. Branch on error.code, never on the status alone.
The reference
The guides show a shape; the reference pages have every field.- sessions.md — repositories, files, secrets, permissions
- input.md — the four things you can send a session
- events.md — the event vocabulary
- errors.md — every refusal, in one shape
- limits.md — every ceiling, with its number
- troubleshooting.md — arriving with a symptom instead of a question
run-session.ts is a TypeScript client that handles the
first two afternoon-savers above, plus answering the agent’s calls into your
code. It is the same file our own end-to-end tests run against, so it cannot
quietly stop working.