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.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.

