Class ContractHttpServer

java.lang.Object
io.agentscope.extensions.aistio.transport.ContractHttpServer
All Implemented Interfaces:
AutoCloseable

public final class ContractHttpServer extends Object implements AutoCloseable
In-process HTTP server for the /agentscope/* contract, letting the control plane pull on demand and issue session commands.

Routes mirror the Go connector.ContractServer and the Python SDK one for one:

   GET  /agentscope/info
   GET  /agentscope/health
   GET  /agentscope/sessions
   GET  /agentscope/sessions/{id}/state
   GET  /agentscope/sessions/{id}/context
   GET  /agentscope/sessions/{id}/messages?offset=&limit=
   GET  /agentscope/sessions/{id}/tasks
   GET  /agentscope/subagents
   GET  /agentscope/workspaces
   POST /agentscope/sessions/{id}/compress
   POST /agentscope/sessions/{id}/terminate
   POST /agentscope/sessions/{id}/abort
 

Built on the JDK's com.sun.net.httpserver so that instrumenting an agent never drags in a web framework or collides with the application's own server.