Question

Agent Chat fails to call function

Hi, i’m testing an agent on GenAi Platform. I’ve added a route for a function. when testing a function directly, it’s working properly. But when i test whith agent chat in plkayground, it fails with a “function call failed”. i don’t know where to look for errors.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To troubleshoot the “function call failed” issue in the agent chat, check the following:

  1. Function Parameters: Ensure the function is receiving correct inputs during the chat.

  2. Logs/Errors: Review error logs for specific issues.

  3. Route Configuration: Verify the function route is correctly set up in the agent.

  4. Permissions: Check that the agent has necessary permissions to call the function.

  5. Test Simpler Functions: Test with a basic function to see if the issue is specific to the original function.

  6. Async Issues: Ensure there are no timing issues if the function involves async operations.

If issues persist, consult the platform’s documentation or support.

Bobby Iliev
Site Moderator
Site Moderator badge
May 7, 2025

Hey!

If the function works directly but fails in Agent Chat, it’s likely a mismatch between the function name, route, or expected response format. Double-check those first.

If everything looks right and it still fails, best to reach out to DigitalOcean support so they can check backend logs and help debug it further.

- Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.