Class AgentResolver
java.lang.Object
io.agentscope.spring.boot.admin.registry.AgentResolver
Small unwrap helper that hides the
HarnessAgent composition from admin call sites.
HarnessAgent wraps a ReActAgent delegate via composition, so agent
instanceof ReActAgent returns false for harness-built agents. Every read-only accessor
the admin surface needs (model, AgentState, maxIters, permission engine, session, sessionKey,
middlewares) is either defined on the delegate or forwarded by HarnessAgent to the
delegate, so unwrapping once at the boundary is the simplest correct treatment.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.agentscope.core.ReActAgentunwrapReActAgent(io.agentscope.core.agent.Agent agent) Returns the underlyingReActAgentfor both bareReActAgentinstances and forHarnessAgent-wrapped agents (viaHarnessAgent.getDelegate()).
-
Method Details
-
unwrapReActAgent
public static io.agentscope.core.ReActAgent unwrapReActAgent(io.agentscope.core.agent.Agent agent) Returns the underlyingReActAgentfor both bareReActAgentinstances and forHarnessAgent-wrapped agents (viaHarnessAgent.getDelegate()). Returnsnullfor any otherAgentimplementation, so callers can short-circuit gracefully.
-