Class AgentResolver

java.lang.Object
io.agentscope.spring.boot.admin.registry.AgentResolver

public final class AgentResolver extends Object
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 Type
    Method
    Description
    static io.agentscope.core.ReActAgent
    unwrapReActAgent(io.agentscope.core.agent.Agent agent)
    Returns the underlying ReActAgent for both bare ReActAgent instances and for HarnessAgent-wrapped agents (via HarnessAgent.getDelegate()).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • unwrapReActAgent

      public static io.agentscope.core.ReActAgent unwrapReActAgent(io.agentscope.core.agent.Agent agent)
      Returns the underlying ReActAgent for both bare ReActAgent instances and for HarnessAgent-wrapped agents (via HarnessAgent.getDelegate()). Returns null for any other Agent implementation, so callers can short-circuit gracefully.