This is preview documentation. The official release is not yet available.
Choose a transport
Python now supports standard Service over outbound HTTP: use
control_plane_http=base, transport="http" (the default), without exposing an ASDP gRPC port or inbound worker port. See the unified Service API executable example for Agent, Team and Workflow workers. The example below uses the default HTTP runtime transport.
Verify three separate levels: catalog visibility, Session functionality and work dispatch. An observation-only adapter does not acquire task execution merely by registering.
Java HTTP integration
Add the published extension version to your application:agent. Supply deployment environment variables; the control plane must reach AGENT_CONTRACT_URL:
registrationCredential through the registration guide and supply it as CONTROL_PLANE_REGISTRATION_CREDENTIAL. The current Java bridge skips automatic registration when both the registration credential and bootstrap setting are empty. The preview registration endpoint itself does not authenticate callers; restrict it to a controlled network or gateway. The returned registration credential authenticates subsequent runtime connections and does not protect registration itself. Contract history and commands depend on the adapter. Java event reporting also requires adapter middleware at Agent construction and an ASDP runtime connection.
Python with HTTP runtime transport
Install the SDK version selected for your release:target. Adapters include AgentScope, OpenAI Agents, LangChain and ADK; supported methods differ.
POST /api/v1/agent-runtime/exchange) without a gRPC listener. To use gRPC, set transport="grpc" and control_plane="host:port". Give each replica a distinct instance key and retain identity and the event journal across restarts. Automatically selected observation adapters do not execute Issue/Team work. For task execution, explicitly supply the SDK’s AsyncInvokeAdapter, AgentScopeRunnerAdapter, or ExecutableAdapter through adapter=, or implement your own task entry point. See Adapter selection.
Registration API
POST /api/v1/agent-registrations accepts JSON to create or register an application replica under a logical Agent.
A successful request returns 201 with
agent, binding, instance, credential, and registrationCredential. Business resources reference agent.id. Runtime connections require matching Agent/Binding/Instance identity and instance.generation. credential contains metadata; registrationCredential is the plaintext value and belongs in protected server configuration.
The current registration endpoint does not authenticate callers or tokens in request headers. Restrict network access to registration. Runtime credential validation does not protect this initial endpoint; ownership, scope, and capability fields are not proof of identity.
Identity queries and credential maintenance
Management calls below require a platform account Bearer token authorized for the target namespace, not an application key.
Agent status
disabled prevents subsequent scheduling; archived archives the logical resource. Cancel active work through the task API. Changing catalog status alone is not proof that a running process has stopped.
SDK settings
The current Java bridge skips registration when both
registrationCredential and internalToken are absent, even when HTTP registration is enabled. You can obtain a credential through the registration API before starting the bridge. This SDK startup condition does not mean the server authenticates first registration.
Python’s start_grpc controls the selected runtime channel. Setting it to false disables task dispatch and event reporting even with transport="http". Keep its default true when receiving platform work.
Java
agentscope-extensions-controlplane adapts AgentScope Java Agent objects. Its contract includes context, messages, session commands, abort and task queries. The underlying Agent still determines whether a specific operation can execute.
Optional extensions include SessionHistorySource for history, AgentRuntimeSource for Workspace/Subagent inventory and runtime details, and AgentTaskStarter for dispatched work. HarnessAgentTaskStarter can consume platform definitions through a Workspace factory. The adapter advertises agent-task only when a task starter is configured; creating a bridge alone does not create a work executor.
Built-in Python adapters
Automatic selection calls
can_handle(target) and chooses the first match in registration order. Supply adapter= explicitly for unsupported wrappers or ambiguous matching.
The automatically selected adapters above provide observation and their implemented session capabilities; they do not execute dispatched Issue/Team tasks. For task execution, explicitly supply one of the SDK’s execution adapters through adapter=:
The
factory creates a fresh Agent or framework instance per task; input_builder maps platform task context to framework input. Custom runners should also isolate session state per task. Results must be JSON serializable; use result_mapper for custom types. See Runnable example and clients.
External and Hosted integrations are different even when names overlap: Claude Agent SDK integration is separate from running Claude Code CLI through Runtime Host.
Implementing a custom adapter
Subclass
FrameworkAdapter and pass it to agentscope_service.instrument(..., adapter=your_adapter), or register it with register_adapter(). The base class derives capabilities from overridden methods; empty implementations must not be used to claim support.
Inspect adapter capabilities through the API
RequestGET /api/v1/agents/{agentId}/instances with a platform account Bearer token and read each item’s capabilities. context-query and message-query provide queries, session-abort provides cancellation, and agent-task provides platform task execution. Instance capabilities depend on adapter configuration, not just the framework name.
GET /api/v1/agents/{agentId}/runtime-inventory returns reported Workspace and subagent information. not_reporting means telemetry is unavailable, not that no work has occurred. Applications use the Session API and inspect Session and Turn capabilities to discover interactions supported by the adapter.
See connection settings for registration fields and task dispatch for execution and reporting APIs.
Query contract and runtime transport
HTTP registration establishes identity. The application contract exposes queryable capabilities and session operations. Control-plane callback reachability is separate from outbound registration; verify both directions. Python defaults to HTTP exchange for execution and event reporting, with ASDP gRPC as an option. Java HTTP registration and query contracts operate independently; receiving platform tasks requires the current Java SDK’s gRPC runtime channel. See connection settings for parameters and network direction. An event journal supports connection recovery but does not store all business state or replace the framework’s Session store. The application retains responsibility for its data, tool connections and idempotent task handling.Dispatch lifecycle
The control plane selects an instance by binding capabilities and creates an Attempt. The application receives its identity, generation and task-scoped context.AgentTaskStarter or handle_agent_task creates isolated execution, reports progress/comments/Artifacts, maintains the required execution lease/state and reports success, failure or cancellation.
Associate results with that same Attempt. Respect stale-identity rejection rather than relabeling old results as another task’s success. Propagate cancellation into the framework and inspect terminal state; an accepted HTTP request does not prove execution has stopped.
Observe and control an execution through the API
Business applications create a Session targeting this Agent and submit Turns. Service dispatches through its runtime binding and records execution; callers do not create ExecutionAttempts. Work requiring manual assignment and acceptance can also start from the Issue interface.
Do not substitute a management token for the runtime-injected task token. After cancellation is accepted, read the task and Attempt to confirm the terminal state. External Agent Sessions expose cancellation when the selected instance advertises
session-abort; query capabilities for other interactions.