For AI agents: this page is also available as Markdown at https://docs.refabric.com/setting-up/agent-readable-surfaces.md, and the index of every page is https://docs.refabric.com/llms.txt.

Setting Up

Agent-readable surfaces

The plain-text and machine-readable copies of these docs and of the task catalogue, for AI agents and code generators.

An agent does not need to scrape HTML. The docs site and the API both publish copies made for machines: Markdown pages, llms.txt indexes and OpenAPI documents. This page is the one list of which host serves which file.

Surfaces

SurfaceHostWhat it holdsNeeds a key?Can spend credits?Read-only?
/docs/llms.txtdocs sitean index of every docs page, one line eachnonoyes
/docs/llms-full.txtdocs siteevery docs page in Markdown, in one filenonoyes
<page URL>.mddocs siteone docs page in Markdownnonoyes
/docs/sitemap.xmldocs siteevery docs page URLnonoyes
GET /v1/llms.txtAPIwhat the API is, its tasks and its operationsnonoyes
GET /v1/tasks/llms.txtAPIone line per task, grouped by categorynonoyes
GET /v1/tasks/{name}/llms.txtAPIone task's page: inputs, examples, output, errors and limitsnonoyes
GET /v1/tasks/{name}/openapi.jsonAPIone task's OpenAPI document, its input and output as named schemasnonoyes
GET /v1/openapi.jsonAPIthe whole public OpenAPI documentnonoyes
GET /v1/tasks, GET /v1/tasks/{name}APIthe catalogue, with each task's input and output schemano (?surface= needs a key)noyes
GET /v1/tasks/{name}/examplesAPIa task's published examples: the request, its input files and its output filesnonoyes
GET /v1/vocab, /v1/concepts, /v1/recipes, /v1/errors, /v1/metaAPIthe closed options, concepts, recipes, error codes and service limitsnonoyes
POST /v1/tasks/{name}/estimateAPIthe most a request can costyes (tasks:read)noyes
POST /v1/tasks/{name}APIruns the taskyes (tasks:run)yesno

Reads that need no key are limited per IP address; a key gets its own allowance (Limits). The API's llms.txt documents and OpenAPI documents are listed on Agent surfaces.

Per-task schemas

For one task, an agent reads either:

  • GET /v1/tasks/{name}/llms.txt — the task's page as text, written to be read by a model; or
  • GET /v1/tasks/{name}/openapi.json — the task as an OpenAPI document, to generate a tool definition or a typed client.

Both cover published tasks; an unpublished name answers 404, a removed task 410.

Page as Markdown

Every docs page has a Markdown copy at its own URL with .md added. The page's Copy page menu copies it or opens it.

Suggested order

  1. GET /v1/llms.txt — what the API is.
  2. GET /v1/tasks/llms.txt — which task fits the job.
  3. GET /v1/tasks/{name}/llms.txt — that task's inputs and output.
  4. The docs pages it links to, as .md, when it needs more.

Agent workflow

StepWhat the agent doesRefabric operation
searchfind the taskGET /v1/tasks/llms.txt or GET /v1/tasks
schemaread its input and outputGET /v1/tasks/{name}/llms.txt or GET /v1/tasks/{name}
estimateprice the exact requestPOST /v1/tasks/{name}/estimate
runsubmit it, oncePOST /v1/tasks/{name}
pollfollow the same jobGET /v1/jobs/{job_id}
resultread its filesGET /v1/jobs/{job_id}/result

Rules for agents

/docs/llms.txt opens with these rules:

  • Show the estimate (POST /v1/tasks/{name}/estimate) and ask for approval before you run a task.
  • Do not submit again to check on a job: every submit starts a new job.
  • Poll the same job_id (GET /v1/jobs/{job_id}) until its lifecycle is terminal.
  • On a 4xx answer, read the error's field and ctx, fix that part of the request, then send it again.
  • The server cannot read a file path on your machine: send a URL, or upload the file first (POST /v1/files).

These instructions are for the agent; a key with the tasks:run scope can start jobs on its own.