MUTATION_TESTING
AgentThe agent package's pure, deterministic core (the chat permission gate, the control-tool plumbing, JSON extraction, and the…
**Navigation**: [Agents package rules](../AGENTS.md) → **Evaluation and Optimization**
Claude Code
$ npx -y skills add nodetool-ai/nodetool --agent claude-code
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
**Navigation**: [Agents package rules](../AGENTS.md) → **Evaluation and Optimization**
Paths are relative to `packages/agents/` unless they name another package.
`CostCalculator` in `@nodetool-ai/runtime` tracks per-call costs based on provider pricing:
provider.trackUsage(model, { inputTokens: 100, outputTokens: 50 });
console.log(provider.getTotalCost()); // USDCosts are logged via `logProviderCall()` and included in `llm_call` messages.
One run, one model. `create_plan` and `execute_plan` both use the calling session's provider and model (`subAgentRuntime`), so planning and step execution cannot drift apart or bill against a model the user did not pick. The per-phase model idea survives only as a possible argument on those two specs; nothing selects a second model.
A single result is cut, and a whole thread is summarized. Two different limits, in two different places.
in `constants.ts`) before it enters history, with a notice telling the model the output was cut and how to ask for a smaller slice. A broad grep or a large file read otherwise returns tens of megabytes and the next request fails outright.
tool-calling loop to `provider.generateLoop`, so each provider manages its own window — the Claude Agent SDK compacts internally, a stateless provider is sent everything. What bounds a step instead is the cumulative iteration cap and the result cut above.
(`session/chat-compaction.ts`, driven from `chat-turn.ts`). One summarizer call replaces everything before the last `NODETOOL_CHAT_COMPACTION_KEEP_TURNS` user turns, and the summary is persisted as a `role: "user"` row marked `execution_event_type: "compaction"`. History assembly starts from the newest such row, so only the provider's view is shortened — the full thread stays in the database for the UI and `nodetool.threads.*`. The cut lands on a user message, which is what keeps a tool call attached to its result.
reporting that the prompt did not fit, which compacts and retries the turn once. A provider holding the transcript upstream skips the first, since shortening what NodeTool sends does not shorten what that provider already has.
`NODETOOL_CHAT_COMPACTION_TOKENS` sets it. `resolveContextWindow` in `packages/runtime/src/providers/context-window.ts` asks the provider's Models API first (`BaseProvider.getContextWindow`), then models.dev by provider route and model, then falls back to 128 000 tokens with a warning. The chat turn caches the window per connection and `provider/model`. The prompt size is the larger of the local estimate and the provider-reported size of the thread's last call (`BaseProvider.lastCallTokens`).
against the full history, with a `log_update` saying so. The alternative to an imperfect summary is a turn that cannot run at all.
"Earlier conversation summarized" card (`web/src/components/chat/message/CompactionCard.tsx`), reached from `MessageView` before the plain user-message path — without that branch the summary reads as something the user typed.
Plans are validated before execution:
calls `add_task` again
Steps can enforce structured output via JSON schema:
Skills come in two tiers.
A **user skill** is a row in the `skills` table — `name`, `description`, and markdown `content` — that someone wrote and can rewrite.
A **system skill** ships with the build: a `SKILL.md` under `pa
Open-source AI film studio · agent + node workflows Direct AI films, shot by shot. Start with one sentence. The agent writes the story, draws a still for every shot, and cuts the clips on a timeline.
The agent package's pure, deterministic core (the chat permission gate, the control-tool plumbing, JSON extraction, and the…
**Navigation**: [Agents package rules](../AGENTS.md) → **Capabilities and tool sources**
**Navigation**: [Agents package rules](../AGENTS.md) → **Running Agents from CLI**
**Navigation**: [Agents package rules](../AGENTS.md) → **CodeAct Execution**
**Navigation**: [Agents package rules](../AGENTS.md) → **Eval suites**
**Navigation**: [Agents package rules](../AGENTS.md) → **Graph authoring**
Agent for managing AI prompts on prompts.chat - search, save, improve, and organize your prompt library.
정밀(strict) 모드 1단계 진단 에이전트. 글 전체를 한 번에 보고 "가장 지배적인 AI 티 패턴 3~6개"를 taxonomy ID와 함께 진단한다. 불안정한 span 열거(0↔18개로 요동) 대신 "무엇이 이 글을…
Topic Clusters curator for the Claude Blog Brain. Maintains and answers from the Topic Clusters theme of the brain, grounded in…
Optional gallery research helper. Use when a caller wants to find references, explore styles, build a mood board, or needs…