Composition configuration
Agent context
Pass anagent block to tune what the chat loop sends to the model. All
fields are optional.
toolOutputCapcaps a single tool result before it reaches the model, so a runaway host response can’t blow the context window. Defaults to32000characters. Pass0to disable the cap. Persistence and the streamed thread are unaffected — only the copy sent to the model is truncated.maxOutputTokensbounds tokens the model may emit per turn. Omit to defer to the model default.historyWindowbounds how many past messages are re-sent to the model each turn. Vendo keeps whole messages so tool-call/result pairs stay paired. Omit to send the full thread (current behavior). The stored thread is untouched; only the per-turn model context shrinks.
Base path
The wire mounts under one base path, default/api/vendo. Configure
createVendoClient({ baseUrl }) when mounting elsewhere. Rung 4 HTTP app UI is
not proxied through this base.
Identity
Every wire request passes throughprincipal(req). The returned
Principal.subject scopes threads, apps, approvals, grants, activity, and
runs. Ephemeral principals never write to disk.
principal(req) must return kind: "user" (or null). Returning
kind: "org" or a subject that starts with vendo: is rejected at the
wire — those identities are Vendo-owned. See
Principals and organizations.
When principal(req) returns null, Vendo issues an anonymous session
cookie. The first authenticated request afterward merges the anonymous
session’s threads, apps, and state into the signed-in user; grants,
approvals, connected accounts, and history stay put.
CSRF floor
Cookie-authenticated state-changing requests requireContent-Type: application/json. The exhaustive exceptions are binary
/apps/import, signed /webhooks/:source, and bearer-authenticated /tick.
Error envelope
Every non-2xx response has this shape:validation 400, not-found 404, blocked 403, conflict
409, cloud-required 402, and sandbox-unavailable or not-implemented 501.
MCP door paths are the exception; they speak MCP and OAuth response shapes.