AS AgentScopeAPI 手册 / API Reference

AgentResolver

public final class AgentResolver
源码Source io/agentscope/spring/boot/admin/registry/AgentResolver.java:31–50

智能体解析器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.registry 包。核心成员包括 unwrapReActAgent。

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

方法Method说明Description
public static ReActAgent unwrapReActAgent(Agent agent)
static
设置该参数。
Returns the underlying `ReActAgent` for both bare `ReActAgent` instances and for `HarnessAgent`-wrapped agents (via `HarnessAgent#getDelegate()`).

方法详情Method Detail

unwrapReActAgent

public static ReActAgent unwrapReActAgent(Agent agent)
static

设置该参数。

Returns the underlying ReActAgent for both bare ReActAgent instances and for HarnessAgent-wrapped agents (via HarnessAgent#getDelegate()).

参数Parameters
名称Name类型Type说明Description
agentAgent智能体(类型 `Agent`)。The agent.
返回Returns ReActAgent
返回ReActAgent。Returns ReAct agent.
源码Source io/agentscope/spring/boot/admin/registry/AgentResolver.java:41–49
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.