Skip to main content

Migrating

Older code, tutorials and AI-generated snippets may use the APIs on the left. The rest of these docs only use the right-hand column.

The project was renamed Ailu​

BeforeNow
@adriane-ai/* npm packages@ailu-ai/*
npm create adrianenpm create @ailu-ai@latest
Python adrianepip install ailu, import ailu
ADRIANE_* environment variablesAILU_* (the old names are no longer read)
ADR_* error codesAILU_*
adriane CLIailu

Models​

BeforeNow
agentNode({ llm: new DefaultLLMGateway() })agentNode({ model: model.anthropic("claude-sonnet-4-6") }). llm is ignored.
MockLLMProviderAdapter, scripted gateways in testsAILU_LLM_MOCK=1
agentNode({ provider: "openai", model: "gpt-4o" })agentNode({ model: model.openai("gpt-4o") }) or model: "openai:gpt-4o"
agentNode({ tier: "fast" })agentNode({ model: model.fast })
import { openai } from "@ailu-ai/model-openai"import { model } from "@ailu-ai/graph-sdk", then model.openai(...)
A run without an API key silently used a mockIt fails and names the variable to set. Use AILU_LLM_MOCK=1 to run offline on purpose.
An unknown provider ("groq") ran on AnthropicIt fails with AILU_UNKNOWN_PROVIDER.
streamAgentTokens(...)app.stream(input, "messages")
Reading the answer from the messages channelfinalAnswer(out.channels.agentResult)

Approvals and resume​

BeforeNow
approveAndResume(runId, ["refund"]), or resolvedBy left outapproveAndResume(runId, { approvedTools: ["refund"], resolvedBy: "alice@example.com" }). resolvedBy is required.
Checking each request with getById before resumeCatalogGraphresumeCatalogGraph(definition, state, { approvalEngine }) checks it and throws ApprovalNotGrantedError
agentNode({ approvalEngine })suspendForApproval: true with approveAndResume, or the catalog runner: runCatalogGraph(app.definition, { approvalEngine, tools })
toolNode with a gated toolGive the tool to an agentNode with suspendForApproval: true
.checkpointer(...), a custom CheckpointerrunCatalogGraph / resumeCatalogGraph and your own storage. See Long-running runs.
resume in a new processresumeCatalogGraph(definition, savedState)

Engine and routing​

BeforeNow
AILU_SDK_ENGINE=ts, the TypeScript engineRemoved. The Rust engine is the only engine.
A handler returning Command { goto }conditionalEdge to route, fanOut or mapAgents to run in parallel
ailu run to execute a graphailu run is a dry run. Run your TypeScript code.
@ailu-ai/knowledge, @ailu-ai/okfNot part of the public SDK. For retrieval, see RAG.