For AI coding agents
If an AI coding agent writes your Ailu code, give it these.
Start here
/llms.txt: a short index of the SDK, generated from the SDK itself: the builder, the models, every component and its parameters, the error codes./llms-full.txt: this whole documentation as one text file.
generateLlmsTxt() returns the same index from the installed package, so it always matches the
version you have.
Rules that save a round trip
- Configure agents with
model: model.<provider>("<id>")ormodel: "provider:model".llm:andDefaultLLMGatewayare deprecated and ignored. - Read an agent's answer with
finalAnswer(result). - Name a tool's input in
jsonSchema; the model reads it. - Approve tools with
approveAndResume(runId, { approvedTools: ["name"], resolvedBy }). resumeworks only on theCompiledGraphthat started the run. Across processes, userunCatalogGraphandresumeCatalogGraph.- Run tests with
AILU_LLM_MOCK=1.
Check your own work
| Tool | Tells you |
|---|---|
app.compile() / safeCompile() | Whether the graph is valid, with a code and a fix for each problem. |
componentSchemas() | A JSON Schema for the parameters of every component. |
app.explain(runId), explainRun(state) | Why a run is suspended or failed, and the exact call that continues it. |
error.code, error.hint, error.docUrl | What went wrong, how to fix it, and where it is documented. See Errors. |
const explanation = app.explain(paused.runId);
console.log(explanation.summary);