data-persistence-contract

Defines a durable MySQL database persistence contract for AgentHub's runs and artifacts.

Updated May 19, 2026
One-click install
npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill data-persistence-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-persistence-contract
Source: https://github.com/zxc1a1a1/Multi_Agent-AgentHub/tree/main/.agents/skills/data-persistence-contract
Command: npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill data-persistence-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents AgentHub’s history, runs, artifacts, and tool-calls from being lost or only stored in ephemeral memory or logs, by defining an explicit persistence contract for a multi-agent, single/group conversation system.

Core Features & Use Cases

  • Defines facts vs. non-facts: establishes what must be durably stored in the database versus what must remain temporary (SSE buffers, runtime caches, logs).
  • Standardizes entity relationships: specifies how Conversation, Message, Run, RunStep, AgentTask, ToolCall, and Artifact must relate for traceability across multi-agent runs.
  • Sets schema, indexing, and JSON rules: mandates snake_case DB fields, camelCase API projections, index plans, structured JSON constraints, soft-delete/archival boundaries, and MySQL/PostgreSQL evolution boundaries.
  • Enforces migration and safety: requires versioned migrations with expand/migrate/contract patterns and strict data security to avoid storing secrets, raw prompts, tokens, and permanent public URLs.
  • Enables contract testing: lists contract-test expectations to verify schema creation, core relationships, JSON validity, soft-delete integrity, and trace-based troubleshooting.

Quick Start

Use the data-persistence-contract Skill as the single source of truth for designing or updating AgentHub’s MySQL schema and migrations, ensuring every run artifact and tool call is persistently linked and auditable.

Frequently Asked Questions about data-persistence-contract

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

FAQPage Schema
How do I persist multi-agent run history and tool calls in MySQL for auditability?

To persist multi-agent run history in MySQL, you need a durable schema contract linking Conversations, Messages, Runs, RunSteps, AgentTasks, ToolCalls, and Artifacts. This ensures runtime execution transitions into auditable historical facts rather than ephemeral logs.

What data should be stored in the database versus kept in ephemeral memory for agent runs?

Durable database storage must capture conversations, messages, runs, steps, agent tasks, tool calls, and artifacts. Ephemeral memory should only retain SSE buffers, runtime caches, and logs, keeping temporary execution data separate from permanent historical facts.

How do I design schema migrations for multi-agent execution platforms without downtime?

Design schema migrations using versioned expand/migrate/contract patterns to ensure zero downtime. This approach safely adds new fields, backfills data, and removes deprecated columns while maintaining strict JSON field constraints and stable IDs across multi-agent execution.

Does my agent conversation database need special data security rules for prompts and tokens?

Agent conversation databases require strict data security rules to avoid storing secrets, raw prompts, tokens, and permanent public URLs. Schema contracts must enforce security redaction on persisted fields to prevent sensitive information leakage in artifacts.

Can I use soft-delete and archive rules for agent task artifacts in a relational database?

Yes, durable persistence contracts define explicit soft-delete and archive boundaries for agent task artifacts in relational databases. This maintains referential integrity for traceability while segregating active records from historical archived data.

What is the best way to trace multi-agent execution steps across single and group conversations?

The best way to trace multi-agent execution steps is defining standardized entity relationships with stable IDs. Linking Conversation, Run, RunStep, and AgentTask records enables complete run traceability across both single and group chat scenarios.