Skip to main content
Update tool code, debug errors using conv.log, rotate API credentials, and fix integration issues without taking the agent offline.

Quick reference

Updating tool code

  1. Go to Tools and select the tool
  2. Edit the Python function in the Function Editor
  3. Save, then test in Agent Chat
  4. Review logs in Conversation Review → Diagnosis
  5. Publish when satisfied
Always test tool changes in Sandbox before promoting to Live.

Example: updating an API endpoint

Debugging

Using conv.log

Logs appear in Conversation Review → Diagnosis, Agent Chat (during testing), and the Conversations API.

Common debugging steps

  1. Review Diagnosis logs for the failing tool
  2. Reproduce the issue in Agent Chat
  3. Check tool inputs – are parameters being passed correctly?
  4. Validate external APIs directly (Postman, curl)
  5. Review the tool description – is it clear when the tool should trigger?

Common errors

Managing secrets

When API keys or credentials change:
  1. Go to the Secrets tab on the workspace homepage
  2. Find and edit the secret
  3. Save, then test all tools using it
  • Rotate credentials every 90 days
  • Use descriptive names (stripe_live_api_key, not key1)
  • Test all dependent tools after rotation

Managing API integrations

Configure per-environment endpoints in Integrations > API:
  • Sandbox – test/staging endpoints
  • Pre-release – UAT endpoints
  • Live – production endpoints
You won’t call production APIs during testing.

Optimizing performance

If tools are slow:
  1. Add delay controls with filler phrases (“Let me check that for you.”)
  2. Cache frequently-accessed data
  3. Reduce unnecessary API calls
  4. Simplify logic and remove unnecessary processing
You can reference state variables in delay responses using $. For example: Still checking availability at $branch_name...

Improving tool triggering

If the agent isn’t calling your tool when expected:
  1. Simplify the description – make it clear when to call the tool
  2. Update KB actions – ensure topics reference the tool correctly
  3. Check for conflicts – ensure other tools aren’t being called instead
Bad description: “Handles reservations” Good description: “Call this tool when the user wants to book a table. Required: date, time, party_size. Only call after confirming all three with the user.”
Last modified on July 1, 2026