Update tool code, debug errors using conv.log, rotate API credentials, and fix integration issues without taking the agent offline.
Quick reference
- Go to Tools and select the tool
- Edit the Python function in the Function Editor
- Save, then test in Agent Chat
- Review logs in Conversation Review → Diagnosis
- 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
- Review Diagnosis logs for the failing tool
- Reproduce the issue in Agent Chat
- Check tool inputs – are parameters being passed correctly?
- Validate external APIs directly (Postman, curl)
- Review the tool description – is it clear when the tool should trigger?
Common errors
Managing secrets
When API keys or credentials change:
- Go to the Secrets tab on the workspace homepage
- Find and edit the secret
- 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.
If tools are slow:
- Add delay controls with filler phrases (“Let me check that for you.”)
- Cache frequently-accessed data
- Reduce unnecessary API calls
- Simplify logic and remove unnecessary processing
You can reference state variables in delay responses using $. For example: Still checking availability at $branch_name...
If the agent isn’t calling your tool when expected:
- Simplify the description – make it clear when to call the tool
- Update KB actions – ensure topics reference the tool correctly
- 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.”
Related pages