Answer a question about a source directory that is too large for one prompt.
Level: Advanced · Concept: Rlm · Needs: a model API key (DEEPSEEK_API_KEY as written; any provider works)
flowchart LR
Q([query]) --> R[RLMAgent]
R -- writes code --> X[sandbox]
X -- reads files --> F[(FileSystemContext)]
X -- sub-queries --> L[subLLM]
R --> A([answer])
- The root model writes code that reads only the files it needs.
FileSystemContextloads files lazily and caches them.
# Once, from the repository root
pnpm install && pnpm build
export DEEPSEEK_API_KEY=sk-...
pnpm --filter @astack-examples/rlm-agent startThe full program is index.ts.
Next: HTTP server