database

Store agent events, sessions, and inter-agent communication in PostgreSQL.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/mgreenly/ikigai --skill database-mgreenly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/mgreenly/ikigai/tree/main/.claude/library/database
Command: npx skills add https://github.com/mgreenly/ikigai --skill database-mgreenly

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL-backed event store for ikigai that unifies agent registry, session lifecycle, message persistence, inter-agent mail, and conversation replay with talloc-based memory management.

Core Features & Use Cases

  • Persistent sessions and messages enable long-running agent coordination and offline recovery.
  • Agent registry with parent-child relationships supports hierarchical orchestration and deterministic replay.
  • Schema migrations, versioning, and replay APIs ensure safe evolution of the data model and reliable state reconstruction.

Quick Start

Initialize the database context and create a new session to begin persisting agent events.

Frequently Asked Questions about database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist agent events and sessions in PostgreSQL for long-running coordination?

To persist agent events in PostgreSQL, use a SQL-backed event store to manage sessions, messages, and agent state. This enables durable long-running coordination and offline recovery by storing the full conversation history and lifecycle in the database.

What is conversation replay and how does it work with an agent registry?

Conversation replay reconstructs prior agent states by reading persisted events from the database. It relies on an agent registry tracking parent-child relationships, ensuring hierarchical orchestration is deterministically replayed from the stored event stream.

How do I handle inter-agent communication and mail in a SQL-backed event store?

Inter-agent mail and communication are handled by storing messages within structured database schemas. This allows agents to exchange durable mail via SQL queries, ensuring no messages are lost during long-running sessions or unexpected shutdowns.

Can I safely evolve my database schema for agent messages and sessions over time?

Yes, you can safely evolve your database schema using built-in schema migrations and versioning. These features ensure updates to the data model for sessions and messages do not break existing persistent state or compromise historical replay capabilities.

Does this event stream approach support talloc-based memory management for agents?

Yes, the PostgreSQL event store integrates talloc-based memory management. This mechanism is used alongside the SQL-backed store to handle allocation and hierarchical freeing of memory during agent event processing and replay.