A toy Database agent with ability to explore database with toolcalling, able to reflect and has long/short term memory.
cd AVIDA
pip install -r requirements.txt
Use your text editor, e.g. VScode, to create a .env file. Enter envronment variables like this
OPENAI_API_KEY= your openai api (only support this sofar)
LANGCHAIN_API_KEY = your langchain api, you can use langsmith to monitor the agent flow. For details, check their docs.
LANGCHAIN_TRACING_V2 = true
LANGCHAIN_PROJECT = xxxxxx
python db_initialization.py
Because i am lazy i did not write an interface for you to modify your database uri. Go agent.py and search "填入数据库连接信息", and type your database uri there. Only support sqlite so far.
To run the example, use Chinook.db
python backend.py
see agent_client.py