Create agent at Run time

Hi Team, Agno documentation is very cool and easy to understand. My question is, can we create agents & tools at run time? It seems like we have to write agents & tools for each and every use cases. Is there is any way I can create by configuring agents JSON. The agent required inputs I can read from JSON, but for tools it is expecting to pass as Python function or Dict.

Hi @prakash
Thanks for reaching out and for using Agno! I’ve looped in the right engineers to help with your question. We usually respond within 24 hours, but if this is urgent, just let us know, and we’ll do our best to prioritize it.
Appreciate your patience—we’ll get back to you soon! :smile:

Hey @prakash! Right now we don’t support defining agents in JSON or YAML files. You can create an abstraction on top of Agno to process the files to define the agents that might work. You can pass the name of the tool and when processing the file, you can have a dict that has a key-value pair of name and function call and call it.

Thanks for your response. Exactly I used dict as a tool to replicate this. But I got below error during tool execution.

Error:
openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: “Missing required parameter: ‘tools[0].function’.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘tools[0].function’, ‘code’: ‘missing_required_parameter’}}

Hey @prakash! Would you be able to share the code? That would really help in figuring things out. It’s a bit tricky to troubleshoot here since the issue might be coming from different sources, but I’d love to help! Let’s figure this out together.