i-am-bee / bee-agent-framework

The framework for building scalable agentic applications.
https://i-am-bee.github.io/bee-agent-framework/
Apache License 2.0
1.09k stars 106 forks source link

Support test code in python tools #175

Open planetf1 opened 4 days ago

planetf1 commented 4 days ago

The bee framework requires that Python tools contain only a single function, with optional imports.

When developing some python code for bee, it is useful to include some test code within the definition.

For example I would typically include something like this at the end:

if name == "main": f = open('test-data', 'r') find_stuff('mytextstring',f.read())

This makes it easy to run in vscode and then, for example, cut/paste directly into the bee framework.

There may be other ways of achieving the same goal, ie making it easier to develop small python functions, and then wrap them as an agent

This issue is targetted more at the UI - if coding using the API then there is more flexibility