github cloudflare/agents agents@0.7.6

5 hours ago

Patch Changes

  • #1090 a91b598 Thanks @threepointone! - Allow MCP clients to connect to localhost and loopback URLs again for local development while continuing to block private, link-local, and metadata endpoints.

  • #1088 16e2833 Thanks @threepointone! - Embed sub-agent (facet) API into the Agent base class. Adds subAgent(), abortSubAgent(), and deleteSubAgent() methods directly on Agent, replacing the experimental withSubAgents mixin. Uses composite facet keys for class-aware naming, guards scheduling and keepAlive in facets, and persists the facet flag to storage so it survives hibernation.

  • #1085 0b73a74 Thanks @threepointone! - Remove unnecessary storage operations in McpAgent:

    • Fix redundant props read in onStart: skip storage.get("props") when props are passed directly (only read from storage on hibernation recovery)
    • Replace elicitation storage polling with in-memory Promise/resolver: eliminates repeated storage.get/put/delete calls (up to 6 per elicitation) in favor of zero-storage in-memory signaling
  • #1086 e8195e7 Thanks @threepointone! - Simplify Agent storage: schema version gating and single-row state

    • Skip redundant DDL migrations on established DOs by tracking schema version in cf_agents_state
    • Eliminate STATE_WAS_CHANGED row — state persistence now uses a single row with row-existence check, correctly handling falsy values (null, 0, false, "")
    • Clean up legacy STATE_WAS_CHANGED rows during migration
    • Add schema DDL snapshot test that breaks if table definitions change without bumping CURRENT_SCHEMA_VERSION
    • Fix corrupted state test helper that was using incorrect row IDs
  • #1081 933b00f Thanks @threepointone! - Add default console.error logging to onWorkflowError() so unhandled workflow errors are visible in logs

  • #1089 a1eab1d Thanks @threepointone! - Add Workspace class — durable file storage for any Agent with hybrid SQLite+R2 backend and optional just-bash shell execution. Usage: new Workspace(this, { r2, idPrefix }). Import from agents/workspace.

Don't miss a new agents release

NewReleases is sending notifications on new releases.