agent-accelerator 0.6.0 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +62 -18
  2. package/package.json +1 -1
  3. package/src/agent/agent.ts +192 -695
  4. package/src/agent/architecture.md +19 -13
  5. package/src/agent/context.ts +1 -0
  6. package/src/agent/defaults.ts +88 -0
  7. package/src/agent/delegation.ts +8 -3
  8. package/src/agent/loop.ts +242 -226
  9. package/src/agent/named-sessions.ts +93 -0
  10. package/src/agent/options.ts +166 -0
  11. package/src/agent/run-control.ts +248 -0
  12. package/src/agent/subagents-tool.ts +14 -21
  13. package/src/agent/usage-limit.ts +92 -0
  14. package/src/agent/worker.ts +17 -3
  15. package/src/agent/workers.ts +13 -1
  16. package/src/architecture.md +1 -0
  17. package/src/index.ts +11 -11
  18. package/src/prompts/additional-context.md +2 -0
  19. package/src/prompts/architecture.md +19 -0
  20. package/src/prompts/prompts.ts +81 -0
  21. package/src/prompts/reasoning-directive.md +5 -0
  22. package/src/prompts/structured-output.md +2 -0
  23. package/src/prompts/tool-bridge.md +1 -0
  24. package/src/prompts/tool-interrupted.md +1 -0
  25. package/src/prompts/tool-not-found.md +1 -0
  26. package/src/prompts/tool-repeat-blocked.md +1 -0
  27. package/src/prompts/tool-schema-error.md +1 -0
  28. package/src/prompts/tool-truncated-arguments.md +1 -0
  29. package/src/prompts/worker-failed.md +1 -0
  30. package/src/prompts/worker-replied.md +2 -0
  31. package/src/providers/architecture.md +8 -8
  32. package/src/providers/google.ts +83 -13
  33. package/src/providers/openai-compat.ts +17 -7
  34. package/src/providers/openai.ts +10 -4
  35. package/src/providers/openrouter.ts +185 -18
  36. package/src/providers.ts +59 -9
  37. package/src/scheduler/architecture.md +7 -7
  38. package/src/scheduler/scheduler.ts +40 -0
  39. package/src/scheduler/tool.ts +5 -9
  40. package/src/session/journal.ts +1 -0
  41. package/src/session/store.ts +4 -0
  42. package/src/streaming/event-stream.ts +1 -1
  43. package/src/tools/architecture.md +7 -6
  44. package/src/tools/executor.ts +60 -15
  45. package/src/tools/tool-content.ts +32 -0
  46. package/src/types/agent.ts +40 -8
  47. package/src/types/core.ts +4 -0
  48. package/src/types/message.ts +7 -0
  49. package/src/types/model.ts +4 -1
  50. package/src/types/scheduler.ts +4 -4
  51. package/src/types/tool.ts +2 -0
  52. package/src/utils/errors.ts +3 -3
  53. package/src/utils/headers.ts +1 -1
  54. /package/src/{scheduler/scheduled-actions.md → prompts/scheduled-actions-tool.md} +0 -0
  55. /package/src/{agent/subagents.md → prompts/subagents-tool.md} +0 -0
package/README.md CHANGED
@@ -121,12 +121,13 @@ An `Agent` holds:
121
121
  | `tools` | `Record<string, ToolDefinition> \| ToolDefinition[]` | Deterministic functions the model can call. See [Tools](#tools). |
122
122
  | `subagents` | `SubAgent[] \| Agent[]` | Pre-defined workers. Each worker becomes a callable tool. Useful for fixed roles such as researcher or critic. |
123
123
  | `subagentModel` | `string \| ModelSpec \| ModelProviderInstance` | Developer-only model for dynamically spawned workers. Never choosable by the Main Agent. Deprecated alias of `dynamicSubagents.model` (which wins). Falls back to `SUB_AGENT_MODEL`. |
124
- | `dynamicSubagents` | `DynamicSubagentsConfig` | Enables and constrains LLM-spawned workers: `{ enabled, model?, maxSpawn?, maxDepth?, workerBudget?, thinkingLevel?, tools?, workerTimeoutMs?, allowScheduledActions? }` (`workerTimeoutMs` is for scheduled actions only). See [Pre-defined vs Dynamic Delegation](#pre-defined-vs-dynamic-delegation) and [Scheduled actions](#scheduled-actions). |
124
+ | `dynamicSubagents` | `DynamicSubagentsConfig` | Enables and constrains LLM-spawned workers: `{ enabled, model?, maxSpawn?, maxDepth?, workerBudget?, scheduledActionBudget?, thinkingLevel?, tools?, workerTimeoutMs?, allowScheduledActions? }` (`workerTimeoutMs` is for scheduled actions only). See [Pre-defined vs Dynamic Delegation](#pre-defined-vs-dynamic-delegation) and [Scheduled actions](#scheduled-actions). |
125
125
  | `thinking` | `ThinkingOption` | Canonical reasoning option: `none \| dynamic \| minimal \| low \| medium \| high \| xhigh \| max`, or `{ level, budgetTokens }`. Legacy `thinkingLevel` still works (canonical wins). Validated against the model catalog before a request. |
126
126
  | `cache` | `CacheOption` | `"implicit" \| "5m" \| "30m" \| "1h" \| "12h"`. Prompt-cache lifetime; unsupported values warn and fall back (see [Cache](#cache)). |
127
127
  | `serviceTier` | `"flex" \| "priority"` | Cost / priority routing where supported. Omit for standard routing. |
128
128
  | `maxTurns` | `number` | Maximum model → tool → model loops per `run`. Infinite by default (`0` or omitted = no limit). Hitting a finite limit with pending tool calls warns and sets `finishReason: "max_turns"`. |
129
129
  | `limits` | `AgentRunLimits` | `{ maxTurns?, deadlineMs?, maxToolCallsPerRun?, maxTotalTokens?, requestTimeoutMs?, firstByteTimeoutMs?, streamIdleTimeoutMs? }`. The first four are unlimited by default; hitting `maxTurns` ends the run with `finishReason: "max_turns"`, the other three throw a `BudgetExceededError`. The three network timeouts default to 300 s / 120 s / 300 s so a silent connection fails instead of hanging; set one to `0` or `Infinity` to turn it off. A timeout raises a retryable `TimeoutError`. See [Safety and operations](docs/guides/safety-and-ops.md#network-timeouts). |
130
+ | `usageLimit` | `{ maxCostUsd?, maxTotalTokens? }` | A spending cap for the WHOLE chat, for its whole life: the agent and all its workers added up, kept across restarts. Reaching it throws `BudgetExceededError` ("Usage limit reached"). Scheduled actions never count. Unset = no cap. |
130
131
  | `budget` | `Budget` | `{ maxCostUsd?, maxTotalTokens?, maxDurationMs?, maxTotalSubagents? }`, per run, workers included. Unlimited by default; exceeding it throws `BudgetExceededError` with partial usage. |
131
132
  | `sessionId` | `string` | Stable identifier used for cache affinity. Auto-generated when omitted. |
132
133
  | `headers` | `Record<string,string>` | Additional headers merged into every request. |
@@ -172,7 +173,6 @@ Use `ContentPart[]` when sending images, audio, or video alongside text.
172
173
  | `onDelta(delta, event)` | Called for each text chunk. Use to render answers live. |
173
174
  | `onThinkingDelta(delta, event)` | Called for each reasoning chunk. Use to render reasoning separately. |
174
175
  | `onEvent(event)` | Called for every event: `text_delta`, `thinking_delta`, `tool_call_complete`, `tool_result`, `subagent_complete`, `subagent_delta`, `usage`, `done`, and `error`. |
175
- | `wrapThinking` | Wraps reasoning as `<think>\n...\n</think>\n`, allowing UIs to render it without maintaining separate state. |
176
176
  | `onTurn(turn)` | Called after every model/tool turn with `{ turns, text?, thinking?, toolCalls?, toolResults? }`. Drives sub-agent step logs and persistence. |
177
177
  | `additionalContext` | Added only to the current user turn. Keeps the system prompt stable for better caching. |
178
178
  | `sessionId` | Per-run session override. |
@@ -187,7 +187,6 @@ Use `ContentPart[]` when sending images, audio, or video alongside text.
187
187
  ```ts
188
188
  const res = await agent.run("Design an append-only log", {
189
189
  stream: true,
190
- wrapThinking: true,
191
190
  onThinkingDelta: (d) => process.stdout.write(d),
192
191
  onDelta: (d) => process.stdout.write(d),
193
192
  onEvent: (e) => {
@@ -292,7 +291,8 @@ One `subagents` tool is injected. It takes `{ command, id?, name?, role?, instru
292
291
  - `tools` is the developer-owned pool. Workers get zero tools unless the Main Agent grants a subset by name; unknown names are rejected with the pool listed.
293
292
  - The Main Agent cannot choose worker models, reasoning levels or timeouts. The `subagents` tool has no timeouts (`workerTimeoutMs` and an action's `timeoutMs` apply only to scheduled actions).
294
293
  - `maxDepth` caps how many levels of workers may exist below the agent. By default there is no cap (a worker can start workers that start workers, as deep as the model goes); set a whole number >= 1 to limit it: `1` keeps workers flat, `3` allows three levels. A worker with levels left gets its own `subagents` tool, and its children can only be granted the tools **it** was granted. The levels are saved inside each other (`<session>/workers/<id>/workers/<id>/…`).
295
- - `workerBudget: { maxCostUsd?, maxTotalTokens? }` is each worker's own spending cap, applied as that worker's per-run `budget` (a spawn, a message or a scheduled run is one run; the usage of the worker's own workers counts toward it) and passed down to its workers. Going over fails that call with a budget error (`[worker <id>] failed: Token budget exceeded…`), leaves the worker open and does not affect the parent. Default: unlimited; models with unknown pricing count $0 toward `maxCostUsd`. Values must be numbers above 0.
294
+ - `workerBudget: { maxCostUsd?, maxTotalTokens? }` is each chat worker's own spending cap, applied as that worker's per-run `budget` (a spawn or a message is one run; the usage of the worker's own workers counts toward it) and passed down to its workers. Going over fails that call with a budget error (`[worker <id>] failed: Token budget exceeded…`), leaves the worker open and does not affect the parent. Default: unlimited; models with unknown pricing count $0 toward `maxCostUsd`. Values must be numbers above 0.
295
+ - `scheduledActionBudget: { maxCostUsd?, maxTotalTokens? }` is the same kind of cap for each scheduled-action run (retries included). Scheduled actions are detached from the chat, so only this cap applies to them: not `workerBudget`, the agent's `budget` or `usageLimit`. Default: unlimited.
296
296
  - Workers are real agents with their own session: see [Persistent workers](#persistent-workers-agentworkers) below (the same functions in code, saved on disk with `persist`, resumed after a restart). Each reply's usage is metered into the parent's usage and budget.
297
297
  - Each run of a worker gets a system-generated 32-char TrackingID, displayed as `NAME-{TrackingID}`. Thinking/text deltas update the worker trace live (`agent.track(id)`, `subscribeToSubAgent`) and surface on the parent stream as `subagent_delta` events.
298
298
 
@@ -354,9 +354,9 @@ The Main Agent then gets two tools, fixed by config so the prompt cache stays st
354
354
  The same code is available to your program:
355
355
 
356
356
  ```ts
357
- import { createScheduledAction, telemetryBus } from "agent-accelerator";
357
+ import { telemetryBus } from "agent-accelerator";
358
358
 
359
- createScheduledAction(agent, {
359
+ agent.scheduled.create({
360
360
  instructions: "You write a short, sourced AI research brief.",
361
361
  task: "Summarize the most important AI news of the last day in 5 bullets.",
362
362
  tools: ["recent_news"], // names from the worker pool
@@ -377,16 +377,16 @@ telemetryBus.onEvent((e) => {
377
377
  });
378
378
  ```
379
379
 
380
- | Function | What it does |
380
+ | `agent.scheduled` | What it does |
381
381
  | --- | --- |
382
- | `createScheduledAction(agent, input)` | Schedule a new action. Throws one `ValidationError` listing every problem. |
383
- | `listScheduledActions({ home? })` | Every action with its metadata, state (`waiting`, `cooking`, `missed`, `done`), `lastRun` and a `running` flag. |
384
- | `updateScheduledAction(id, patch, { home? })` | Change instructions, task, tools, timeout, role or any schedule field. Schedule changes are refused while it is cooking. |
385
- | `runScheduledAction(id, { home? })` | Run now, outside the schedule (also resolves a missed run). Needs the creating `Agent` alive. |
386
- | `skipScheduledAction(id, { home? })` | Ignore a missed run and wait for the next scheduled time. |
387
- | `deleteScheduledAction(id, { force?, purge?, home? })` | Delete for good. While it is cooking nothing changes unless `force: true`; `purge: true` also deletes past run files. |
382
+ | `create(input)` | Schedule a new action under this agent. Throws one `ValidationError` listing every problem, and a `ConfigError` when `allowScheduledActions` is off. |
383
+ | `list()` | Every action in the agent's home with its metadata, state (`waiting`, `cooking`, `missed`, `done`), `lastRun` and a `running` flag. |
384
+ | `update(id, patch)` | Change instructions, task, tools, timeout, role or any schedule field. Schedule changes are refused while it is cooking. |
385
+ | `run(id)` | Run now, outside the schedule (also resolves a missed run). Needs the creating `Agent` alive. |
386
+ | `skip(id)` | Ignore a missed run and wait for the next scheduled time. |
387
+ | `delete(id, { force?, purge? })` | Delete for good. While it is cooking nothing changes unless `force: true`; `purge: true` also deletes past run files. |
388
388
 
389
- Every function except `createScheduledAction` finds the home folder through `setHome()`, `AGENT_ACCEL_HOME`, or `.agent-accel/` in the working directory. If you built the Agent with its own `home`, pass the same `{ home }` to these calls (the model's `scheduled_actions` tool already does).
389
+ Every method works on **the agent's own home** (`home` option, else `setHome()`, `AGENT_ACCEL_HOME`, or `.agent-accel/`), so nothing needs a `{ home }` argument. `list`, `update`, `run`, `skip` and `delete` see every action in that home, like the model's `scheduled_actions` tool does.
390
390
 
391
391
  **How it behaves**
392
392
 
@@ -401,6 +401,21 @@ Every function except `createScheduledAction` finds the home folder through `set
401
401
  * **Missed runs.** If the process was down when a run was due, the SDK emits `scheduled_action.missed` once. By default it runs nothing by itself and the action waits as `missed`: pick `run_now` or `skip`. Set `scheduled_action.onMissed` per action to decide in advance: `"skip"` moves on to the next time (a one-shot is `done`; a `skipped` event follows), `"run"` runs it as soon as the program is back (delivered when it finishes, marked `late`). The same applies to a run a crash cut off. An action whose creating Agent is gone stays `missed` whatever `onMissed` says (nothing can run it). A result saved before the process exited is simply delivered (marked `late`) on the first tick after start. `late` means the result was delivered more than two ticks after its time, finished after its delivery second, or replaced a missed run. A `run_now` result is delivered when it finishes: it is `late` only when it replaces a missed run (a `run_now` on a `missed` action, or `onMissed: "run"`), never for an ordinary early run.
402
402
 
403
403
  ---
404
+ ## Prompts
405
+
406
+ The SDK's own prompts (the reasoning directive, tool refusals, worker reply headers, the manuals of the `subagents` and `scheduled_actions` tools) are plain `.md` files in `src/prompts/`, exported as `DEFAULT_PROMPTS`. `AgentConfig.prompts` replaces single ones for an agent and its workers; the rest keep their defaults. `{{name}}` marks values the SDK fills in.
407
+
408
+ ```ts
409
+ import { Agent, DEFAULT_PROMPTS } from "agent-accelerator";
410
+
411
+ const agent = new Agent({
412
+ model: "google/gemini-3.5-flash-lite",
413
+ prompts: { toolNotFound: "Unknown tool '{{tool}}'.{{suggestion}} Use only the tools you were given." },
414
+ });
415
+ ```
416
+
417
+ **Keeping the original prompt is recommended**: it is what the SDK is tested with, and `DEFAULT_PROMPTS` is the reference for writing your own. Names, placeholders and where each prompt appears: [the prompts guide](docs/guides/prompts.md).
418
+
404
419
  ## Tools
405
420
 
406
421
  ```ts
@@ -427,6 +442,7 @@ const agent = new Agent({
427
442
  ### Tool Helpers
428
443
 
429
444
  * `tool({ name?, description, input?, parameters?, strict?, timeoutMs?, maxTries?, maxConcurrency?, execute })` — creates a `ToolDefinition`. Provide either a Zod `input` schema or raw JSON `parameters`. `execute(input, ctx)` may return arbitrary values; results are converted safely for model context. `timeoutMs` defaults to `0` (no time limit) and is a best-effort event-loop deadline; `ctx.signal` enables cooperative cancellation. `maxAttempts` is the canonical name for `maxTries` (number or numeric string). A positive value is the total attempt limit; `0`/omitted means 3 attempts for `idempotent` tools and 1 for all others. `maxConcurrency` limits simultaneous calls for that tool (default pool: 8).
445
+ * `toolContent([...])` — a tool's return value of text and media (`return toolContent(["chart.png", { type: "image", image: bytes, mimeType: "image/png" }])`). The text is the result every provider sees; Google (Gemini 3 and later) also gets the media inside the function result, other providers warn once and get the text only. Only a value made by `toolContent` counts, so JSON fetched by a tool can never become media. See the tools guide.
430
446
  * `toStandardToolDeclarations(record | array)` — converts tools to `{ name, description, parameters }` for providers.
431
447
  * `zodToJsonSchema(schema)` — converts Zod schemas using native conversion with a fallback extractor.
432
448
  * `cleanJsonSchema(schema)` — removes `$schema`, `$defs`, and `definitions`, resolves `$ref`, and preserves explicit `additionalProperties`.
@@ -717,10 +733,24 @@ It also:
717
733
  * passes `service_tier` (`flex` | `priority`);
718
734
  * sends audio with its real format (`wav`, `mp3`, `aiff`, `aac`, `ogg`, `flac`, `m4a`) and QuickTime video as `video/mov`;
719
735
  * sends file parts as `file.file_data` (a public URL or a base64 data URL) and never adds a plugin: OpenRouter reads the file natively or with its own default parser;
720
- * maps `tool_choice` (`auto` omitted; `none`, `required`, and function pins supported);
736
+ * maps `tool_choice` (`auto` omitted; `none`, `required`, and function pins supported; `validated` is Google-only and is dropped with one warning);
721
737
  * treats an error chunk inside a stream (HTTP 200) like an HTTP error: its status comes from the chunk's `code`, or from its `error_type` (`rate_limit_exceeded` 429, `provider_overloaded` 503, `provider_unavailable` 502, `timeout` 504, `server` 500), so `runRetries` retries the retryable ones;
722
738
  * reports `cached_tokens` / `cache_write_tokens` / reasoning tokens, preferring provider-reported `cost` when present (a reported `0`, a free model or a cache hit, stays a known `$0`);
723
- * accepts `anthropic/...` and `~anthropic/...` model names for the `5m` / `1h` cache setting.
739
+ * accepts `anthropic/...` and `~anthropic/...` model names for the `5m` / `1h` cache setting;
740
+ * sends a turn's `reasoning_details` blocks and parsed-PDF `file` annotations back on the next turns, exactly as OpenRouter returned them;
741
+ * reads provider routing and a few request fields from env vars (see below), never from `AgentConfig`.
742
+
743
+ **Env vars** (an Agent's own `env: { ... }` wins over `process.env`; nothing is sent for a variable that is not set; a bad value throws a `ConfigError` before any request):
744
+
745
+ | Variable | Sent as |
746
+ |---|---|
747
+ | `OPENROUTER_ORDER`, `OPENROUTER_ONLY`, `OPENROUTER_IGNORE` | `provider.order` / `only` / `ignore` (comma-separated provider slugs) |
748
+ | `OPENROUTER_ALLOW_FALLBACKS`, `OPENROUTER_REQUIRE_PARAMETERS`, `OPENROUTER_ZDR` | `provider.allow_fallbacks` / `require_parameters` / `zdr` (`true`/`false`/`1`/`0`) |
749
+ | `OPENROUTER_DATA_COLLECTION` | `provider.data_collection` (`allow` or `deny`) |
750
+ | `OPENROUTER_SORT` | `provider.sort` (`price`, `throughput` or `latency`) |
751
+ | `OPENROUTER_PARALLEL_TOOL_CALLS` | `parallel_tool_calls` (only when the request has tools) |
752
+ | `OPENROUTER_REASONING_EXCLUDE` | `reasoning.exclude` (the model reasons but the text is not returned) |
753
+ | `OPENROUTER_USER` | `user` (a stable end-user id) |
724
754
 
725
755
  `serviceTier` values other than `flex` / `priority` are omitted (standard routing).
726
756
 
@@ -1021,6 +1051,8 @@ TokenUsage {
1021
1051
  cacheReadTokens?,
1022
1052
  cacheWriteTokens?,
1023
1053
  thinkingTokens?,
1054
+ inputDetails?: { audioTokens?, videoTokens? }, // media part of inputTokens (OpenRouter), report only
1055
+ outputDetails?: { audioTokens?, imageTokens? }, // media part of outputTokens (OpenRouter), report only
1024
1056
  cost?: {
1025
1057
  inputCost?,
1026
1058
  outputCost?,
@@ -1138,6 +1170,7 @@ The model catalog is synced from [models.dev](https://models.dev) into a local c
1138
1170
 
1139
1171
  - **Automated 12-hour validation**: `.run()`, `.ask()` and `.stream()` check `<home>/catalog/models.dev.json`. Within 12 hours it reads from disk with no network delay. After that the expired catalog is served immediately and refreshed from `https://models.dev/api.json` in the background (8 s timeout). Only a cold start, with nothing loaded yet, waits for the download. A failed refresh pauses automatic refreshes for 10 minutes.
1140
1172
  - **Git & Package Safety**: The cache lives in the single Agent Accelerator home (`<home>/catalog/models.dev.json`, `.agent-accel/` by default and gitignored), never inside the package or scattered in the project.
1173
+ - **Spending-cap defaults**: `configure({ usageLimit, scheduledActionBudget })` sets the two caps for every agent you build (one call at startup, like `setHome()`; each call replaces the last, `configure({})` clears it). The env vars `AGENT_ACCEL_USAGE_LIMIT_USD` / `_TOKENS` and `AGENT_ACCEL_SCHEDULED_BUDGET_USD` / `_TOKENS` do the same. Precedence, field by field: the Agent's own config, then `configure()`, then env, then no cap. Workers and scheduled runs built by the SDK never take them.
1141
1174
  - **Environment**: `setHome(dir)` / `AGENT_ACCEL_HOME` move the whole home; `AGENT_CACHE_DIR` moves only the cache (for read-only or serverless filesystems). `AGENT_CATALOG_REFRESH=off` disables automatic refreshes; `bun run update-models` and `refreshModelCatalog()` still work.
1142
1175
 
1143
1176
  ### Developer Catalog Controls
@@ -1275,7 +1308,7 @@ Supported content parts include:
1275
1308
  * `ToolResultPart { type:"tool_result", id, name, result, isError? }`
1276
1309
  * `ImagePart { type:"image", image, mimeType?, resolution? }`
1277
1310
  * `AudioPart { type:"audio", audio, mimeType? }`
1278
- * `VideoPart { type:"video", video, mimeType?, resolution? }`
1311
+ * `VideoPart { type:"video", video, mimeType?, resolution?, processing? }`
1279
1312
  * `FilePart { type:"file", file, mimeType?, filename? }` — PDFs/documents.
1280
1313
 
1281
1314
  `image`, `audio`, `video`, and `file` inputs accept:
@@ -1321,6 +1354,16 @@ OpenRouter an image's `resolution` is sent as `image_url.detail` (`low` → `low
1321
1354
  downgrades to `high` where unsupported); a video's `resolution` is ignored. Other
1322
1355
  providers (and OpenRouter videos) ignore it with one `provider_warning`.
1323
1356
 
1357
+ `processing` (`VideoProcessing`: `"static" | "agentic"`) sets how Google reads one
1358
+ video. `"static"` (the default) puts frames taken at a fixed rate into the
1359
+ context. `"agentic"` lets the model explore the timeline and load only the
1360
+ transcript and frames the prompt needs, which suits long videos and
1361
+ needle-in-a-haystack questions (Google lists Gemini 4 Argon, 3.8 Flash, 3.6 Flash
1362
+ and 3.5 Flash Lite as supporting it; for any other model Google returns its own
1363
+ error). The model's `processing_call` / `processing_result` steps are kept and
1364
+ replayed with the rest of the turn's raw steps. Other providers ignore it with
1365
+ one `provider_warning`; an unknown value throws a `ValidationError`.
1366
+
1324
1367
  Before any network call, the executor checks `image` / `audio` / `video` /
1325
1368
  `file`-as-PDF parts against the catalog's `modalities.input` for that
1326
1369
  provider/model and fails fast with a one-line error naming the gap
@@ -1462,7 +1505,8 @@ bun run update-models # refresh model catalog cache (supports --force, --ttl=24h
1462
1505
  ```text
1463
1506
  src/
1464
1507
  ├── agent/ # Agent, context, loop, delegation, subagent
1465
- ├── scheduler/ # Scheduled actions: clock, store, tool + its manual (scheduled-actions.md)
1508
+ ├── scheduler/ # Scheduled actions: clock, store, tool
1509
+ ├── prompts/ # The SDK's own prompts as .md files, DEFAULT_PROMPTS, AgentConfig.prompts
1466
1510
  ├── session/ # Session persistence + telemetry (snapshots, hit rates, .session.json store)
1467
1511
  ├── providers/ # native REST adapters (google/openai/openrouter/openai-compat) + registry + canonical contract
1468
1512
  ├── models/ # Dynamic catalog cache, parser, verified overrides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-accelerator",
3
- "version": "0.6.0",
3
+ "version": "0.6.6",
4
4
  "description": "High-performance SDK for AI agents with a unified API across AI providers. Optimized for high cache hit rates, observability, and seamless agent orchestration. Built to power production-grade agentic systems and harnesses for teams at any scale.",
5
5
  "license": "MIT",
6
6
  "author": "Sashvat Bharat",