接口的使用
io.agentscope.core.agent.Agent
使用Agent的程序包
程序包
说明
-
io.agentscope.core中Agent的使用
实现Agent的io.agentscope.core中的类 -
io.agentscope.core.agent中Agent的使用
参数类型为Agent的io.agentscope.core.agent中的方法修饰符和类型方法说明static AgentStateRuntimeContext.resolveAgentState(RuntimeContext ctx, Agent fallbackAgent) Resolves the liveAgentStatefor the current call, preferring the call-scoped state carried onctx(concurrency-safe) and falling back tofallbackAgent's state only when the context carries none. -
io.agentscope.core.agent.user中Agent的使用
-
io.agentscope.core.hook中Agent的使用
返回Agent的io.agentscope.core.hook中的方法参数类型为Agent的io.agentscope.core.hook中的构造器限定符构造器说明ActingChunkEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse, ToolResultBlock chunk) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for ActingChunkEvent.protectedActingEvent(HookEventType type, Agent agent, Toolkit toolkit, ToolUseBlock toolUse) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for ActingEvent.ErrorEvent(Agent agent, Throwable error) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for ErrorEvent.protectedHookEvent(HookEventType type, Agent agent) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for HookEvent.PostActingEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse, ToolResultBlock toolResult) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PostActingEvent.PostCallEvent(Agent agent, Msg finalMessage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PostCallEvent.PostReasoningEvent(Agent agent, String modelName, GenerateOptions generateOptions, Msg reasoningMessage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PostReasoningEvent.PostSummaryEvent(Agent agent, String modelName, GenerateOptions generateOptions, Msg summaryMessage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PostSummaryEvent.PreActingEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PreActingEvent.PreCallEvent(Agent agent, List<Msg> inputMessages) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PreCallEvent.PreReasoningEvent(Agent agent, String modelName, GenerateOptions generateOptions, List<Msg> inputMessages) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PreReasoningEvent.PreSummaryEvent(Agent agent, String modelName, GenerateOptions generateOptions, List<Msg> inputMessages, int maxIterations, int currentIteration) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PreSummaryEvent.ReasoningChunkEvent(Agent agent, String modelName, GenerateOptions generateOptions, Msg incrementalChunk, Msg accumulated) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for ReasoningChunkEvent.protectedReasoningEvent(HookEventType type, Agent agent, String modelName, GenerateOptions generateOptions) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for ReasoningEvent.SummaryChunkEvent(Agent agent, String modelName, GenerateOptions generateOptions, Msg incrementalChunk, Msg accumulated) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for SummaryChunkEvent.protectedSummaryEvent(HookEventType type, Agent agent, String modelName, GenerateOptions generateOptions) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for SummaryEvent. -
io.agentscope.core.middleware中Agent的使用
参数类型为Agent的io.agentscope.core.middleware中的方法修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> MiddlewareChain.MiddlewareMethod.apply(MiddlewareBase mw, Agent agent, RuntimeContext ctx, I input, Function<I, reactor.core.publisher.Flux<AgentEvent>> next) static <I> Function<I, reactor.core.publisher.Flux<AgentEvent>> MiddlewareChain.build(List<? extends MiddlewareBase> middlewares, Agent agent, RuntimeContext ctx, MiddlewareChain.MiddlewareMethod<I> method, Function<I, reactor.core.publisher.Flux<AgentEvent>> core) Build a middleware chain that producesFlux<AgentEvent>.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the tool-call execution phase.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the entire agent invocation.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onModelCall(Agent agent, RuntimeContext ctx, ModelCallInput input, Function<ModelCallInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the raw model API call.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the reasoning phase (LLM call + streaming output parsing).reactor.core.publisher.Flux<AgentEvent> TaskReminderMiddleware.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) default reactor.core.publisher.Mono<String> MiddlewareBase.onSystemPrompt(Agent agent, RuntimeContext ctx, String currentPrompt) Transform the system prompt string (pipeline pattern).reactor.core.publisher.Mono<String> TaskReminderMiddleware.onSystemPrompt(Agent agent, RuntimeContext ctx, String currentPrompt) -
io.agentscope.core.rag中Agent的使用
参数类型为Agent的io.agentscope.core.rag中的方法修饰符和类型方法说明KnowledgeRetrievalTools.retrieveKnowledge(String query, Integer limit, Agent agent, RuntimeContext ctx) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Retrieves relevant documents from the knowledge base. -
io.agentscope.core.shutdown中Agent的使用
参数类型为Agent的io.agentscope.core.shutdown中的方法修饰符和类型方法说明voidGracefulShutdownManager.bindStateSaver(Agent agent, ShutdownStateSaver saver) Register aShutdownStateSaverfor the given agent.booleanGracefulShutdownManager.checkAndClearShutdownInterrupted(Agent agent) Check whether the agent was previously interrupted by shutdown, and clear the flag.reactor.core.publisher.Flux<AgentEvent> GracefulShutdownMiddleware.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> GracefulShutdownMiddleware.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) GracefulShutdownManager.registerRequest(Agent agent) -
io.agentscope.core.skill中Agent的使用
参数类型为Agent的io.agentscope.core.skill中的方法修饰符和类型方法说明reactor.core.publisher.Mono<String> DynamicSkillMiddleware.onSystemPrompt(Agent agent, RuntimeContext ctx, String currentPrompt) -
io.agentscope.core.tool中Agent的使用
返回Agent的io.agentscope.core.tool中的方法参数类型为Agent的io.agentscope.core.tool中的方法修饰符和类型方法说明Sets the calling agent.reactor.core.publisher.Mono<List<ToolResultBlock>> Toolkit.callTools(List<ToolUseBlock> toolCalls, ExecutionConfig agentExecutionConfig, Agent agent, RuntimeContext agentRuntimeContext) Execute multiple tools asynchronously with agent-level context (internal use by ReActAgent). -
io.agentscope.core.tool.subagent中Agent的使用
类型参数类型为Agent的io.agentscope.core.tool.subagent中的类修饰符和类型接口说明interfaceSubAgentProvider<T extends Agent>Factory interface for creating agent instances. -
io.agentscope.core.tracing中Agent的使用
参数类型为Agent的io.agentscope.core.tracing中的方法修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onModelCall(Agent agent, RuntimeContext ctx, ModelCallInput input, Function<ModelCallInput, reactor.core.publisher.Flux<AgentEvent>> next)