Class AgentProtocolAutoConfiguration

java.lang.Object
io.agentscope.extensions.agentprotocol.AgentProtocolAutoConfiguration

@AutoConfiguration @EnableConfigurationProperties(AgentProtocolProperties.class) @ConditionalOnProperty(prefix="agentscope.agent-protocol", name="enabled", havingValue="true") public class AgentProtocolAutoConfiguration extends Object
Registers task protocol REST endpoints when enabled.

ConditionalOnBean is applied at the @Bean method level (not class level) to avoid Spring Boot auto-configuration ordering issues: class-level @ConditionalOnBean on @AutoConfiguration classes may evaluate before user-defined beans are registered.

Agent selection goes through AgentFactory. Without a user-defined bean, the default factory resolves the single HarnessAgent bean for every task; define an AgentFactory bean to route per agent_id or submission context.

Protocol task metadata is persisted through ProtocolTaskRepository, rooted at AgentProtocolProperties.getTaskStorePath() by default — not through any execution agent's workspace.

All RuntimeContextCustomizer beans are applied, in @Order, to the runtime context of every task run.

For concurrent task execution, register the HarnessAgent bean as @Scope("prototype") so that each task obtains its own instance. Alternatively, configure the singleton with checkRunning(false) if concurrent access is otherwise safe.