Skip to content

Agents and MCP

/mcp is a Model Context Protocol endpoint over streamable HTTP. It accepts the same masks access token as the browser app, as described in signing in. A request without a token gets 401 and a WWW-Authenticate challenge that names /.well-known/oauth-protected-resource. That document lists the masks issuer and the xixo: scopes the tools check, so an OAuth client can find masks and request a token. See connect an agent.

  • Calls are limited per token, or per IP address without one, to XIXO_MCP_LIMIT a minute (120 by default).
  • xixo answers every call with one JSON reply and keeps no stream open. A GET /mcp gets 405, and xixo sends no notifications.
Tool Scope to see it Purpose
search xixo:catalog:read searches the whole catalog, or lists the newest feeds of a type
feed xixo:catalog:read reads one feed in full. With do, it changes one, such as adding a note or analyzing it again.
connect xixo:catalog:write connects two feeds, or disconnects them
resource xixo:resources:read lists the resources, and sends a command to one
move xixo:resources:command moves files between machines. See move files between machines.

A token sees only the tools and commands its scopes allow, and xixo checks the scope again on each call:

  • The feed tool’s changing verbs need xixo:catalog:write.
  • A resource command that changes something, such as sync, export, or attach, needs xixo:resources:command. xixo:web:keep alone allows snapshot through a web resource.
  • A command that reaches the web, such as a web search or fetching a page, needs xixo:web:read.
  • A machine’s commands are described in tools a machine offers.
  • xixo:mcp:call adds the tools of every MCP server attached as a resource, passed through unchanged.

The MCP reference lists every verb, command, and input.

xixo runs an agent of its own when it analyzes an address, files a staged file, or looks up a question about the world. The agent runs a prompt against the inference resource that serves the agent role, and offers the search, feed, connect, and resource tools, as far as its scopes allow. Without such a resource, xixo skips the agent.

  • A run takes six turns by default, or the number an address’s schedule sets, up to 32.
  • A reply with no tool calls is the answer.
  • A call to an unknown tool, or with arguments the tool’s schema refuses, goes back to the model as an error it can correct.
  • Three failed calls in a row end the run.
  • The last turn offers no tools and asks for an answer from what the agent has read.
  • A run is told how much time it has. It may ask for more, up to one day from the start.
  • A run whose analysis is cancelled or past its deadline stops at its next turn.

The agent never uses a person’s token. Each run gets a grant whose subject is feed: followed by the feed’s key, with fixed scopes:

Run Scopes
An address xixo:catalog:read, xixo:catalog:write, xixo:web:read, xixo:resources:read
Filing a staged file xixo:catalog:read, xixo:catalog:write, xixo:resources:read
Looking up a question about the world xixo:web:read, xixo:web:keep, xixo:resources:read

So the agent can search, read, file, and place feeds, and send read-only commands to resources. It cannot sync, export, write into a resource, call an attached MCP server, or change settings. A file synced from a resource is filed by its summary’s tags, with no agent. See analysis.

The agent’s changing verbs work only on the feeds its run made, and on the feed a filing or address run is for. A run makes only notes, never a scheduled feed.

An agent’s run reads from the catalog or from the web, never both. The first call that reaches either side decides which, and xixo refuses the other side for the rest of the run.

  • Reading the catalog includes searching it, reading a feed the run did not make, and reading a resource’s files.
  • Reaching the web includes a web search, fetching a page, a snapshot, and sending a file or a question to a machine.

A file or a page can hold text that tells the agent to read something private and send it to an address. A run that has read the catalog can no longer reach that address, and a run that has fetched the page can no longer read the catalog. A person’s token is not limited this way.

An analysis records the person whose request started it, such as an upload, runFeed, analyzeFeed, askCatalog, or the feed tool called with a person’s token. Its agent reaches the resources everyone can use and that person’s own personal resources, and reads only the feeds that person can read.

An analysis started by a sync, a schedule, or another agent records nobody. Its agent reaches only what everyone can use. Starting a run on somebody else’s feed reaches your resources, never theirs. The grant’s subject stays feed: and the key either way, so the audit trail and the run budget name the feed.

A question asked of the catalog is saved as a note keyed by the question, and answered by an analysis with the cause ask. The answer shows as soon as it is saved. Then the model titles the note, such as “Toronto today: 18°C and rain”, and rolls the conversation into the note’s analysis, so search finds the note by everything asked and answered in it. See ask the catalog.

An answer has four parts. Only the second and fourth call a model.

  1. Evidence. xixo searches the catalog by the question’s words and meaning, and reads up to five feeds in full: the item the question was asked about, the feeds earlier answers drew on, and the best matches. A long feed is read by the sections nearest the question. Up to 20 more matches follow as one line each, so a question about how many or which items can see past those five. A note that was itself asked is never read as a source.
  2. Answer. The model that serves the agent role reads a count of the catalog, the evidence, the conversation so far, today’s date, and the question, in one call with no tools. It cites the feeds it used, such as [feed 12]. The call is sent at temperature 0, with the model backend’s Effort on questions as its reasoning effort.
  3. Compute. When the evidence holds a table, the model asks xixo for a sum, count, average, smallest, or largest over its rows, narrowed by tests on its columns. xixo works it out over the rows the analyzer kept.
  4. Check. An answer that leaves out the computed figure, or gives a number that appears nowhere in the evidence, the question, earlier answers, or a computed result, is sent back once.

When the evidence does not answer a question about the world as it is now, such as the weather or a price, the question goes to the agent with the tenant’s web resources. Without a web resource, the question is answered from the catalog alone.

askCatalog with the note’s feedId asks a follow-up in the same conversation, once the previous question has an answer. A follow-up sees up to eight earlier questions and their answers. Ask again asks the latest question again. Each answer records the feeds it cited, the note’s page lists them under the answer, and the note is connected to them.

A feedback resource collects what an agent wanted and could not get. Its one command, ask, takes a question, and optionally the context and what was wanted. It always answers that it cannot help, and keeps the request as a note titled “Wanted:” and the question, connected to the /feedback address and to the feed the caller was working on.

Attaching a feedback resource makes the /feedback address. Once a week its agent groups what was wanted by what would provide it, such as a resource to attach or a change to xixo, and keeps a note titled “Feedback review”. The resource tool tells every MCP client to use feedback for anything no tool could answer or do. When an answer from the catalog finds nothing, xixo files what the model said would have answered it. A tenant without a feedback resource keeps nothing.

Work that can run for a long time spends from a budget: the feed tool’s analyze, the resource tool’s sync and export, and the move tool. Each subject in a tenant may start XIXO_RUN_BUDGET of these per clock hour, 20 by default. 0 removes the limit. A feed’s agent spends from its own subject’s budget.

A gate stops a kind of job: sync, export, move, or reindex. A gate covers the whole tenant or one record, such as one resource for sync, and the record’s gate wins. A closed gate marks the run as gated and does nothing. A gate that is open but not live lets a sync or a reindex walk and count without writing. A run reads its gate again as it goes, so closing a gate stops a run in progress. XIXO_ITERATORS_DISABLED closes every gate at once. Gates have no screen. Set one with Gate.set! from a Rails console.

Every tool call writes an audit event, and so do refused authorizations, rate-limited calls, and some GraphQL mutations. An event records:

  • the tool, the scope, and the result: ok, error, or denied;
  • the actor: a person and the client they asked through, a client acting for itself, the agent and the analysis it ran for, or nobody when no token was accepted;
  • a sentence about the call, such as “filed invoice.pdf under receipts”, and the feed it was about;
  • the IP address, the request id, and the duration;
  • a summary of the arguments. Long strings are cut, and the value of any key that names a secret, password, token, credential, authorization, or access key is replaced with [redacted]. See errors.

The Activity page in Settings lists the events, one entry for each analysis. The auditEvents query returns them to a token with xixo:catalog:read, leaving out events about feeds the token cannot read. A daily job deletes events older than XIXO_AUDIT_RETENTION_DAYS, 90 by default, and 0 keeps them forever.