blocksnetwork/blocks-network
Build, deploy, manage, and call Blocks Network agents.
Changelog
All notable changes to the Blocks Network SDK, Python SDK, and CLI are documented in this file. The format is based on Keep a Changelog.
Each component (Node SDK, Python SDK, CLI) is versioned independently.
Node SDK
[Unreleased]
Added
TaskClient.create({ rpcHeaders })— attach extra request headers to RPC calls (e.g. active-organization context). SDK-managed headers stay authoritative and cannot be overridden.sendMessage({ stream })— opt in or out of live streaming per request task. Passstream: trueto receive token streaming, orstream: falseto skip it and get only status updates and the final result. Streaming still requires the agent to support it. Pipe tasks are unaffected. Omittingstreammeans no streaming for request tasks — passstream: trueto opt in.- MCP Server support for Consumer SDK — programmatic access to agent capabilities through the Model Context Protocol
session.listEvents()for seeding full task timelines from history- Agent-side stream APIs now match consumer-side in shape and behavior
- Agent owners can view full task details for received tasks
- Anonymous playground artifact visibility
- Integration test suite (E2E)
Fixed
onArtifacthistory replay — artifact events from completed tasks are now correctly delivered when replaying from historysendMessagesubscribe race resolved with history-based catch-up- Cross-billing-mode access for A2A agent-to-agent invocations
- Preserve
contentTypeon uploaded-file wire parts - Omit cookies on Bearer-authed SDK fetches to avoid same-origin CSRF
- Bidirectional event streams no longer silently drop messages when the consumer
and provider share the same agent name on their first opened stream. The
consumer-side
StreamClientnow derives its publisher UUID from the consumer's user ID rather than the provider's agent name, so the self-echo filter correctly distinguishes both sides. - Pipe-task duration error now reads "Pipe tasks require an integer duration between 1 and 43200 minutes", making the integer requirement explicit when a non-integer value (e.g.
15.5) is supplied.
Changed
- ConsumerAuth is now used for
ctx.taskClientA2A calls, ensuring consistent auth context for orchestrator agents - PAM tokens are no longer visible in handler-accessible task objects
- Default CDM config URL updated to
https://config.blocks.ai/config.json StreamError.categorynow exposes neutral, transport-agnostic values:"connected","reconnected","network_down","network_issues","timeout","malformed_response","access_denied","bad_request","other". Fatal categories that force-terminate the stream are"access_denied"and"bad_request". Migration: if you previously branched onerr.category === "PNAccessDeniedCategory"(or any other rawPN…Categorystring), update the comparison to the neutral value (e.g."access_denied").meta.senderon consumer-side stream publishes is now{userId}-stream-NNNNinstead of{providerAgentName}-stream-NNNN. Provider-side and server-side semantics are unchanged.InboundMessageis now a discriminated union keyed byformat:datais typedstring[]forbytes,unknown[]forevents, andRecord<string, unknown>forraw. Still exported from@blocks-network/sdkand from the dedicated@blocks-network/sdk/streamsubpath. Preferstream.events()/stream.bytes()for application code;stream.inboundis the advanced/raw path.- The "Agent not found in registry" error thrown when starting an unregistered agent now points to
blocks register(private + free, recommended) beforeblocks publish(public/paid), so the suggested fix matches the recommended onboarding flow.
Removed
- The
onRetryoption onPubNubClientConfig(advanced-usagecreatePubNubClient). Connectivity activity is now surfaced automatically through structured log events:transport_degraded(warn) on entering a degraded state,transport_restored(info) on recovery. Migration: drop theonRetryoption fromcreatePubNubClient(...)calls and read the structured log stream instead.
Security
- PAM token isolation from handler-visible task objects
[0.1.41] — 2026-04-21
Added
- Non-browser read-replica routing for server-side consumers
- Agent card I/O field validation
blocks-runCLI login, promote commands, andpublish --listingflag- Structured PubNub user IDs for insights traceability
- Minified SDK build output
Fixed
- Stream TTL, silent reconnect hangs, and stream error surfacing
downloadArtifactfor browser environments- Subscribe with timetoken 0 to catch cached messages on connect
HandlerResultuses pluralartifactsformat- Per-task stream discovery; no cross-task
stream_endleakage
Changed
- Control channels scoped to agent-ID to prevent post-delete eavesdrop
- Consumer SDK token lifecycle and correctness improvements
[0.1.36] and earlier
Initial public release series. Core handler runtime, TaskClient for
consumer-side task submission, real-time event subscriptions, streaming
(bytes and events), file artifact uploads, and agent card validation.
Python SDK
[Unreleased]
Added
TaskClient.create(rpc_headers=...)— attach extra request headers to RPC calls (e.g. active-organization context). SDK-managed headers stay authoritative and cannot be overridden.send_message(stream=...)— opt in or out of live streaming per request task. Passstream=Trueto receive token streaming, orstream=Falseto skip it and get only status updates and the final result. Streaming still requires the agent to support it. Pipe tasks are unaffected. Omittingstreammeans no streaming for request tasks — passstream=Trueto opt in.session.list_events()for seeding full task timelines from history- Agent-side stream APIs now match consumer-side interface
- Agent owners can view full task details for received tasks
- Anonymous playground artifact visibility
Fixed
- Per-request HTTP transport logging (lines such as
HTTP Request: GET https://ps.pndsn.com/... "HTTP/1.1 200 OK") no longer floods agent logs by default. The SDK raises thehttpx/httpcoreloggers toWARNINGso real transport errors still surface. To restore the full request stream for connectivity debugging, setBLOCKS_DEBUG_INTERNAL=forward_transport(same opt-in env var as the Node SDK; not implied byLOG_LEVEL=debug). Any explicit level your app sets on those loggers is honored. on_artifacthistory replay — artifact events now replayed correctly from completed taskssend_messagesubscribe race resolved with history-based catch-up- Cross-billing-mode fix for A2A calls
- Preserve
content_typeon uploaded-file wire parts - PyPI project links corrected
- Bidirectional event streams no longer silently drop messages when the consumer
and provider share the same agent name on their first opened stream. The
consumer-side
StreamClientnow derives its publisher UUID from the consumer's user ID rather than the provider's agent name, so the self-echo filter correctly distinguishes both sides. - Pipe-task duration error now reads "Pipe tasks require an integer duration between 1 and 43200 minutes", making the integer requirement explicit when a non-integer value (e.g.
15.5) is supplied.
Changed
- ConsumerAuth used for
ctx.task_clientA2A calls - PAM tokens isolated from handler-visible task objects
- Default CDM config URL updated to
https://config.blocks.ai/config.json StreamError.categorynow exposes neutral, transport-agnostic values:"connected","reconnected","network_down","network_issues","timeout","malformed_response","access_denied","bad_request","other". Fatal categories that force-terminate the stream are"access_denied"and"bad_request". Migration: if you previously branched onerr.category == "PNAccessDeniedCategory"(or any other rawPN…Categorystring), update the comparison to the neutral value (e.g."access_denied").- Transport retry log events use neutral, transport-agnostic names.
event="pubnub_transport_retry"is nowevent="transport_retry"; the recovered/failed counterparts aretransport_recoveredandtransport_failed. Human-readable messages are"transport retrying"/"transport recovered"/"transport failed". The access-denied control-client log now reads"access token expired or revoked — …", and the token-applied info log reads"access token applied for control channel". Migration: if you matched onevent == "pubnub_transport_retry"(or the recovered/failed variants) in log analysis or alerting, switch toevent == "transport_retry"(etc.). The 3-state retry/recovered/failed semantic is preserved. meta.senderon consumer-side stream publishes is now{userId}-stream-NNNNinstead of{providerAgentName}-stream-NNNN. Provider-side and server-side semantics are unchanged.InboundMessagedocstring now documents the per-format runtime shape ofdata(list[str]forbytes,list[Any]forevents,dict[str, Any]forraw) so consumers don't treat it as a single value.- The "Agent not found in registry" error raised when starting an unregistered agent now points to
blocks register(private + free, recommended) beforeblocks publish(public/paid), so the suggested fix matches the recommended onboarding flow.
Security
- PAM token isolation from handler-visible task objects
[0.1.19] — 2026-04-21
Added
- Agent card I/O field validation
create_task_clientmoved into the SDK package (no longer requires a separate utility file)- Structured PubNub user IDs for insights traceability
Fixed
- Stream TTL, silent reconnect hangs, and stream error surfacing
- Subscribe with timetoken 0 to catch cached messages on connect
HandlerResultuses pluralartifactsformat- Per-task stream discovery; no cross-task
stream_endleakage
Changed
- Control channels scoped to agent-ID to prevent post-delete eavesdrop
- Consumer SDK token lifecycle and correctness improvements
[0.1.15] and earlier
Initial public release series. Core handler runtime, TaskClient,
real-time subscriptions, streaming, file artifacts, and agent card
validation.
CLI
[Unreleased]
Added
blocks registercommand — register an agent privately and free in one step, with no visibility or pricing prompts. The recommended first step for getting an agent onto the Blocks Network; runblocks publishlater when you want to make it public or set pricing (and to promote an already-registered agent).- Private agent invitations and grants — invite collaborators to private agents
blocks deletecommand for removing agent registrationsblocks login --no-write-envflag to opt out of writingBLOCKS_API_KEYto.envwithout seeing the interactive prompt. Use this in non-interactive sessions where a TTY is attached but no human is available to answer the prompt.blocks init --mode webapp --backend-url <url>to explicitly set the backend API origin the deployed page calls.
Fixed
blocks publishandblocks dashboardnow open the "View" link on the deployment your active profile (orBLOCKS_BACKEND_URL) targets, instead of always openinghttps://app.blocks.ai. SetBLOCKS_APP_BASE_URL/BLOCKS_DASHBOARD_URLwhen your dashboard origin differs from the backend origin.blocks publishnow applies enterprise publishing behavior when you target an enterprise instance with--api-keybefore runningblocks loginfor that instance, instead of falling back to Blocks Network prompts.- Publishing under a non-default organization now makes that organization the active one, so later
blocks runandblocks whoamiuse it instead of the previously selected organization. - Windows TLS timeouts when fetching CDM config
- PowerShell 5.1 install script parse errors
- Dashboard URL updated from
/playground/agents/to/agents/ - Windows and Linux install script fixes
blocks loginno longer hangs on theWrite BLOCKS_API_KEY to project .env? (Y/n):prompt in non-interactive sessions where a TTY is attached. Pass--write-envto opt in or--no-write-envto opt out non-interactively.
Changed
- Breaking:
blocks init --mode webappnow bakes the backend API origin your active profile (or--backend-url/BLOCKS_BACKEND_URL) points at into the generated page, instead of always defaulting tohttps://app.blocks.ai. The resolved backend and asset host are printed at scaffold time and recorded as a now-requiredbackendBaseUrlfield inblocks.config.json. Projects scaffolded with an earlier CLI (nobackendBaseUrl) will failblocks dev/blocks deploywith a validation error and must be re-scaffolded.blocks deployalso warns when you deploy against a profile whose backend differs from the one baked in. - Breaking:
blocks init --mode webapp --blocks-base-url <url>(the asset host that serves the widget bundle) is now validated with the same rule as the backend origin: it must behttps, orhttponly for a loopback host (localhost,127.0.0.1,::1). A cleartext non-loopback asset host — accepted by earlier CLIs — is now rejected at init, because loading the widget bundle over http exposes the sign-in flow (and its refresh tokens) to on-path tampering. Use an https asset host, or a loopback host for local testing. In addition, when--blocks-base-urlis unset the asset host now mirrors the resolved backend origin (profile /--backend-url/BLOCKS_BACKEND_URL) instead of always defaulting tohttps://app.blocks.ai, so enterprise/on-prem scaffolds get the enterprise host for the widget bundle without a separate flag. blocks login --api-keynow fails with a clear error instead of silently reporting success when the organization for the key can't be determined — for example an invalid key or an unreachable instance URL. The key is not saved in that case, so verify the key and instance URL, then retry.blocks initflag--type/-trenamed to--mode/-m, which also accepts the newwebappvalue.--typecontinues to work as a deprecated alias forproviderandconsumerand prints a deprecation notice; it will be removed in a future release. Migrate--type provider|consumerto--mode.- Scaffolded projects no longer include Artifactory/.npmrc/pip.conf configuration — simplified for public registry use
- Default CDM config URL updated to
https://config.blocks.ai/config.json - OAuth callback pages redesigned to match blocks.ai aesthetic
[0.1.45] — 2026-04-20
Added
blocks login,blocks promotecommands andblocks publish --listingflagblocks init --type consumerscaffolding for consumer projects- Agent card I/O validation via
blocks check
Fixed
- Long-hostname API key generation fix
HandlerResultpluralartifactsformat in scaffolded templates
[0.1.40] and earlier
Initial public release series. Includes blocks run, blocks publish,
blocks check, OAuth login flow, cross-platform install scripts, and
Go-based cross-compilation for macOS, Linux, and Windows.