Short description of current behavior
When attempting to list agents using the server.agents.list() method, a KeyError is raised due to a missing 'tables' key in the params dictionary. This error occurs even when the agents are properly configured.
Actual Result:
A KeyError is raised with the message "'tables'".
Stacktrace:
Traceback (most recent call last):
File "C:\work\clients\mindsdb\server.py", line 7, in <module>
agents = server.agents.list()
^^^^^^^^^^^^^^^^^^^^
File "C:\work\clients\mindsdb\venv\Lib\site-packages\mindsdb_sdk\agents.py", line 233, in list
return [Agent.from_json(agent, self) for agent in data]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\clients\mindsdb\venv\Lib\site-packages\mindsdb_sdk\agents.py", line 203, in from_json
[Skill.from_json(skill) for skill in json['skills']],
^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\clients\mindsdb\venv\Lib\site-packages\mindsdb_sdk\skills.py", line 57, in from_json
return SQLSkill(name, params['tables'], params['database'], params.get('description', ''))
~~~~~~^^^^^^^^^^
KeyError: 'tables'
Video or screenshots
No response
Expected behavior
The server.agents.list() method should return a list of agent objects without raising any errors.
How to reproduce the error
-
Connect to MindsDB using mindsdb_sdk.connect()
-
List all databases using server.list_databases()
-
Attempt to list all agents using server.agents.list()
Anything else?
Environment:
MindsDB SDK version:
mindsdb_sdk==3.4.4
mindsdb_sql_parser==0.0.2
Python version: Python 3.12.4
Operating System: Windows 11pro
Additional Information:
This issue may be related to the configuration of the agents or the MindsDB SDK itself. Further investigation is needed to determine the root cause of the error.
Short description of current behavior
When attempting to list agents using the server.agents.list() method, a KeyError is raised due to a missing 'tables' key in the params dictionary. This error occurs even when the agents are properly configured.
Actual Result:
A KeyError is raised with the message "'tables'".
Stacktrace:
Video or screenshots
No response
Expected behavior
The server.agents.list() method should return a list of agent objects without raising any errors.
How to reproduce the error
Connect to MindsDB using mindsdb_sdk.connect()
List all databases using server.list_databases()
Attempt to list all agents using server.agents.list()
Anything else?
Environment:
MindsDB SDK version:
Python version:
Python 3.12.4Operating System: Windows 11pro
Additional Information:
This issue may be related to the configuration of the agents or the MindsDB SDK itself. Further investigation is needed to determine the root cause of the error.