Database access
Connect directly to your datapack's PostgreSQL database
Every datapack includes a dedicated YugabyteDB (YSQL) database that you can access directly using standard PostgreSQL tools.
Connect
Via CLI
meko datapack connect --name my-datapack
This opens an interactive database shell connected to your datapack.
Via connection string
Each datapack provides a PostgreSQL connection string when created:
postgresql://db_my-datapack:password@host:5433/account_id_my-datapack
Use this with any PostgreSQL client: psql, pgAdmin, DBeaver, or your application's database driver.
What you can do
Read-only queries
Query your datapack's data directly:
-- View conversation history
SELECT * FROM conversations ORDER BY created_at DESC LIMIT 10;
-- Search memory entries
SELECT * FROM memories WHERE user_id = 'my-user';
Write queries
You can also write data directly to your datapack's database:
-- Create custom tables for your agent's data
CREATE TABLE project_notes (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
content TEXT,
created_at TIMESTAMP DEFAULT NOW()
);
Schema summary
Query the database schema to understand what tables are available:
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public';