You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a Db2 for i Bee agent using the Bee agent template and it works great! The core logic comes from the custom "IBMiTool" that leverages a new database access layer for Db2 for i called Mapepire.
Here is my main question: is it possible to use custom Bee Tools like the one I created for Db2i within the chat UI? Is this already possible through the API?
On another note, Anthropic recently released MCP for connecting data sources with AI assistants, are there plans to explore this for Bee?
The text was updated successfully, but these errors were encountered:
My workaround at the moment is to create a simple webserver on IBM i that can talk to Db2 that accepts requests like:
curl -X POST http://HOST:PORT/api/execute-sql \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT * FROM sample.employee"}'
This will return the result set from the given SQL. The API is very similar to my "IBMiTool" used in the IBM i agent I mentioned above.
I can then create a "proxy tool" for Bee that sends requests to this endpoint:
importrequestsdefsend_sql_query(sql_query) ->dict:
""" Sends a SQL statement to the Flask server and returns the result. Args: sql_query (str): The SQL statement to execute. Returns: dict: The server's response as a dictionary. """url="http://HOST:PORT/api/execute-sql"# Server endpointheaders= {"Content-Type": "application/json"}
payload= {"sql": sql_query}
try:
response=requests.post(url, json=payload, headers=headers)
response.raise_for_status()
returnresponse.json()
exceptrequests.exceptions.RequestExceptionase:
return {"error": str(e)}
I created a bee agent for Db2 for i with access to this tool which works surprising well for toy examples:
I created a Db2 for i Bee agent using the Bee agent template and it works great! The core logic comes from the custom "IBMiTool" that leverages a new database access layer for Db2 for i called Mapepire.
IBM i agent: https://github.com/ajshedivy/bee-agent-ibmi
Here is my main question: is it possible to use custom Bee Tools like the one I created for Db2i within the chat UI? Is this already possible through the API?
On another note, Anthropic recently released MCP for connecting data sources with AI assistants, are there plans to explore this for Bee?
The text was updated successfully, but these errors were encountered: