Files
memory-gateway/docs/superpowers/plans/2026-06-12-memory-gateway-agent-skill.md

2.2 KiB

Memory Gateway Agent Skill Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Create a reusable AI-agent skill that safely operates the Memory Gateway API through a deterministic Python CLI.

Architecture: Keep procedural guidance in SKILL.md, detailed endpoint schemas in references/api.md, and all HTTP/multipart behavior in one standard-library CLI. Read credentials from environment variables or explicit flags and never persist secrets in the skill.

Tech Stack: Agent Skills format, Python 3 standard library, pytest, Memory Gateway HTTP API.


Task 1: Scaffold the skill

Files:

  • Create: skill/memory-gateway-agent/SKILL.md

  • Create: skill/memory-gateway-agent/agents/openai.yaml

  • Create: skill/memory-gateway-agent/scripts/memory_gateway.py

  • Create: skill/memory-gateway-agent/references/api.md

  • Initialize the standard skill structure with init_skill.py.

  • Remove generated placeholders and keep only required resources.

Task 2: Implement and test the CLI

Files:

  • Create: tests/test_memory_gateway_skill.py

  • Modify: skill/memory-gateway-agent/scripts/memory_gateway.py

  • Write failing tests for environment credentials, JSON requests, multipart uploads, and HTTP errors.

  • Run the focused tests and confirm they fail for missing implementation.

  • Implement the standard-library CLI with commands for health, users, resources, search, add/flush, override, and delete.

  • Run the focused tests and confirm they pass.

Task 3: Author and validate the skill

Files:

  • Modify: skill/memory-gateway-agent/SKILL.md

  • Modify: skill/memory-gateway-agent/references/api.md

  • Modify: skill/memory-gateway-agent/agents/openai.yaml

  • Document the agent workflow, authentication rules, ownership checks, and safe handling of secrets.

  • Document endpoint parameters and CLI examples in the API reference.

  • Generate UI metadata with the official skill-creator script.

  • Run quick_validate.py, CLI --help, focused tests, and the full project test suite.