lavague-ai / LaVague

Large Action Model framework to develop AI Web Agents
https://docs.lavague.ai/en/latest/
Apache License 2.0
4.94k stars 420 forks source link

Local DB integration for logs #376

Open lyie28 opened 1 week ago

lyie28 commented 1 week ago

Current we have an AgentLogger which stores a log of info for the last agent run in memory which can be retrieved with the agent.logging.return_pandas() method.

We also have a LocalLogger option that stores the log for the last run in a local file.

We would like to add an integration where you can set an option when using agent.run() to add the info from the logger info a local database with SQLlite. I had in mind something like this, but open to ideas: agent.run(objective=objective, url=url, log_to_db=True)

More details about the logger is available in the docs: https://docs.lavague.ai/en/latest/docs/learn/local-log/

Or in the logger.py file: https://github.com/lavague-ai/LaVague/blob/main/lavague-core/lavague/core/logger.py

jashuajoy commented 5 days ago

Hi @lyie28, I might be able to help you with this. A quick question: Should the local DB store all the log data(like the data being returned when agent.logging.return_pandas() is run)?

lyie28 commented 4 days ago

Good question. @adeprez @dhuynh95 I had assumed we would pass all the log data to the database - is there anything you think we should drop?

adeprez commented 4 days ago

I support passing all the logs to the database, if any data needs to be filtered out, it should be removed before being collected in the logs

lyie28 commented 3 days ago

Do you still want to work on this one @jashuajoy? Shall I assign it to you?

jashuajoy commented 3 days ago

Yes @lyie28. I have a few follow up questions. Will ping you in discord.