name: wire-ai-references description: Add reference docs to a tutorial's AI assistant context. triggers: ["ai references", "wire references", "rag", "context docs"]
The AI assistant (Mastra) reads author-configured reference docs into the system prompt at build time.
Add your references to
_meta.json:{ "ai": { "references": [ "./refs/cheatsheet.md", "https://example.com/docs/llms.txt" ] } }Local paths are resolved relative to the tutorial folder. Drop the file under the tutorial's
refs/subdir.URLs that look like
llms.txt(the 2026 convention for AI-friendly summary docs) work too — they're fetched at build time and inlined.Budget. References are included verbatim up to
aiDefaults.contextBudgetTokens. Trim large docs; the assistant doesn't have vector search in v1.To restrict the
fetchUrltool to specific origins (off by default), addallowedDomains:{ "ai": { "allowedDomains": ["docs.example.com"] } }