AI-powered build
truto integrations build reads an API's docs and writes an integration file you can review.
Nothing reaches Truto until you run truto integrations apply.
Skip the reading — fast path for coding agents
truto integrations build <docs-url> -o json
/skill truto-integrations-build
flowchart LR
docs["API docs or spec"] --> build["build"]
build --> asked{"Questions?"}
asked -->|"yes"| answer["build --continue"]
answer --> review["Review the file"]
asked -->|"no"| review
review --> apply["apply"]
Quick start
# 1. Build from the API's docs or OpenAPI spec
truto integrations build https://docs.example.com/openapi.json
# 2. Answer anything the build asked (it prints this command for you)
truto integrations build --continue acme.integration.json --answer q1="…"
# 3. Push it to Truto
truto integrations apply acme.integration.jsonUpdating an integration that already exists? Put its slug after the docs URL:
truto integrations build https://docs.example.com/openapi.json acme
Before you start
You need:
- An LLM key
- Anthropic (the default):
ANTHROPIC_API_KEY - Fireworks, only with
--llm-provider fireworks:FIREWORKS_API_KEY
- Anthropic (the default):
- A Fireworks key for the doc verifier, a second check of endpoints, base URL, auth and pagination. A terminal build offers it (selected by default) whichever provider you use; pick Off or pass
--no-verify-docsto build with an Anthropic key alone. Without a terminal, withCIset or with-o json, it runs only with--llm-provider fireworks.--docs-onlyand--only-missingbuilds skip it. - A Firecrawl key (
FIRECRAWL_API_KEY), only for docs sites that need crawling - A Truto login (
truto login, orTRUTO_API_TOKEN). Every build reads your team and environment; an update also reads the live integration.
No key set? In a terminal the CLI asks for it and offers to save it to your profile. You can also save one ahead of time with truto profiles set-key anthropic (or fireworks, firecrawl).
How a build works
- Reads your sources. OpenAPI or Swagger, a Postman collection (REST or SOAP), a SOAP WSDL, GraphQL,
llms-full.txt, or a crawl of the docs site.- Pass several URLs, in any order. The CLI uses the best one first.
- A local file must start with
./or/. Anything else that isn't a URL, such asopenapi.jsonor../spec.yml, is read as the integration slug.
- Builds the file. An AI agent writes the config and checks each change as it goes.
- Lets you fix things. It opens the file in your editor, then takes plain-English fixes such as "website_id should be a credential".
- Press Enter on an empty line when you're done.
- Skip the editor with
--no-editor.
- Writes the docs. Every method gets its own documentation rows.
- Saves the result:
acme.integration.json: the integrationacme.integration.report.md: a report you can read (plus.report.jsonfor tools)acme.integration.json.committed: the copy apply compares against
A docs URL with a username, a password or a query string in it is refused. Download the page and pass it as a path: ./page.html or an absolute path (a bare page.html is read as the slug).
When the build asks a question
The build stops and asks instead of guessing. The method waits, the question is saved, and the rest of the build carries on.
It asks when, for example:
- a value such as
{{subdomain}}is used, but nothing fills it - a list endpoint doesn't show where its rows are
- a method has no documentation
- users type in an API key, but nothing checks the key when they connect
Answer it
- In a terminal: the build asks at the end. Press Enter to skip a question.
- From a script: answer later.
truto integrations build --continue acme.integration.json --answer q1="…"
truto integrations build --continue acme.integration.json --answers answers.json--continue rebuilds only the methods that were waiting. Everything else stays exactly as it was.
Edited the file by hand? Run truto integrations build --recheck acme.integration.json before --continue.
Never paste a key, token or password as an answer. Answers are saved. Say where the value comes from instead, for example <value from the previous response>. An answer that looks like a secret is refused.
Results and exit codes
Every build ends with a summary: the status, the counts, any open questions, and the next command to run.
| Exit | Meaning |
|---|---|
| 0 | Done. There may be small gaps, such as a missing doc row. |
| 3 | Done, but some methods are waiting for an answer or are blocked. |
| 1 | Failed. |
--fail-onsets what counts as a failure:blocking(default),errors,incompleteornone.- Exit 3 means waiting, not broken. If your script treats any non-zero exit as a failure, pass
--fail-on none. - From a script, pass
-o json: one JSON summary and no prompts.
Changed in 1.0.39: a build that leaves methods blocked now exits 3. Earlier versions exited 0.
The report
acme.integration.report.md shows, for each method:
- where its docs came from
- what the agent assumed
- which checks ran
- a confidence of low, medium or high
Start with the low ones. Confidence never blocks anything.
Run without prompts
| Flag | What it does |
|---|---|
--instructions "…" |
Gives the build instructions without asking |
--refine "…" |
One fix to make after the build. Repeatable |
--refinements-file <path> |
Fixes from a file, one per line |
--auto-accept-patches |
Accepts every fix the agent proposes |
--no-editor |
Doesn't open the editor |
truto integrations build https://docs.example.com/openapi.json acme \
--instructions "Contacts, companies and deals only" \
--refine "website_id should be a credential, not a query param" \
--auto-accept-patches --no-editor -o jsonUpdate an existing integration
- Rebuild on top of what's live: pass the slug after the docs URL.
- Only add what's missing:
--only-missingadds the methods that are in the docs but not live.- Existing methods, auth and pagination stay as they are.
- Only refresh the docs:
truto integrations build <docs-url> --docs-only <file-or-slug> [--resource contacts,deals]regenerates documentation rows. The docs URL is still required.- It writes
<slug>.docs.integration.json. Push that file withtruto integrations apply <file> --docs-only.
- It writes
LLM providers
| Anthropic (default) | Fireworks | |
|---|---|---|
| Choose with | --llm-provider anthropic |
--llm-provider fireworks |
| Models | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 |
glm-5p3-flash (default) or minimax-m3; deepseek-v4p1-flash for classification |
| Keys | ANTHROPIC_API_KEY |
FIREWORKS_API_KEY, plus FIRECRAWL_API_KEY for web search |
| Change the model | --anthropic-model |
--llm-model |
- In a terminal, the CLI asks which provider to use. Without a terminal, with
CIset or with-o json, it uses Anthropic. - Don't mix them.
--anthropic-modelwith Fireworks, or--llm-modelwith Anthropic, is an error.
Useful flags
| Flag | What it does |
|---|---|
--out <file> |
Where to save the file (default <slug>.integration.json) |
--recheck <file> |
Re-runs the checks after you edit the file. No AI, no network |
--source-tier <tier> |
Forces how the docs are read, for example openapi-only |
--max-pages <n> |
The most docs pages to read (default 200) |
--no-firecrawl |
Skips Firecrawl and uses cheaper extraction only |
--embedding-provider fireworks |
Uses Fireworks embeddings instead of the local model |
--no-embeddings |
Keyword search only |
--verify-docs / --no-verify-docs |
Runs or skips the doc verifier without asking. It needs a Fireworks key |
--allow-partial-coverage |
Turns off discovery's coverage checks, for a deliberate partial rebuild. Without it, an update build that finds fewer than half the live integration's resources stops |
--debug-log <path> |
Where to save the build's full log (on by default, in ~/.truto/logs/) |
See every flag: truto integrations build --help
Older flags such as --yes, --dry-run and --strict are gone. They exit with code 2 and name the command to use instead.
Next
Push the file with Apply. To add one method without AI, use Add method.