Response Behavior

The Response Behavior step (Step 7 in the wizard) controls how your mock agent responds to incoming messages.

Mock agent response configuration

Default Response Mode

Choose how the agent responds when no simulation trigger matches:

ModeDescription
EchoReturns the user's message back as-is with a timestamp
CustomUses the Visual Flow Builder to define response logic

Default Latency

Set an artificial delay (in milliseconds) added to all responses. Range: 0–10,000ms. Useful for simulating slow agents or testing loading states in your client.

Simulation Features

Simulation features are keyword-triggered behaviours that override the default response mode.

Error Simulation

When enabled, any message containing a trigger keyword returns a JSON-RPC error response.

Configuration:

  • Trigger Keywords — Comma-separated list (e.g., error, fail, crash)
  • Error Code — JSON-RPC error code (default: -32000)
  • Error Message — The error message string

Example: Sending "please fail" returns:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32000,
    "message": "Simulated error"
  }
}

Delay Simulation

When enabled, the command "delay N" in a message adds N seconds of delay.

  • delay 3 — adds a 3-second delay
  • Maximum delay is configurable (default: 10 seconds)

Status Simulation

When enabled, the command "status STATE" in a message sets the task state to STATE.

Supported states: working, completed, failed, input-required, canceled, submitted

Streaming Responses

Streaming simulation is planned for a future update. Currently all responses are synchronous.

Custom Flow Mode

When Custom mode is selected, the Flow Builder becomes available. Click Configure Flows to open the visual editor.

In Custom mode you can define per-skill flows. Each skill ID maps to a SkillFlowGraph that runs when a message targets that skill (via skill routing or direct invocation).

See Flow Builder for full documentation.