DummyAgent

class DummyAgent(name: String = "test-agent", subAgents: List<BaseAgent> = emptyList(), beforeAgentCallbacks: List<BeforeAgentCallback> = emptyList(), afterAgentCallbacks: List<AfterAgentCallback> = emptyList(), description: String = "", disallowTransferToParent: Boolean = false, disallowTransferToPeers: Boolean = false, val onRunAsync: suspend FlowCollector<Event>.(InvocationContext) -> Unit = {}) : BaseAgent

A configurable dummy implementation of BaseAgent designed for unit testing.

This fixture assists developers in validating hierarchical agent designs and callback routing logic without relying on deeply wired production agents.

Parameters

name

The agent's identifier (defaults to "test-agent").

subAgents

The sub-agents managed by this agent (default is empty).

beforeAgentCallbacks

Callbacks executed prior to this agent's run.

afterAgentCallbacks

Callbacks executed after this agent's run.

description

The agent's description (default is empty).

disallowTransferToParent
disallowTransferToPeers
onRunAsync

Configures the lambda to simulate execution within runAsyncImpl.

Constructors

Link copied to clipboard
constructor(name: String = "test-agent", subAgents: List<BaseAgent> = emptyList(), beforeAgentCallbacks: List<BeforeAgentCallback> = emptyList(), afterAgentCallbacks: List<AfterAgentCallback> = emptyList(), description: String = "", disallowTransferToParent: Boolean = false, disallowTransferToPeers: Boolean = false, onRunAsync: suspend FlowCollector<Event>.(InvocationContext) -> Unit = {})

Properties

Link copied to clipboard
open override val config: NodeConfig
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val inputSchema: Schema?
Link copied to clipboard
override val name: String
Link copied to clipboard
Link copied to clipboard
open override val outputSchema: Schema?
Link copied to clipboard
open override val requiresAllPredecessors: Boolean
Link copied to clipboard
open override val rerunOnResume: Boolean
Link copied to clipboard
open override val stateSchema: Schema?
Link copied to clipboard
Link copied to clipboard
open override val waitForOutput: Boolean

Functions

Link copied to clipboard
fun run(context: Context, nodeInput: Any?): Flow<Event>
Link copied to clipboard
fun runAsync(parentContext: InvocationContext): Flow<Event>
Link copied to clipboard
open override fun runNode(context: Context, nodeInput: Any?): Flow<Any?>