Release notes · Agent SDK
Agent SDK Release Notes
Changelog for @cognipeer/agent-sdk. For usage, see the Agent SDK documentation.
[Unreleased]
Added
- Documentation for smart-agent skills / progressive disclosure, including the
SkillandSkillPolicyAPI,open_skill/bind_skill_tools, VitePress navigation, and tool-heavy agent guidance.
[0.23.0] - 2026-11
OpenAI-shaped providers now expose clearer token-usage accounting controls, and agents using the raw context policy once again send recalled memory to the model.
Added
- OpenAI-shaped providers now support
usageCounting.OpenAIProvider,AzureProvider, andOpenAICompatibleProvidercan now declare whether cache read/write tokens are counted asexclusive,inclusive, orautowhen prompt usage is reported. - Prompt-token accounting is now explicit for cache-aware integrations. This helps hosts align SDK token totals with upstream servers that report cache usage differently across Chat Completions and Responses, including streamed calls.
TokenUsage.inputTokensReportedis now available on OpenAI-shaped providers. It tells you whetherinputTokenscame from a reported prompt/input token value or from fallback behavior when the provider omitted that field.- Usage assertions may need a small test update after upgrade. If you compare OpenAI-shaped usage objects with strict equality, include the new
inputTokensReportedkey or switch to a partial comparison.
Fixed
- Raw context policy now includes recalled memory in model input again. Agents using
context.policy: "raw"now send thememory_contextblock to the model instead of silently omitting recalled memory. - Memory is inserted without changing the rest of the raw conversation flow. The recalled-memory block is added right after the system prompt, or first when no system prompt exists.
- No migration or special upgrade step is required. Existing integrations can upgrade directly, but teams that depend on exact usage-object snapshots should review those expectations.
[0.22.2] - 2026-11
OpenAI Chat Completions structured output is more reliable in this release, so requests that reuse a shared item schema now succeed instead of failing on schema reference errors.
Fixed
- OpenAI Chat Completions now accepts shared-item structured output schemas. Requests that reuse a shared item schema no longer fail with schema reference errors on the Chat Completions path.
- Structured output behavior is more reliable for reused schema components. Integrations that send shared-item schemas through OpenAI Chat Completions can keep the same schema shape and expect the request to complete successfully.
- No migration or special upgrade step is required. Update to
0.22.2to pick up the runtime fix.
[0.22.1] - 2026-10
Paused smart runs now keep approved pending tool calls available after context summarization, so a resumed run can continue the approved work instead of failing with an error.
Fixed
- Approved pending tool calls now survive context summarization in paused smart runs. If a run paused for approval and summarization happened before resume, the approved call remains available when the run continues.
- Resume behavior is more reliable for approval-based tool flows. Smart runs no longer lose the approved pending call in this pause-and-resume path.
- Summarization no longer interferes with approved tool execution after resume. Long-running or context-heavy runs can summarize and still continue the approved tool step correctly.
- No migration or special upgrade step is required. Existing integrations can upgrade directly.
[0.20.0] - 2026-10
Planning and summarization events now include more location detail, so hosts and operators can see where each version or pass happened when they inspect SDK event streams.
Changed
- Planning events now include where each plan version was written. Event consumers can see location information alongside version data when a plan update is emitted.
- Summarization events now include where each pass happened. Event consumers get additional location context for summarization passes in the SDK events they already consume.
- Downstream tooling can inspect planning and summarization behavior with more context. Dashboards, logs, and custom event processors can distinguish versions and passes more precisely without changing the core SDK flow.
- No migration or special upgrade step is required. Existing integrations can upgrade directly unless their event consumers need to account for the additional event data.
[0.19.0] - 2026-10
Sub-agent traces now show child work as running as soon as a child agent starts, so streaming traces and custom trace consumers can reflect delegated activity earlier.
Changed
- Sub-agent traces now appear as running immediately. Child spans are emitted with a running status at start instead of only becoming visible later in the trace.
- Streaming trace views show delegated activity sooner. Operators can see sub-agent work begin earlier while a child run is still in progress.
- Custom trace event sinks receive the initial running state earlier. Consumers that process trace events as they arrive can react to child-agent activity sooner.
- Trace event timing changed slightly for custom consumers. If you rely on the previous timing of sub-agent trace records, review any downstream logic that assumes child spans appear later.
- No migration or special upgrade step is required. Existing integrations can upgrade directly unless they depend on the old trace-event timing.
[0.18.0] - 2026-10
Tracing exports OpenTelemetry GenAI spans and keeps sub-agent work together across approval pauses and resumes, making SDK traces easier to follow in downstream observability tools.
Added
- Tracing now exports OpenTelemetry GenAI spans. SDK tracing can emit GenAI span data for observability systems that consume OpenTelemetry.
Changed
- Sub-agent tracing now keeps one span across approval pauses and resumes. A delegated sub-agent run stays grouped under a single span instead of appearing split when human approval interrupts and then resumes the work.
- Trace timelines are easier to follow in multi-agent approval flows. Pause and resume activity for sub-agents is preserved as one continuous traced unit, which makes delegated execution easier to inspect.
- Observability integrations can capture SDK tracing more consistently. The tracing export changes improve how downstream tools receive and represent Agent SDK activity.
- No migration or special upgrade step is required. Existing integrations can upgrade directly to pick up the tracing improvements.
[0.16.0] - 2026-10
Sub-agent delegation is easier to inspect and more dependable, with clearer child status, usage, and spend signals during multi-agent runs.
Changed
- Sub-agent runs now report clearer status. Delegated calls surface child status more directly, so parent flows can show what happened in each child run with less ambiguity.
- Usage and spend are more visible in delegated workflows. Child usage and spend are exposed more clearly and accounted for more consistently in parent runs.
- Handoffs are more reliable and easier to follow. Handoff prompting and control transfer are clearer, which makes delegated agent-to-agent transitions easier to understand.
- Sub-agent observability is more consistent across parent and child runs. Multi-agent workflows now provide more dependable signals for inspecting child behavior and outcomes.
- No migration or special upgrade step is required. Existing SDK integrations can upgrade directly to pick up the improved delegation reporting and reliability.
[0.15.0] - 2026-10
Summaries are easier to inspect in traces, and carried-forward summary guidance is now stricter about preserving only what came from the user.
Added
- Trace sessions now show summarization events. You can inspect when context was compacted and see summarization activity in the same trace session as the rest of the run.
Changed
- Carried-forward summaries now keep only user directives. Non-user instructions are no longer preserved into later answers through summary carry-forward, which makes follow-on behavior more predictable.
- Summary behavior is easier to audit in tracing. Summarization steps now appear directly in trace sessions instead of being hidden from the session timeline.
- No migration or special upgrade step is required. Existing integrations can upgrade without changing summarization or tracing setup.
[0.14.0] - 2026-10
Tracing now keeps paused and resumed work together in one session, so approval flows, user questions, and client-tool resumes are easier to follow end to end.
Added
- Paused and resumed work now stays in one trace session. When a run pauses for an approval, a user question, or a client tool, the resumed work continues in the same trace session instead of appearing split across sessions.
- Trace events now include human decisions. Approval and user-question resumes are recorded as decision events, making it clearer why a paused run continued.
- Trace events now include client-tool resume decisions. Resumes triggered by client tools are also captured in the trace so operators can see the decision path for those pauses.
Changed
- Pause/resume traces are easier to read as one timeline. Related work now stays grouped under the original session rather than requiring readers to correlate multiple sessions by hand.
- No migration or special upgrade step is required. Existing integrations can upgrade without changing tracing configuration or pause/resume flows.
[0.13.0] - 2026-10
Model capability handling is now more consistent across providers and environments. The SDK ships shared model rules, broadens reasoning-model support, exposes browser-safe access to model rules, and can retry automatically after removing unsupported settings.
Added
- Shared model rules are now part of the public SDK surface. SDK consumers can use the shipped model rules data instead of maintaining separate capability handling across integrations.
- A browser-safe model rules entry point is available. Browser bundles can consume model rules through a dedicated export, while learned model fixes remain separated by backend.
- Broader reasoning effort values are accepted. Higher reasoning effort levels are now supported, and newer GPT reasoning model IDs are recognized so reasoning-specific handling applies more often.
Changed
- Requests can recover automatically from unsupported model settings. When a model rejects unsupported parameters, the SDK can remove the unsupported settings and retry once instead of requiring manual fallback logic in application code.
- Model capability behavior is more consistent across environments. Shared rules and updated reasoning-model detection reduce provider- and runtime-specific differences without requiring a migration step.
[0.12.0] - 2026-10
Provider calls can now name their upstream API explicitly, native providers can embed, and Claude's thinking text is visible. One change can alter behaviour on upgrade: how Bedrock extra keys are placed.
Breaking
- Bedrock
extrarouting. Keys that are not Converse request fields now go insideadditionalModelRequestFields, merged with the reasoning mapping. Converse's own top-level fields stay top-level. To force a key to the top level, put it underextra.__top.
Added
api: "chat" | "responses" | "auto"on the OpenAI, Azure and OpenAI-compatible providers. The default is"auto", which keeps each class's 0.11 behaviour (OpenAI and Azure use the model-name heuristic; OpenAI-compatible stays on Chat Completions), so upgrading changes nothing. TheresponsesApioption is a deprecated alias that still works."responses"streams over real SSE: text, tool-call arguments and reasoning-summary deltas.responsesApiModelsandresponsesStreamingnow work on Azure and OpenAI-compatible providers too. See Native providers.- Embeddings on native providers.
provider.embed({ model, input, dimensions?, inputType? })returns one vector per input and usage, for OpenAI, OpenAI-compatible, Azure, Bedrock (Titan, Cohere Embed) and Vertex. Anthropic and Jev reject it with a 400. See Embeddings. - Claude visible thinking. Adaptive (Claude 5.x) requests carry
thinking.display = "summarized", so the thinking text is no longer empty.thinkingMode: "auto" | "adaptive" | "budget"overrides the per-model choice of thinking form. See Claude thinking. - Transport options on every provider:
fetchandtimeoutMs.maxTokensParampicksmax_tokensormax_completion_tokensfor the OpenAI family. - Bedrock streaming over ConverseStream, with text, tool-call and reasoning deltas as they arrive.
- Gateway-grade request options:
streamUsage,seed,n,parallelToolCalls,logprobs,topLogprobs;rawFinishReasonandproviderFieldson responses;indexon streamed tool-call deltas. - Reasoning text from OpenAI-compatible servers (
reasoning_content) is parsed into the reasoning part and emitted as areasoningevent.
Changed
@langchain/*andlangchainare optional peer dependencies. Nothing imports LangChain at load;fromLangchainModelandfromLangchainToolskeep working when LangChain is installed. Install the packages yourself if you use those adapters.- Anthropic streams announce a tool call (id and name) when its block opens. A consumer that created a call on first sight of
namemust merge byidorindex. - Anthropic
reasoningTokensis populated from the API's thinking-token count. It is already part ofoutputTokens. - Claude Sonnet 5.5 (and reportedly Opus 5.5) do not support forced tool choice (
tool_choiceany/tool); Haiku 5.5 does. For those models a forced choice is mapped toauto, and the request is retried once withautoif the API still rejects it. - Bedrock stop reasons
model_context_window_exceededandguardrail_intervenedmap tolengthandcontent_filter.
Fixed
- Claude 5.x models no longer receive the budget thinking form they reject; adaptive requests strip
temperatureandtop_ponly when thinking is on. - Bedrock usage reads the cache token counts the API actually returns; SigV4 signing encodes model ids that contain
:correctly; Vertex embeddings keepoutputDimensionality.
[0.10.6] - 2026-10
Fixed
- Cancelling a run now stops the model. The abort signal or
cancellationTokenreaches the provider request for OpenAI (Chat Completions and Responses), Azure, Anthropic, Bedrock and Vertex, so the HTTP response stops streaming (and billing) instead of running on after the loop has walked away.ChatCompletionRequestgains an optionalsignalfor direct provider use. See Cancellation. - A cancelled model call is reported as
cancelled, not thrown. The run ends withctx.__cancelled, acancelledevent and anAssistant Cancelledtrace event. Text that had already streamed is kept, and a tool call that had not finished streaming is dropped, so the transcript never holds an unansweredtool_call. - Attachments are no longer
JSON.stringify'd into text. Token estimation, the summarizer's input and the trace display use a short placeholder such as[image: photo.png]instead of the base64 payload, which avoids needless compaction and unreadable summaries. See Attachments & Content Parts. - Responses API structured output with a reused sub-schema. In-document
$refs are inlined and unreferenceddefinitionsare dropped beforetext.formatis sent, so/responsesno longer answers400 invalid_json_schema. A schema without$refis sent unchanged.
Added
- Jev (TypeSafe) as a native provider.
createProvider({ provider: "jev" })talks to the System One decision API, andagentVerdictRule({ engine: "jev" })uses it as a guardrail judge. No extra dependency. See Native providers and Guardrails. partson trace message sections (typeTraceMessagePart), so a host can render a thumbnail wherecontentcan only name the image.describeContentPart,contentPartToText,mediaKindOfandhasMediaPart: the same placeholder text the SDK uses, for hosts that flatten content themselves.responsesApiModelsandresponsesStreamingon theopenaiprovider (opt-in). Routes the listed models to the Responses API for models that reject function tools on Chat Completions, and re-spells the Chat Completions options that/responsesrejects. See Native Providers.
[0.10.5] - 2026-10
Changed
- Strict tool calling is now the default on supported models. Tool-enabled agents now use stricter tool schema handling by default on endpoints that support it, which can change runtime behavior for existing tool flows after upgrade.
- Review and test any agent that uses tools on supported models after upgrading, especially if your current flow depended on looser schema handling.
- Validate tool definitions and tool-result handling against the stricter default so existing tool calls still succeed as expected.
summary_onlycontext now preserves more important conversation state. The SDK now keeps the first user instruction, tool results, and unsummarized recent turns instead of dropping them during summarization.- Workflows that rely on
summary_onlycontext should be rechecked after upgrade to confirm preserved instructions and recent execution context produce the expected behavior.
[0.10.2] - 2026-09-02
Fixed
- Nine plugin-host correctness bugs found in a security audit of the 0.10.0 plugin/hook layer:
userPromptSubmitwas silently skipped on every turn after a snapshot restore, so the input guardrail never ran again for that conversation.- An unknown decision string, and
askoutsidepreToolUse, degraded toallowinstead of failing closed. - A
denyunderoutputSchema(tool-based strategy) let the loop make one more model call before stopping. __guardrailBlockedleaked into the next turn and into snapshots, instead of being scoped to the turn it was set on.- A reason-less
denyinherited an earlier plugin's non-blocking reason. - Reviewer-edited
approvedArgsskipped schema validation and the approval gate. postToolUsedidn't run on apreToolUseshort-circuit or a cache hit.auditLogwrote tool arguments vianotification.detaileven withincludeArgs: false.
[0.10.1] - 2026-09-02
Fixed
createSmartAgent'suserPromptSubmitdeny didn't setctx.__guardrailBlocked.createAgent's own prompt-denial path sets this flag — the SDK's documented signal that a turn was blocked rather than answered — butcreateSmartAgentruns through its own copy of the same session-open/denial branch, which never set it. A caller checkingctx.__guardrailBlockedon a smart agent saw nothing and could not tell a blocked turn from an ordinary completed one.
[0.10.0] - 2026-09-02
Added
- Plugin/hook layer. A plugin system with three extension kinds — hooks (intercept, chained), contributions (add, accumulate), and strategy slots (replace, exactly one owner) — across 13 hooks, with 25 built-in plugins including the Cognipeer Console and Portkey guardrails. Multimodal input is carried through every hook: a text rewrite touches only the text parts, so attachments survive.
pluginCapabilities()reports what is actually wired, so an unimplemented seam is explicit rather than silent.
Fixed
Found by running tests that had never run — three handoff tests were skipped behind the first one — and by an adversarial review of the first attempt at the second one:
createSmartAgentsilently dropped thehandoffsoption. The smart loop rebuilds its tool set every iteration and wrote it overstate.agent.tools, so the handoff tool never reached the model.- A handoff swapped the tool menu but not the system prompt: the target ran under the originating agent's instructions and its own
systemPromptnever reached the model. The persona is now rebuilt on the wire per model call and never written to the transcript — persisting it made the next turn run the original agent under the target's persona, permanently. snapshot()threwDataCloneErrorafter any handoff: the handoff tool's raw output was the target's whole runtime, closures included. A checkpointing plugin withfailureMode: "open"swallowed the throw, so exactly the runs that needed a checkpoint silently got none.- Tools injected at runtime (
open_skillvia__runtimeToolsDelta) were dropped by the next tool-set sync, typically right after summarization. type: "image"content had no branch in the provider adapter, so the SDK's own image shape wasJSON.stringify'd into text and never seen.- Streaming emitted the final answer twice.
- A cancelled run left a dangling
tool_call, so the persisted transcript failed the next send with a 400. postToolUsenever ran on a tool error, and__finalStructuredOutputwas extracted before it — both leaked unredacted output.- A preopened skill (
InvokeConfig.preopenedSkills) could strand an approval-resume tool call. Appending the syntheticopen_skillexchange after an in-flight, not-yet-answered tool call buried it — the loop found the synthetic turn fully resolved, reported nothing pending, and exited having made zero model calls without ever running the approved tool. The synthetic transcript injection is now withheld when a tool call is already pending; the skill still gets bound.
[0.9.7] - 2026-08-31
Changed
- Updated the release packaging and publishing workflow used to build and publish the SDK.
- Refreshed release infrastructure and package metadata for this publish.
- No customer-facing SDK API or runtime behavior changed in this release.
- No migration or upgrade action is required for existing integrations.
[0.9.6] - 2026-08-18
Changed
- The planning tool is now
manage_plan, notmanage_todo_list.manage_todo_list's name collided, on downstream products with their own real "todo list" domain (a personal to-do backlog, unrelated to run planning), with a substring match used by a deterministic tool-recovery mechanism — it had no way to tell the SDK's own bookkeeping tool apart from a product's domain todo-list tool, and force-bound the wrong one.manage_todo_liststill works exactly as before: it is now a deprecated alias sharing the same handler and the same plan state (stateRef.todoList/planVersion/adherenceScore) asmanage_plan, both bound whenever planning is enabled, so an in-flight run or a caller still on the old name is unaffected. New exportcreateManageTodoListAliasToolalongside the existingcreateManageTodoTool(which now builds themanage_plantool).CONTROL_PLANE_TOOL_NAMESand the defaultcriticalToolslist carry both names for the duration of the alias.PlanEvent.sourcewidens to"manage_plan" | "manage_todo_list" | "system"and reports whichever name was actually called.
[0.9.5] - 2026-08-17
Fixed
sanitizeTracePayload(undefined)no longer returns the string"undefined".JSON.stringify(undefined)returns the realundefined(not a string);JSON.parseof that then coerces its argument to the string"undefined"and throws, and the old catch-all fallback answered withString(undefined)— the literal string"undefined". A caller that treats an absent field as a record (e.g. a tool-details renderer that spreads it) split that string into single-character indexed keys instead of showing nothing.undefinednow staysundefinedall the way through.
[0.9.4] - 2026-08-17
Added
TracingConfig.metadata. Arbitrary key-value tags (e.g.{ complexity: "complex" }) forwarded as-is on every tracing payload — session start, streaming events, session end, and the batched/OTLP session file (ascognipeer.metadata.<key>resource attributes) — purely so a downstream sink consumer can use them as reporting/attribution dimensions.
[0.9.3] - 2026-08-16
Added
- Per-model-call structured-output contract on trace events. Complements the tool-menu trace section from 0.9.2: every
ai_callevent now carries aresponse_formatsection ({type, strategy?, schemaName?, strict?, schema?}) recording whether a schema was enforced on that call and how — nativeresponse_format(strategy: "native") or the SDK's injectedresponsetool (strategy: "tool_based") — so a reply that isn't valid JSON can be told apart from a genuine model failure. Size-capped like the tool menu (section ≤64KB; beyond that the contract's identity survives while the schema body is dropped with atruncatedmarker). finishReasonon trace events, read from the provider's normalized response, so alength-truncated (output-ceiling) response is distinguishable from a model that simply answered badly.reasoningTokenson trace events — a subset ofoutputTokens, matching OpenAI'scompletion_tokens_details.reasoning_tokens, so a spend investigation on a reasoning model can see where the token budget actually went. Omitted (not zeroed) when the provider reports nothing, since a model that does no reasoning and a provider that reports nothing are different facts.
Fixed
- Native structured output could crash before a request was even sent, or produce a schema the provider would reject. The Zod → JSON Schema conversion passed options the pinned
zod-to-json-schemadoesn't support (openaiStrictMode,nameStrategy,$refStrategy: "extract-to-root",nullableStrategy); an unrecognised$refStrategymeant a recursive schema (z.lazy— comment trees, categories, org charts) recursed untilRangeError: Maximum call stack size exceeded. Conversion now uses the library's real strict-mode switch (target: "openAi").
[0.9.2] - 2026-08-15
Added
- Per-model-call tool menus on trace events. Every
ai_calltrace event now carries atool_definitionssection recording the exact tool menu the model was offered on that call ({name, description?, parameters?}per tool), since the bound tools can change between iterations and menus were previously never recorded per event. Size discipline matches the Cognipeer console ingest contract: ≤128 tools, name ≤200 / description ≤4000 chars, section ≤64KB. New exports:TraceToolDefinition,TraceToolDefinitionsSection,buildToolDefinitionsSection.
[0.9.1] - 2026-08-12
Added
needsApprovalaccepts a predicate — approvals decided per call. The gate previously read a static boolean, so a tool was either always gated or never:bashcould be paused, but "pause beforerm, not beforels" couldn't be expressed at all.needsApprovalnow takesboolean | ((args) => boolean), evaluated in the tools node with the parsed arguments in hand immediately before the call would run:tsA predicate that throws counts asneedsApproval: (args) => /^\s*rm\b/.test(args.command)true— a gate that cannot decide has not granted permission — and a predicate-bearing tool is always placed in the sequential execution group, since the parallel/sequential split happens before arguments are parsed.approvalPromptaccepts a function of the arguments, so the pause question can quote what is about to happen ("Runrm -rf build?") rather than describing the tool in general.TraceToolDetails.approval.conditionalmarks a tool whose approval is decided per call;approval.requiredstays absent since there is no static answer to record.
Compatibility
- Fully backward compatible:
needsApproval: true | falseand a plainapprovalPromptstring behave exactly as before.
[0.9.0] - 2026-08-07
Added
InvokeConfig.preopenedSkills— deterministic skill activation. Discovery viaopen_skillis the model's decision, which is right for a capability and wrong for a policy: a rule that only applies when the model happens to notice it is not a rule. A caller can now name skill keys per invoke; each one is opened before the first model call, through the sameopen_skilltool the model would have called, and written into the transcript as an assistant tool call plus its tool result. Tool-call ids are derived from the skill key rather than random, so an unchanged preopen set produces a byte-identical prefix and provider prompt caching keeps hitting. Unknown, unavailable, and already-open keys are skipped rather than injecting a broken exchange.
[0.8.12] - 2026-08-04
Fixed
- Summarization no longer archives the tool outputs the model just asked for. The recency window in
contextSummarizewas waived whenever no other compressible tool message existed — true on the very first pass, and again on every later pass once the backlog was archived, so the pass ate the freshest batch instead. The model then read theARCHIVED_TOOL_RESPONSEmarkers, paged every payload back in withget_tool_responseuntil that tool's execution budget ran out, and from then on simply re-issued the identical tool calls forever — a production research worker never terminated. The window is now unconditional and evaluated before the summary is generated, so a pass that can reclaim nothing costs no model call. - A deferred summarization pass no longer disables summarization for the rest of the run.
__summarizationExhaustedwas sticky, so the first pass that couldn't reclaim anything stopped the agent from ever compacting again. The flag now re-arms as soon as new tool output lands. - Recovering an archived tool payload no longer crashes summarization when the history entry carries no output.
[0.8.11] - 2026-08-04
Added
- Tool arguments are repaired before they are rejected. Grammar-constrained and smaller open-weight backends routinely emit arguments that are semantically right and syntactically wrong: a nested object arrives as a JSON string, a number as
"60", a boolean as"true", a single value where a one-element array was wanted, or every argument wrapped in oneinput/argsenvelope key.validateToolArgsnow validates the raw arguments first — so a model that emits well-typed arguments is unaffected — and only on failure runs the newcoerceToolArgsre-typing pass and re-validates. Coercion never fabricates a value, so a genuinely missing required argument still fails. - Validation failures now say what the tool wanted. A rejected call reports the original Zod issues plus a one-line rendering of the tool's top-level parameters and their JSON types.
Changed
- Optional nullable properties are published as plain types. Zod's
.nullable().optional()producedanyOf: [X, {"type":"null"}]for every constrained field, which grammar-constrained decoders follow least reliably; for a property that isn't inrequired, the null branch is now dropped from the JSON Schema sent to the provider. Strict mode is unaffected, since there every property is required.
[0.8.10] - 2026-08-02
Fixed
- Per-call reasoning config now merges with the adapter's default instead of replacing it. The adapter default is a property of the endpoint (for a self-hosted server, typically a
providerExtraspassthrough — a chat-template variable, a gateway flag); the per-call override is a property of the turn (an agent asking for more or less deliberation on this step). Replacing dropped the endpoint's fields the moment any agent set a per-run reasoning config — silently, on exactly the deployments that needed them.providerExtrasis now merged key-wise, one level deep, so a call can override a single flag without restating the endpoint's whole passthrough.
Added
reasoning.effort: "none". An explicit "do not think" instruction for a model that otherwise defaults to reasoning — distinct from omittingreasoningentirely, and not a validreasoning.level(there is no coherent "off" preset;reasoning.enabled: falseis how the whole feature is turned off).
[0.8.9] - 2026-07-31
Fixed
- Structured-output nudge and correction messages now use
role: "user"instead ofrole: "system". Several OpenAI-compatible chat templates (e.g. Qwen-class models) reject asystemmessage anywhere except the very start of the conversation, so the in-loop "you must respond with valid JSON" / "callresponseagain with corrected values" nudges were rejected outright by those backends.
[0.8.8] - 2026-07-29
Fixed
- Summarization spend is now recorded in
state.usage. Summarization is a real model call, but the node reported its tokens only to the tracing sink. A host billing fromresult.metadata.usagewas therefore short by exactly the summarizer's spend — and only on the long runs where summarization fires, i.e. the expensive ones. The ledger append thatagent.tsandagentCore.tshad each open-coded is nowrecordUsage()inutils/usage.ts, called from the summarization node too.
[0.8.7] - 2026-07-29
Fixed
clampToBudgetno longer drops the run's context anchor. Withcontext.policy: "raw", the over-budget clamp removed messages from the front of the transcript — and the first casualty was the first user message, which for worker-style agents carries the entire operating context and task brief. Models that lost it concluded "no task was provided" and bounced anask_user_questionback to the user mid-run. The clamp now pins every system message plus the first user message and drops the oldest assistant/tool exchanges instead.- Hybrid turn window keeps the first user message in both counting modes.
- Post-loop structured-output finalizer respects run pauses and budget signals, instead of continuing to nudge the model and execute tool calls after the main loop had already suspended for an approval, cancellation, summarization signal, or breached limit.
- Tool-call arguments can now be reclaimed under context pressure — see two-axis retention below.
Added
- Two-axis tool retention:
input(arguments) andoutput(result). Argument retention is now its own axis and is opt-in —createTool({ retention: { input: "digest", output: "summarize_archive" } }), or overridden per tool by the caller.input: "digest"is field-level, never whole-object: only string fields longer thanmaxToolInputFieldCharsare replaced with a digest descriptor, so identifying scalars (file paths, ids, indexes) survive verbatim. Control-plane tools (response,manage_todo_list,ask_user_question,open_skill, …) and delegation tools are never digested. get_tool_responsecan page arguments back in:part: "input" | "output"(defaults to"output", so existing callers are unaffected).preparescript so git-based installs (npm i github:Cognipeer/agent-sdk#branch) builddist/automatically.
[0.8.6] - 2026-07-29
Changed
- Internal refactor: extracted the shared
recordUsagehelper for per-request usage accounting (behavior unchanged).
[0.8.5] - 2026-07-26
Added
- Search-based skill discovery —
skillPolicy.disclosure: "search". Until now the only way for a model to learn which skills exist was the<available_skills>header block, which renders every skill's header into the system prompt on every turn — a cost that scales with the catalog size. Underdisclosure: "search"nothing is rendered into the prompt; the runtime registers asearch_skillstool instead, so discovery costs one tool description (constant) plus one tool call when the model actually needs a capability.search_skills({ query, limit? })is ranked by the new exportedsearchSkills(), a pure, deterministic keyword/prefix matcher (no embeddings, no I/O). The default stays"catalog", so existing agents are unaffected. New exports:SkillDisclosure,searchSkills,createSearchSkillsTool.
[0.8.4] - 2026-07-26
Fixed
ask_user_questionwas registered twice on a smart agent's base runtime, which maderesume()fail against providers that validate tool configs (Bedrock 400: The tool ask_user_question is already defined...).createSmartAgentbuilds the ask-user tool into the list it hands tocreateAgentand forwardshumanInTheLoopalongside it, attaching a second copy.createAgentnow attaches its built-ins only when the caller's list doesn't already carry a tool of that name.
Added
ASK_USER_TOOL_NAMEis exported from the root, so callers that inspect or filter an agent's tool surface don't have to hardcode the string.
[0.8.3] - 2026-07-25
Added
fileandaudiocontent parts across the native provider layer. New unifiedFileContent/AudioContenttypes let multimodal messages carry documents (PDF, DOCX, CSV, …) and audio clips alongside text/images, with per-provider wire mapping for Vertex/Gemini, Anthropic, OpenAI (Chat Completions and Responses), and Bedrock Converse.- Adapter normalization for incoming attachment shapes — LangChain-style standard data blocks, OpenAI
input_audioparts, raw data URLs, and already-unifiedsourceobjects. Previously any non-text/image part wasJSON.stringify-ed into the prompt as text (a token bomb that also hid the attachment from the model).
Fixed
- Vertex URL images no longer hardcode
image/jpeg. MIME type is now taken from the part'smediaTypeor inferred from the URL extension.
[0.8.2] - 2026-07-22
Added
- Tracing: caller-supplied
sessionId—TracingConfig.sessionIdlets a caller key the trace session by their own run/task/chat id instead of the auto-generatedsess_…id. - Tracing:
agentNameoverride —TracingConfig.agentNameoverrides the SmartAgent's own name in the emitted session/start payload.
Changed
- Tracing transport is now reliable. The
cognipeer/httpstreaming and batched posts (start,end, full-session) retry transient failures (network error, timeout, 404/408/425/429/5xx) with exponential backoff + jitter, honorRetry-After, and apply a per-attempt timeout. Previously a single transient failure silently dropped the whole trace session.
[0.8.1] - 2026-07-20
Added
- ContextPilot: native, deterministic context/token optimization layer. Opt-in via
contextPilot: { enabled: true }. Runs at tool-execution time (no extra model calls) to shrink large tool outputs before they enter the transcript, while keeping every original payload recoverable: format-aware compression (BM25-lite relevance scoring drivingjsonCrusher,textCrusher, plus dedicateddiffCompressor,logCompressor,searchCompressor), a reversible compress-cache-retrieve store recoverable viaget_tool_response, cross-turn duplicate detection, and cache-alignment warnings for volatile prompt substrings that would defeat provider-side prompt caching. Real-model A/B benchmarks measured 29–48% prompt-token reduction with no loss of answer correctness.
Fixed
- Restored provider tool-result coalescing that had regressed in 0.8.0. The published
0.8.0was built from the feature branch before the Anthropic / Bedrock / Vertex tool-result coalescing (shipped in0.7.3) was merged, so0.8.0silently dropped it. Upgrading0.8.0 → 0.8.1regains correct strict tool_use/tool_result pairing on tool-heavy turns.
[0.8.0] - 2026-07-20
Builds directly on the ask-user primitive (0.6.6) and the skill primitive (0.7.2) shipped over the preceding months.
Added
- Sub-agents (dynamic problem decomposition). Opt-in — a plain
createSmartAgent({ model })registers no sub-agent tools. Passsubagents: SubagentDef[]and/orsubagentPolicyto exposedelegate_to(subagent, input)for predefined registry sub-agents,spawn_subagent({ role, prompt, input, tools? })for ad-hoc specialists the orchestrator defines at runtime, andspawn_subagents_parallel({ tasks })for concurrent fan-out. Children inherit the parent's event / streaming / cancellation / tracing wiring and the existing delegation guards (maxDepth,maxChildCalls,childContextPolicy); a tool-approval orask_user_questionpause inside a sequential sub-agent surfaces to the parent and resumes transparently. - Prompt-override hooks (
promptHooks).transformSystemPrompt(prompt, ctx),toolDescriptions(override any built-in tool description by name), andsubagentCatalog(defaultBlock, subagents)let a caller intercept the SDK's otherwise-static prompt surfaces. asToolnow forwards observability. Delegated children spawned viaagent.asTool(...)previously ran "dark"; they now inherit the parent'sonEvent/onStream/onProgress/ cancellation wiring.- Testing & evaluation surface. New deterministic suites for the sub-agent primitive, an integration test running the public
runSmartAgentEvalHarnesswith a scripted (key-free) model, and a provider-matrix suite (npm run test:matrix) that verifies tool-calling / structured-output / streaming against any real provider whose credentials are present. New Testing & Evaluation guide.
Fixed
- Sub-agent human-in-the-loop resume no longer strands the run, when a delegating tool (
delegate_to/spawn_subagent) paused for a child approval /ask_user_questionin the same assistant turn as another tool that completed. - Two concurrent sub-agent pauses drain deterministically, instead of resolving one force-resolving the other with empty answers.
- Ad-hoc sub-agents keep their borrowed tools across a HITL resume.
- Bound skill tools survive pause/resume, instead of the per-invoke skill registry rebuilding empty on every invoke.
promptHooks.toolDescriptionsfunction form no longer corrupts sub-agent tool descriptions.- Sub-agents are opt-in. Previously a plain
createSmartAgentregisteredspawn_subagent+spawn_subagents_paralleland injected an<available_subagents>block by default. - Parallel spawn budget is charged only for tasks that run, instead of counting invalid tasks (unknown sub-agent, ad-hoc disabled) against
maxChildCalls. - SKILL.md frontmatter no longer splits scalar values on commas.
[0.7.3] - 2026-07-14
Fixed
- Coalesced multiple tool results into a single user message for Anthropic, Bedrock, and Vertex. These providers require strict
tool_use→tool_resultpairing; when an assistant turn produced several tool calls, eachtool_resulthad previously been sent as its own message. Results answering one assistant turn are now merged into a single user-role message per provider request, satisfying the pairing requirement and reducing per-turn message overhead on tool-heavy runs.
[0.7.2] - 2026-06-17
Added
- Skill primitive for progressive capability disclosure. New
src/smart/skills/module replaces the up-front tool-selector with on-demand skill opening, keeping the bound-tool count per step small — the property small/weaker models need.open_skill/bind_skill_toolsper-invoke tools (mirroring the ask-user tool'sstateRefpattern): a "small" skill binds all its tools at once, a "fat" skill returns a ranked tool index and binds a deterministic default floor for models that give no usable query. NewSkill/SkillPolicytypes (with aSMALL_TIERpreset), and a purecomposeToolSetsthat rebuilds both runtime tool-set variants with fresh references so newly-bound tools actually propagate across the identity-swap the runtime uses to sync tools between invokes. - Wired into
createSmartAgent. Passingopts.skillsbuilds a per-invoke skill registry, adds an<available_skills>header block to the system prompt (availability/tier resolved per invoke), and introduces a generic__runtimeToolsDeltamarker so a tool that binds new tools mid-run (likeopen_skill) makes them callable on a later turn within the same loop. - New
docs/guide/skills.mdanddocs/api/skills.mdreference pages.
[0.7.1] - 2026-06-01
Added
- Native reasoning round-trip (thinking blocks). Provider responses now surface a normalized
reasoningpayload ({ blocks, summary }). Anthropic and Bedrock thinking / redacted-thinking blocks (with signatures) are captured on the assistant message and replayed verbatim on the next request, satisfying the providers' signed-thinking requirement. Vertex/Geminithoughtparts and reasoning token counts are surfaced as a summary. OpenAI o-series / gpt-5 now route through the Responses API when reasoning is requested; Azure OpenAI gets the same via its/openai/responsesroute. reasoning.level: "minimal". A fourth, cheapest reasoning preset (effort: "minimal", reflection off).initial_then_after_toolreflection cadence. Reflects once up-front as a planning note, then likeafter_tool. New default forlevel: "medium"/"high".- Reflection hooks and routing.
reasoning.reflectionacceptsshouldReflect(override the cadence decision),buildPrompt(customize the probe),onReflection(side-effect hook), andfeedTo: "memory" | "plan" | "none"to route the note into aMemoryFactorplan.lastReflection. validateReasoningConfig(config). Exported pure validator that throws descriptive errors for invalidlevel,cadence,effort,budgetTokens,everyNTurns, orfeedTovalues.
Fixed
- Reflection throttling is now run-scoped.
reasoning.reflection.maxPerRuncounts reflections within the currentinvoke(...)instead of the whole (possibly resumed) conversation. - Native reasoning config lifecycle.
ctx.__reasoningis (re)applied on every invoke and cleared when native reasoning is disabled, so a resumed run can no longer inherit a stale reasoning configuration.
[0.7.0] - 2026-05-21
Changed (BREAKING)
- Default runtime-profile values modernized for frontier models. All four built-in profiles (
fast,balanced,deep,research) had their numeric defaults rescaled for 2026-era models (Claude 4.x, GPT-4o, Gemini 2.x) — the previous defaults were tuned for 8k–16k context windows and left too much headroom unused. Headline changes:fastmaxToolCalls4→8,maxContextTokens12000→32000;balanced(the shared baseline)maxToolCalls8→20,maxContextTokens24000→96000;deepmaxToolCalls14→40,maxContextTokens42000→200000;researchmaxToolCalls20→80,maxContextTokens56000→400000 — with each profile's summarization trigger,lastTurnsToKeep,maxChildCalls, andmaxToolResponseCharsscaled proportionally. Callers depending on the old conservative caps should pass explicitlimits/summarization/context/toolResponsesoverrides, or acustomProfile.
Added
- Tool observability tracing. New
TraceToolDetailstype captures detailed per-call tool information — execution status, retention policy, approval state — on trace events.
[0.6.6] - 2026-05-20
Added
- Ask-user (structured human-in-the-loop). Opt in with
humanInTheLoop: { askUser: true }oncreateAgent/createSmartAgentto register a built-inask_user_questiontool. When the model calls it, the runtime pauses with aPendingUserQuestionentry, emits auser_questionevent, and setsctx.__awaitingUserQuestion. Resume by callingagent.resolveUserQuestion(state, { id, answers }), which validates the response and appends it as arole: "tool"message bound to the originaltool_call_id. The globalallowFreeTextflag (defaulttrue) decides whether "Other" / typed answers are accepted; whenfalse, every question must include>= 2options. New exports:resolveUserQuestionState,createAskUserQuestionTool, and typesPendingUserQuestion,UserQuestionItem,UserQuestionOption,UserQuestionAnswer,UserQuestionAnswerSet,UserQuestionResolution,UserQuestionEvent,HumanInTheLoopOptions.
[0.6.5] - 2026-05-18
Added
- Parallel tool execution.
limits.maxParallelToolsnow actually fans non-approval tool calls across a bounded worker pool while preservingtool_use → tool_resultorder for Bedrock / Anthropic strict pairing. - Anthropic / Bedrock prompt caching. Opt in via
prompt_caching: { enabled: true }on the provider; system + final tool definition receivecache_control: ephemeral(Anthropic) orcachePointblocks (Bedrock Converse). Typical input-token cost drops by ~90% on long tool-heavy runs. - Opt-in tool result cache.
createTool({ cache: true | { keyFn?, ttlMs? } })short-circuits duplicate args within an invoke; cached hits surface asstate.toolHistory[].fromCache === true. - Per-tool retry / circuit breaker.
createTool({ retry: { maxRetries, backoffMs, shouldRetry, circuitBreakerThreshold } })retries transient errors with exponential backoff and trips a breaker after consecutive failures. - Provider retry + backoff. Native providers automatically retry 429 / 5xx with
Retry-After. Configure viacreateProvider({ retry }). - Delegation enforcement.
asToolreads the parent's resolveddelegationpolicy at runtime and enforcesmode,maxDelegationDepth,maxChildCalls, andchildContextPolicy(minimal/scoped/full). - Budget limits.
AgentLimitsgainsmaxTotalOutputTokens,maxCostUsd, andmaxWallClockMs. PairmaxCostUsdwithcostEstimatoron the agent options. - Pluggable token counter.
AgentOptions.tokenCounterswaps the built-in character heuristic for a real tokenizer per-invoke. Exported helpers:setTokenCounter,getTokenCounter,defaultTokenCounter. - Reflection budget.
reasoning.reflection.maxPerRunandreasoning.reflection.everyNTurnscap reflection cost on tool-heavy invokes. - stateRef per-invoke isolation. Concurrent invocations on the same agent instance no longer share plan / todo / tool-history references.
Fixed
- Summarizer uses
state.agent?.model(live runtime model), so handoffs and per-invoke model overrides reach compaction too. __summarizationExhaustedis cleared automatically when a new compactable tool result is appended; prevents deadlocks after partial retention bouts.state.ctxmutations fromtoolsNodepropagate to the caller correctly (delta now explicitly returnsctx).- Smart-agent runtime tool set includes the structured-output
responsefinalize tool whenoutputSchemais set. - Base-loop safety check honours the new
__limitBreachedexit reason. asTooldelegation sub-agents pre-initialize_stateRefso the parent's tools node can depositparentRuntime/ctxbefore the delegation runs.
Changed
- Documentation refreshed: limits/tokens, summarization, tool development, runtime profiles, native providers, getting started, and API reference now cover the new budget surfaces, prompt caching, parallel tool exec, tool cache/retry, delegation enforcement, and pluggable token counter.
[0.6.4] - 2026-04-29
Fixed
- Per-call
tool_choiceoverride was sent even when no tools were bound. The reflection node temporarily disables tools by clearing the tool list, but still passed atool_choiceoverride alongside it. Both the native adapter and the OpenAI provider now only forwardtool_choicewhentools.length > 0.
Changed
toolResponses.defaultPolicynow inheritscontext.toolResponsePolicy(falling back to the active runtime profile default) instead of always defaulting to"summarize_archive"regardless of whatcontext.toolResponsePolicywas set to.
[0.6.3] - 2026-04-28
Fixed
- A synthetic
summarize_contextmarker could leak out as a fake final answer. When the base loop exited purely to signal SmartAgent that summarization was needed, the last assistant message in state could be the internal synthetic summarization call rather than a real answer.createAgentnow suppressesfinalAnswer/streamevents in that case, andcreateSmartAgentstops running a post-turn summarization pass once the model has already produced a real terminal assistant turn.
[0.6.2] - 2026-04-22
Changed
- Removed additional stale no-op config fields:
context.archiveLargeToolResponses,context.retrieveArchivedToolResponseOnDemand, andtoolResponses.retryOnSchemaError(continuing the surface cleanup started in 0.6.0). - Context tools refactored into individually exported functions (
createManageTodoTooland others) and gained ahasToolResponseRecoveryReferenceguard that recognizes all four retention placeholder markers (ARCHIVED_TOOL_RESPONSE,STRUCTURED_TOOL_RESPONSE,SUMMARIZED_TOOL_RESPONSE,DROPPED_TOOL_RESPONSE) before honoring aget_tool_responserecovery request.
[0.6.1] - 2026-04-21
Added
- Unified
reasoningconfiguration oncreateAgent(...)/createSmartAgent(...)for provider-native reasoning plus post-tool reflection, generated by a new reflection node that produces insights without polluting the assistant's message history. - Reflection persistence on
state.reflectionsplusreflectionevents for streaming UIs and task timelines. - Native provider reasoning mappings for OpenAI/Azure/OpenAI-compatible, Anthropic, and Vertex/Gemini through the built-in provider layer.
Changed
- Getting-started, native-provider, state-management, tracing, and type docs were refreshed to describe reasoning/reflection behavior.
[0.6.0] - 2026-04-21
Changed (BREAKING)
- Tool response retention collapsed to a single lazy-summarizer model. Tool outputs are never reduced at tool-call time. When the summarizer runs (context limit reached), old tool messages are rewritten according to
toolResponses.defaultPolicy(defaultsummarize_archive); the full payload always stays available viaget_tool_responsebecause it is stored instate.toolHistory/state.toolHistoryArchived. - Removed config fields (no backward compatibility):
toolResponses.smallResponseChars,smallResponsePolicy,largeResponsePolicy,fallbackPolicy,keepRecentFullCount. - Classification enum simplified to
critical | informative | verbose(removedsmall,redundant). maxToolResponseChars/maxToolResponseTokensnow only drive an eager hard-cap truncation for non-critical, oversized single responses; the truncated head points atget_tool_responsefor recovery.- Summarization placeholder prefixes standardized:
STRUCTURED_TOOL_RESPONSE,ARCHIVED_TOOL_RESPONSE,DROPPED_TOOL_RESPONSE.
[0.5.4] - 2026-04-21
Changed
- npm republish of the
0.5.3source snapshot from the samegitHead; no additional repository diff was recorded for this publish.
[0.5.3] - 2026-04-18
Fixed
- Strict tool-schema mode now falls back safely instead of emitting a schema OpenAI's strict mode would reject. A new shape-scanner (
hasStrictUnsafeShape) detects untyped object properties,$refs, and unconstrainedanyOf/oneOf/allOfcompositions that strict mode can't represent; when a tool's schema contains one, strict mode is silently disabled for that tool instead of sending an invalidstrict: truetool definition the provider would reject outright.
[0.5.2] - 2026-04-17
Changed
- Native structured output now parses in a single pass instead of always going through the retry/nudge loop. When the active strategy is
"native"(the provider's ownresponse_format: json_schemacontract), the model's text output is guaranteed valid JSON, so the agent loop parses and finalizes immediately on the first text response — no nudges, no extra round-trips. Retries are now reserved for the"tool_based"strategy, where the model can still skip calling theresponsetool.
Fixed
- Strict JSON Schema conversion no longer sends the unsupported
formatkeyword, which some strict-mode validators reject outright.
[0.5.1] - 2026-04-15
Changed
- Internal refactor: consolidated message-content extraction and token-counting into shared utilities (
extractMessageText,countMessagesTokens), simplified thecreateSmartAgentsummarization call path behind atrySummarizehelper, and removed the unused legacytokenManagerutility and debug logger. No public behavior change.
[0.5.0] - 2026-04-14
Added
- Native LLM provider layer (
src/providers/) — direct API access for six providers without LangChain or any framework dependency.createProvider(config)supports"openai","anthropic","azure","bedrock","vertex","openai-compatible";fromNativeProvider(provider, options?)wraps any provider as aBaseChatModelfor drop-in agent-sdk use. Includes a unifiedChatCompletionRequest/ChatCompletionResponseschema, an SSE stream parser, AWS Signature V4 signing for Bedrock (zero AWS SDK dependency), and a Google Vertex service-account-JSON → JWT → access-token flow, all built in. 38 new unit tests and a new Native Providers guide.
[0.4.9] - 2026-04-13
Changed
- npm republish of the
0.4.8source snapshot from the samegitHead; no additional repository diff was recorded for this publish.
[0.4.8] - 2026-04-10
Changed
- Removed watchdog telemetry from the smart agent (metrics/config plumbing and its documentation); summarization logic no longer references watchdog metrics. Internal cleanup, no public API change.
[0.4.7] - 2026-04-09
Fixed
- A plain
createAgent(nosummarizationconfigured) could throw "Agent context exceeded the available budget" even though nothing had asked for summarization. The internal__needsSummarizationsignal introduced in 0.4.6 was being set regardless of whether summarization was actually configured. The active summarization threshold is now resolved once per agent (undefinedwhen summarization isn't configured) and the signal is cleared whenever it's inactive.
[0.4.6] - 2026-04-09
Added
- Safety check for abnormal loop exit. If the base loop terminates with an unresolved tool response and no valid exit condition is active (approval pause, cancellation, checkpoint, structured-output finalize, summarization signal), it now throws a descriptive error instead of silently leaking the raw tool output to the caller as if it were the final answer.
Fixed
- The final answer is now read from the last assistant message, not just the last message in state — closes a class of bug where a stray trailing message could be returned as the agent's answer.
[0.4.5] - 2026-04-07
Added
- Summarized tool responses now carry retrieval references. The placeholder left behind for a compacted tool message changed from a bare
"SUMMARIZED"string toSUMMARIZED_TOOL_RESPONSE [toolName=…; toolCallId=…; executionId=…]plus a one-line summary and aget_tool_responsehint, so the model (and downstream renderers) can tell which call was summarized and how to recover it, instead of an opaque marker.
Changed
get_tool_response's description and schema were expanded to also recognizeSUMMARIZED_TOOL_RESPONSEreferences, not justARCHIVED_TOOL_RESPONSE/DROPPED_TOOL_RESPONSE.
[0.4.4] - 2026-04-06
Changed
- npm republish of the
0.4.3source snapshot from the samegitHead; no additional repository diff was recorded for this publish.
[0.4.3] - 2026-04-05
Fixed
- Summarization could trigger prematurely. The context-size check that signals SmartAgent to summarize was reading
summarization.maxTokens(which controls summary output size) instead of the intendedsummarization.summaryTriggerTokensthreshold. It now preferssummaryTriggerTokensand only falls back tomaxTokenswhen the former isn't set. - A tool response kept with
retentionPolicy: "keep_full"was losing itssummaryfield (set to an empty string); the summary is now always computed before branching on retention policy.
[0.4.2] - 2026-04-04
Changed
get_tool_response's description was rewritten for clarity, spelling out the exactARCHIVED_TOOL_RESPONSE [executionId=…]/DROPPED_TOOL_RESPONSE [executionId=…]markers it expects and confirming it also accepts the originaltool_call_id.- Archived and dropped tool responses now surface as explicit
ARCHIVED_TOOL_RESPONSE [executionId=…]/DROPPED_TOOL_RESPONSE [executionId=…]messages (previously a single undifferentiated placeholder), each pointing back atget_tool_response.
Fixed
- Safer JSON serialization fallback for tool-response summarization when
JSON.stringifyreturns a non-string result.
[0.4.1] - 2026-04-03
Changed
- npm republish of the
0.4.0source snapshot; the only repository changes in this window were documentation/site theming, not part of the published package.
[0.4.0] - 2026-03-16
Added
- OTLP tracing sink/export helpers plus richer trace/session correlation fields (
traceId,spanId,parentSpanId,threadId) - Workbench integration tests covering invoke, tools, streaming, planning, and summarization flows
Changed
- Tracing configuration now exposes explicit
modesupport and a wider public export surface for remote session handling - Debugging, getting-started, and core-concepts docs were refreshed to describe the expanded tracing model
[0.3.1] - 2026-02-18
Added
threadIdtracing support for grouping multiple agent sessions under a single workflow or conversation
Changed
- Debugging docs were updated to explain grouped trace sessions and workflow-level correlation
[0.3.0] - 2026-02-16
Added
startStreamingSessiontracing helper export for streaming trace backends
Changed
- Agent/tracing runtime wiring was updated to prepare the streaming-session path
[0.2.9] - 2026-02-06
Added
- Tracing integration test coverage
Changed
- Token counting and context-budget heuristics were tightened for more accurate summarization thresholds
- Agent-core and decision logic around summarization flow were simplified
[0.2.8] - 2026-02-06
Changed
- Version-only npm publish on top of the
0.2.7line; no distinct source diff was recorded beyond the release bump
[0.2.7] - 2026-02-06
Added
- Comprehensive unit and integration test suites for agents, smart agents, approvals, pause/resume, snapshots, prompts, summarization, and token management
- Shared test fixtures/mocks and a Bedrock example in the examples workspace
Changed
- Example workspace dependencies and package metadata were refreshed
- Trace section utilities and usage helpers were expanded for diagnostics and testability
[0.2.6] - 2026-02-05
Changed
- npm republish of the
0.2.3source snapshot from the samegitHead; no additional repository diff was recorded for this publish
[0.2.5] - 2026-02-05
Changed
- npm republish of the
0.2.3source snapshot from the samegitHead; no additional repository diff was recorded for this publish
[0.2.4] - 2026-02-05
Changed
- npm republish of the
0.2.3source snapshot from the samegitHead; no additional repository diff was recorded for this publish
[0.2.3] - 2026-02-04
Changed
- SmartAgent summarization settings were refactored around clearer configuration and limit semantics
- Core agent, model, tools, tracing, and public types were updated to match the new summarization/runtime shape
- API docs, getting-started guides, limits docs, and examples were refreshed accordingly
[0.2.2] - 2026-01-09
Changed
- npm republish of the
0.2.0source snapshot from the samegitHead; no additional repository diff was recorded for this publish
[0.2.1] - 2026-01-08
Changed
- npm republish of the
0.2.0source snapshot from the samegitHead; no additional repository diff was recorded for this publish
[0.2.0] - 2026-01-06
Changed
- Documentation and example instructions were cleaned up for more consistent project setup and example execution
- README and examples were clarified ahead of the
0.2.xrelease line
[0.1.2] - 2025-10-17
Added
- Conversation guardrails, human-in-the-loop tool approvals, and comprehensive tracing with multiple sink options and session management
Changed
- Agent and Smart Agent types were unified and observability hooks were improved
- README and docs were expanded and reorganized across the published package surface
Fixed
- Trace
ai_callevents now include token fields consistently - Session path references were normalized in the docs
[0.1.1] - 2025-09-26
Added
- Initial npm release of the SDK with the base agent loop, smart-agent runtime, planning/TODO tools, summarization, structured output, tool limits, tracing/debug hooks, and documentation
For detailed changes, see GitHub Releases.

