Class Aistio

java.lang.Object
io.agentscope.extensions.aistio.Aistio

public final class Aistio extends Object
Entry point for reporting a self-deployed agent to the aistio control plane.

Full instrumentation, including the Level-2 event stream, needs the observer middleware registered while the agent is being built, because a ReActAgent's middleware list is fixed at construction:


 AgentScopeAdapter adapter = new AgentScopeAdapter();
 ReActAgent agent = ReActAgent.builder()
         .name("Friday")
         .model(model)
         .middleware(adapter.middleware())
         .build();

 SessionBridge bridge = Aistio.instrument(agent,
         AistioConfig.builder("my-agentscope-agent")
                 .controlPlaneHttp("http://localhost:8081")
                 .internalToken(System.getenv("BUILDER_INTERNAL_TOKEN"))
                 .namespace("default")
                 .enableEvents(true)
                 .contractHttpPort(18090)
                 .build(),
         adapter);
 

instrument(Object, AistioConfig) also works on an agent that is already built. It reports session snapshots, effective context, history and commands — everything that reads live state — but emits no events, since there is no way to add a middleware after construction.

The returned bridge is AutoCloseable; close it to detach and release both channels.