Repository navigation
@vercel/agent-runs@1.0.0
·
5 commits
to main
since this release
Released 2026-11-15 · Compare with 0.0.4
Breaking Changes
@vercel/agent-runs1.0 puts its public API under semantic versioning, so it changes incompatibly only in a major release. (#5620)
Features
- Record an
agent.approvalspan for every wait on a person, including questions, budget prompts, and connection sign-ins, not just tool approvals.
agent.approval.kindistool-approval,question,budget, orsign-in. A wait sits under the tool call it's about, or under the turn when no call owns it, and a sign-in names its connection ineve.connection.name. Instrumentation providers now receive sign-ins oninteraction.openedandinteraction.settled, withsignIn.namenaming the connection or tool; the sign-in URL and code stay out of the event. Questions and sign-ins from workflow tools such asask_questionnow reach providers too, reported by the session that owns the tool call; a request a subagent asks is still reported once, by that session.@vercel/agent-runsaddsTurnOperation.approvalandfindApproval, and an optionalkindandconnectionNameon approvals. (#6004) - Decision spans now name their turn and purpose, and record per-question results as
gen_ai.decision.resultswhen the trace records outputs.
decision <model>spans carryagent.turn.idandagent.decision.purpose(model-selection,tool-approval,agent-routing, orcustom), so Agent Runs can place a model-selection decision in a turn that is still running. Results follow the proposed OpenTelemetry GenAI decision conventions: choices, predicates, scores with their levels, and refusals, each keyed by the question's position. They are output content, recorded only when outputs are and dropped for any destination that declines outputs.AgentRun.decisionaccepts an optionalpurpose, and completing a decision withoutputrecords it as the results. (#6389) - Add
decision <model>OpenTelemetry spans fordecide, automatic model selection, and tool approvals, with policy-aware model, usage, cost, and failure metadata that distinguishes refusals from request failures.
A decision sits under the operation it runs in, or under the turn when model routing runs before the turn's first step.@vercel/agent-runsaddsAgentRun.decisionand an optionalAgentTelemetry.activeSpan, so a decision nests under a host span inside its operation but not under a host span from another trace, such as a workflow step. (#5349)
Bug Fixes
- A context compaction's summary request during a turn now exports its own
chat <model>span under the turn'sinvoke_agentspan, with its token usage, cost, andai.settings.context.eve.compaction.request=summary, so traces no longer undercount compacting turns.
Model spans now also carryagent.turn.id.@vercel/agent-runsaddsTurnOperation.modelCallfor model calls a turn makes outside its steps.
Thanks @zackleman for reporting this in #5922. (#6251) - Name the memory store on memory provider tool calls, so a trace query by
gen_ai.memory.store.idfinds a scope's tool reads and writes as well as its recall and capture.
Theexecute_toolspan of a memory provider tool, such asprofile__save, now carriesgen_ai.memory.store.idandagent.memory.slot, matching thesearch_memoryandupsert_memoryspans of the same slot. The store ID is the slot's opaque scope key, so it is recorded whatever the trace policy captures.@vercel/agent-runsadds an optionalmemorylifecycle toActiveOperationon tool operations to record it. (#6147) - Fix durable agent traces keeping every finished turn that called tools in parallel: each one stayed in the session's serialized context, so step inputs grew with every turn.
A checkpoint this process had already written, read back through another execution context, was treated as another process's write and forked the turn's trace tree; the stale copy then overwrote the tool completions and the checkpoint was never deleted. A replaced tree now also stops persisting. (#5835) - Update eve's bundled dependencies, including the AI SDK, Vercel SDKs, Chat SDK, and MCP, to their latest releases, and OpenTelemetry to its latest 2.x releases.
eve now requiresai7.0.172 or later.
YAML frontmatter, eval data files, and OpenAPI specs now parse with js-yaml 5 and YAML 1.2 values. An unquoted date such as2024-01-02loads as a string instead of aDate, and a0bbinary literal such as0b101loads as a string instead of a number. The YAML 1.1 tags!!timestamp,!!binary,!!set,!!omap, and!!pairsare no longer recognized, and a mapping with a non-scalar key, such as? [a], throws.<<merge keys still work.
MCP connections over Streamable HTTP now fail when theserver/discoverrequest fails before the server answers, instead of retrying withinitialize. SetprotocolVersionDiscovery: falsefor a server that can't handle that request. Servers that answerserver/discoverwith a JSON-RPC error or an HTTP error status other than401still useinitialize, and servers that reject the protocol version with a supported legacy version still negotiate it. (#6378) - Keep oversized checkpoints honest by preserving the real
agent.trace.content.input/outputcapture flags and keeping the turn's copied input/output as a truncated copy (or omitting it) instead of rewriting the flags tofalsewhen a turn node exceeds the checkpoint size budget. (#5945) - Raise the tracing content caps from 32 KiB per attribute and 64 KiB per checkpointed operation to 250 KiB and 512 KiB, so prompts up to 250 KiB are captured in full instead of truncated. (#5945)
- Make connection sign-ins countable in traces: each sign-in span names its agent, a failed sign-in records its reason, and a call a connection refused records which connection and why.
agent.approvalspans now carrygen_ai.agent.nameandagent.name, so a query scoped to one agent no longer drops its sign-in prompts. A sign-in that fails with a reason code such asaccess_deniedrecords it asagent.connection.authorization.reason; a sign-in that ends any other way, such as one a new message withdrew, records none. A tool call that fails withConnectionAuthorizationFailedError, including one that never asked anyone to sign in, such asprincipal_requiredorsign_in_unavailablein a turn a schedule started, recordseve.connection.nameandagent.connection.authorization.reasonon itsexecute_toolspan. Only reason codes are recorded: a free-text reason or error message stays off the span whatever the trace policy records. (#6078) - Store a turn's attributes once in its checkpoint.
The turn's copy of the model input and output was also saved in the turn's data, which doubled that content in every checkpoint write and sent large prompts into the oversized-checkpoint fallback. Exported spans are unchanged. (#5949)