mj-agent-infra-storage-stack

Inspect, back up, and troubleshoot the mj-agent Postgres and Redis storage stack.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/MJ-AgentLab/mj-agent --skill mj-agent-infra-storage-stack-mj-agentlab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mj-agent-infra-storage-stack
Source: https://github.com/MJ-AgentLab/mj-agent/tree/main/.claude/skills/mj-agent-infra-storage-stack
Command: npx skills add https://github.com/MJ-AgentLab/mj-agent --skill mj-agent-infra-storage-stack-mj-agentlab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing the mj-agent owned storage stack (mj-agent-postgres for LangGraph checkpointer state and the reserved mj-agent-redis container) requires knowing the postgres init bootstrap behavior, the AsyncPostgresSaver schema, safe backup/restore procedures, and the strict isolation boundary from the mj-system business database. This Skill consolidates those operational procedures so storage issues are diagnosed without touching compose lifecycle, env setup, or the upstream business database. ## Core Features & Use Cases - Postgres init inspection: Verify the 01-bootstrap-mj-agent-memory.sh first-boot hook created the mj_agent_memory database and RW user, and fix common failures (exec permissions, stale volumes, CRLF line endings). - Schema inspection and thread queries: List LangGraph AsyncPostgresSaver tables (checkpoints, checkpoint_writes, checkpoint_blobs) and query per-thread checkpoint counts. - Backup and restore: Run pg_dump/psql via docker exec for dev debugging and PR validation, with HITL confirmation before destructive down -v operations. - Redis wiring guidance: Explain the current unwired state of mj-agent-redis and the trigger conditions (session cache, streaming buffer, rate limit) for wiring a Python client. - Use Case: When Studio reports aget_tuple not implemented or connection refused on mj-agent-postgres:5432, use this Skill to check container health, verify the async checkpointer type, and inspect the memory database. ## Quick Start Ask the agent to inspect the mj-agent-postgres container and list the LangGraph checkpointer tables in the mj_agent_memory database.

Frequently Asked Questions about mj-agent-infra-storage-stack

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

FAQPage Schema
How do I inspect the LangGraph Postgres checkpointer schema?▼

Run psql inside the mj-agent-postgres container with docker exec and list tables in the mj_agent_memory database. LangGraph AsyncPostgresSaver creates checkpoints, checkpoint_writes, and checkpoint_blobs tables automatically on first connection.

How do I back up and restore LangGraph memory checkpoints?▼

Use pg_dump via docker exec against the mj_agent_memory database to export all checkpoints or filter by thread_id. Restore by dropping the public schema and piping the SQL file back into psql, but only in dev since this destroys existing checkpointer data.

Why does the postgres init script fail on first container startup?▼

Common causes are missing execute permission on the bootstrap shell script, stale volumes from a previous run, or CRLF line endings. Fix with chmod +x, dos2unix, or a confirmed docker compose down -v to recreate the volume.

Why does Studio report aget_tuple not implemented?▼

This error means the checkpointer is the synchronous PostgresSaver instead of AsyncPostgresSaver, which the async Chainlit driver requires. Check the checkpointer wiring in src/mj_agent/memory/checkpointer.py and switch to the async saver.

Can this skill modify the postgres init script or wire a Redis client?▼

No. Modifying the bootstrap script, Dockerfile, or compose files is a C-flavor code change handled by the implementation workflow, and wiring a Redis Python client is an A-flavor task. This skill only inspects, backs up, and troubleshoots the existing storage stack.