Environment Configuration¶
Environment configuration includes infrastructure settings such as database and file storage.
Configuration¶
db(DatabaseConfig): Database configurationenabled(bool): Whether to enable database storage, default truedb_type(str): Database type, supportingsqliteandpostgresqlpg_dsn(Optional[str]): PostgreSQL connection string, required when using PostgreSQL
home_dir(str): AgentSociety data storage directory, default./agentsociety_data
Configuration Example¶
SQLite Configuration (Suitable for Development and Small-Scale Experiments):
env:
db:
enabled: true
db_type: sqlite
home_dir: ./agentsociety_data
PostgreSQL Configuration (Suitable for Production Environment):
env:
db:
enabled: true
db_type: postgresql
pg_dsn: postgresql://user:password@localhost:5432/database
home_dir: /var/lib/agentsociety