Prompt + repository context enter the run.
From a prompt
to real work.
nah gives a model a task, a bounded set of tools, and a clear path to act. Every step returns through an explicit loop you can inspect, shape, and stop.
A loop you can follow.
Each model decision and tool outcome is an explicit part of the run. Nothing disappears behind a one-shot “agent” call.
The model requests a read operation.
Structured results become the next model context.
Your policy decides whether the action can proceed.
Final answer and usage are available to your app.
Small steps. Clear ownership.
Your application sets the boundaries; the loop carries context from one decision to the next.
Give it a task
A prompt, working directory, and system instructions become the run’s starting context. The agent receives only the tools and limits your app gives it.
The model chooses
The model can respond with an explanation or request a tool. Each response is one bounded step in a loop your application can observe.
Tools do the work
Read, search, edit, and shell tools run in your environment. Mutating actions can pause for your approval before anything changes.
Results guide the next step
Tool output returns to the model as context. It can inspect the result, choose another action, or finish with a final answer.
Wire the loop into your product.
Use the framework when you want to compose the agent yourself. Stream events into your UI, connect approvals to your policy, and keep the run result in your hands.
Explore the frameworkconst run = runAgent({model, prompt: "Fix the failing test", system: buildSystemPrompt(cwd), tools: createCodingTools(env, {approveToolCall: askForApproval,}), maxSteps: 12, maxSpendUsd: 0.50,});for await (const event of run.events) {renderRunEvent(event);}const result = await run.result;Start where you are.
Build a custom agent, use nah as your coding partner, or inspect the work as it happens.
Framework
Compose model steps, tools, approvals, and events into your own product.
Build with the SDK 02 / USENAH Agent
Put the same explicit loop to work on real code from your terminal.
Meet the agent 03 / INSPECTStudio
See runs, tool activity, and traces in a workspace built for visibility.
Explore StudioMake the loop yours.
Start with the agent loop guide, then shape the run around your product and your users.