Agno supports using local JSON files as a “database” with the JsonDb class. This is a simple way to store your Agent’s session data without having to setup a database.
Using JSON files as a database is not recommended for production applications. Use it for demos, testing and any other use case where you don’t want to setup a database.

Usage

json_for_agent.py
from agno.agent import Agent
from agno.db.json import JsonDb

# Setup the JSON database
db = JsonDb(db_path="tmp/json_db")

# Setup your Agent with the Database
agent = Agent(db=db)

Params

ParameterTypeDefaultDescription
db_pathOptional[str]-Path to the directory where JSON files will be stored.
session_tableOptional[str]-Name of the JSON file to store sessions (without .json extension).
memory_tableOptional[str]-Name of the JSON file to store memories.
metrics_tableOptional[str]-Name of the JSON file to store metrics.
eval_tableOptional[str]-Name of the JSON file to store evaluation runs.
knowledge_tableOptional[str]-Name of the JSON file to store knowledge content.

Developer Resources