Cysora Developers
← All recipes
MCP or API

Test your agent after a change

Who this is for: You change your agent over MCP or the API (or by hand) and want to see how it now answers, without opening the dashboard.

Outcome: Your MCP client or script starts one or more test conversations, sends a few customer-style messages, and reads the replies plus anything the agent would have submitted. Nothing reaches your sales pipeline.

1. Grant agent testing

Give your secret key, or your MCP connection, the Agent testing grant (read-write). It's included in the Builder and Full access presets. An MCP client connected before this grant existed needs to reconnect and approve again.

2. Start a test conversation

Start one per scenario, optionally with the first message. Over MCP this is the start_test_conversation tool. Pick the web or WhatsApp channel to test that channel's prompt. Send an Idempotency-Key so a retry never starts a second conversation.

POST /api/v1/agents/{agent}/test-conversations

3. Send a few turns

Send the customer's next message and read the agent's replies (MCP: send_test_message). Pass the turnCount you last saw as expectedTurnCount, and reuse an Idempotency-Key only when retrying the same message. Run several conversations in parallel for different scenarios.

POST /api/v1/agents/{agent}/test-conversations/{conversationId}/turns

4. Check what it would have done

Each turn returns simulatedActions: the signup fields, booking time, or payment the agent would have submitted. Nothing is delivered — no lead, email, booking, or payment link. Read the full transcript any time.

GET /api/v1/agents/{agent}/test-conversations/{conversationId}GET /api/v1/agents/{agent}/test-conversations

Tips

Need the exact request and response shapes? Open the API reference →