cloudflare/agents agents@0.14.0
cloudflare/agents
Captured source
source ↗agents@0.14.0
Repository: cloudflare/agents
Tag: agents@0.14.0
Published: 2026-06-02T10:03:30Z
Prerelease: no
Release notes:
Minor Changes
- #1623 `4c8b371` Thanks @threepointone! -
agentTool()now returns a structured failure envelope instead of an opaque error string, so a parent agent can tell a transient interruption apart from a terminal failure.
Previously every non-completed sub-agent run collapsed to { ok: false, error: string }. A child that was reset/superseded by a deploy or parent recovery (interrupted) looked identical to a genuine failure or an intentional cancellation, so the parent model would often parrot the interruption text back to the user as if the work had permanently failed.
The failure value is now AgentToolFailure:
type AgentToolFailure = {
ok: false;
status: "error" | "aborted" | "interrupted";
error: string; // still human-readable
retryable: boolean;
};interrupted→retryable: true(the run never reached a logical outcome; re-dispatching can succeed), and now surfaces the underlying interruption reason viaerror.aborted(intentional cancellation) anderror(genuine failure) →retryable: false.
This is backward compatible for consumers that read ok/error; the new status and retryable fields let an orchestration harness (or a parent prompt convention) re-run an interrupted sub-agent automatically rather than reporting it as final. AgentToolFailure is exported from agents.
- #1636 `f5a0d00` Thanks @threepointone! - Expose recovery incident identity and enrich the
onExhaustedpayload so
products can build a terminal-state policy without re-deriving anything (#1631).
ChatRecoveryContext(theonChatRecoveryargument) now includes
recoveryRootRequestId — the stable request ID for the whole continuation chain. Unlike requestId, it doesn't change across chained continuations, so it's the right key for per-incident budget tracking / fresh-incident detection without re-deriving identity from message IDs.
ChatRecoveryExhaustedContext(theonExhaustedargument) now carries
recoveryRootRequestId, terminalMessage (the exact text shown to the user), partialText / partialParts (what the turn produced before it was given up on), and streamId / createdAt — enough to render or persist a user-facing terminal banner AND emit correlated terminal telemetry (e.g. time-since-turn-start, stream correlation) directly, without re-deriving anything.
All fields are additive. Applied across agents (shared types), @cloudflare/think, and @cloudflare/ai-chat.
- #1584 `87006e2` Thanks @threepointone! - Add a framework-agnostic Agent Skills engine at
agents/skills: skill sources (fromManifest, R2), aSkillRegistrythat produces a catalog prompt and AI SDK activation tools (activate_skill,read_skill_resource,run_skill_script), binary-safe resource reads, and qualified cross-skill resource paths. Bundled skills are imported through the Agents Vite plugin with theagents:skillsspecifier (defaulting to a./skillsdirectory), typed via ambient declarations shipped fromagents.@cloudflare/thinkre-exports the engine asskillsand wiresgetSkills()into the turn; any AI SDK caller (including@cloudflare/ai-chat) can build aSkillRegistrydirectly.
Skill loading is resilient: duplicate or failing sources are skipped with a warning (first source wins) instead of throwing. Optional, experimental script execution (skills.runner) runs function-style JavaScript/TypeScript (export default run(input, ctx) with ctx = { skill, files, workspace, tools, output }) plus path-based Python and Bash, all behind a single capability and permission bridge.
- #1648 `d6827ab` Thanks @threepointone! - Surface a live "recovering…" status to chat clients during durable recovery (#1620)
When a durable chat turn is interrupted (a deploy/eviction, or a stream-stall watchdog abort) and resumes, clients had no "in progress" signal — the turn looked frozen until it completed or a terminal error was replayed. A new cf_agent_chat_recovering protocol frame is now broadcast on recovery schedule and cleared on every terminal outcome (completed/skipped/failed/exhausted), so the indicator can't spin forever. In @cloudflare/think it's also persisted and replayed on connect, so a client that joins mid-recovery learns the turn is working. useAgentChat exposes a new isRecovering flag (distinct from isStreaming — a recovering turn isn't producing tokens yet); most UIs render isStreaming || isRecovering as "busy". Backward-compatible: clients that don't understand the frame ignore it.
> Note: @cloudflare/ai-chat broadcasts the live signal but does not yet replay > it on connect (it has no idle-connect hydration path; tracked in #1645). > @cloudflare/think has both.
For recovery telemetry, subscribe to the chat:recovery:* observability events and route them to your analytics sink.
- #1611 `02f9380` Thanks @threepointone! - Add bounded, observable recovery foundations for durable chat turns and fibers.
- Add dedicated recovery observability channels/events for fibers, chat recovery, transcript repair, and agent-tool recovery.
- Bound internal framework fiber recovery hooks and parent agent-tool recovery scans so startup and recovery work cannot wedge indefinitely.
- Add shared chat recovery incident tracking with attempt counts, configurable
chatRecoverydefaults,...
Excerpt shown — open the source for the full document.
Notability
notability 3.0/10Routine library version bump, not a major launch.