smithery.ai

memory-summary-retrieve

Retrieve memory summaries by ID, project, or recency. Returns structured JSON with compression metrics. Use to access compressed historical context for LLM prompts.

First seen Apr 24, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.1
LicenseApache-2.0
CompatibilityRequires BrAIny API at localhost:3000, Bun runtime
Allowed toolsBash(bun:*)
Declared agents opencode
More metadata
author
brainy
version
1.1
category
memory-management
subagent
summarizer

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 10,680 B
  • docs SUMMARY.md 195 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Memory Summary Retrieval

Retrieves existing memory summaries from BrAIny storage.

Execution Path

┌─────────────────────────────────────────────────────────┐
│                   EXECUTION DECISION                    │
├─────────────────────────────────────────────────────────┤
│                                                         │
│  ┌──────────┐     ┌───────────────────┐                │
│  │  START   │────▶│ SUBAGENT AVAILABLE?│                │
│  └──────────┘     └─────────┬─────────┘                │
│                             │                           │
│              ┌──────────────┴──────────────┐           │
│              ▼                             ▼           │
│       ┌────────────┐                ┌────────────┐     │
│       │    YES     │                │     NO     │     │
│       └─────┬──────┘                └─────┬──────┘     │
│             │                             │            │
│             ▼                             ▼            │
│  ┌─────────────────────┐      ┌─────────────────────┐  │
│  │ Task(summarizer,    │      │ Bash(bun scripts/   │  │
│  │   prompt: "...")    │      │   list-summaries.ts)│  │
│  └─────────────────────┘      └─────────────────────┘  │
│                                                         │
└─────────────────────────────────────────────────────────┘

Path A: Subagent Available (Preferred)

Use the summarizer subagent for lower token cost:

Task(
  subagent_type: "summarizer",
  description: "Retrieve summaries",
  prompt: "List summaries for project 3afb861a-b783-45a6-bba2-4b6d96468aeb limit 5"
)

Path B: Script Fallback

If subagent unavailable, execute scripts directly:

bun .opencode/skills/memory-summary-retrieve/scripts/list-summaries.ts PROJECT_ID [LIMIT]
bun .opencode/skills/memory-summary-retrieve/scripts/get-summary-by-id.ts SUMMARY_ID
bun .opencode/skills/memory-summary-retrieve/scripts/format-summary-context.ts SUMMARY_ID

State Machine

┌─────────────────────────────────────────────────────────────┐
│                  RETRIEVAL WORKFLOW                         │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌──────────┐     ┌─────────────────┐                      │
│  │  START   │────▶│ DETERMINE_MODE  │                      │
│  └──────────┘     └────────┬────────┘                      │
│                            │                                │
│         ┌──────────────────┼──────────────────┐            │
│         ▼                  ▼                  ▼            │
│  ┌────────────┐    ┌────────────┐     ┌────────────┐       │
│  │ BY_ID      │    │ BY_PROJECT │     │ FORMAT     │       │
│  │            │    │            │     │            │       │
│  └─────┬──────┘    └─────┬──────┘     └─────┬──────┘       │
│        │                 │                  │              │
│        ▼                 ▼                  ▼              │
│  ┌────────────┐    ┌────────────┐     ┌────────────┐       │
│  │ FETCH_ONE  │    │ FETCH_LIST │     │ FETCH_ONE  │       │
│  └─────┬──────┘    └─────┬──────┘     └─────┬──────┘       │
│        │                 │                  │              │
│        ▼                 ▼                  ▼              │
│  ┌────────────┐    ┌────────────┐     ┌────────────┐       │
│  │ OUTPUT_JSON│    │OUTPUT_LIST │     │OUTPUT_MD   │       │
│  └─────┬──────┘    └─────┬──────┘     └─────┬──────┘       │
│        │                 │                  │              │
│        └─────────────────┼──────────────────┘              │
│                          ▼                                 │
│                   ┌────────────┐                           │
│                   │    END     │                           │
│                   └────────────┘                           │
│                                                             │
└─────────────────────────────────────────────────────────────┘

States

State Entry Condition Action Exit Condition
DETERMINE_MODE Start Parse arguments Mode selected
BY_ID SUMMARY_ID provided Fetch single summary Data retrieved
BY_PROJECT PROJECT_ID provided Fetch summary list List retrieved
FORMAT --format flag set Fetch and format Content formatted
OUTPUT_JSON JSON mode Print JSON End
OUTPUT_LIST List mode Print table End
OUTPUT_MD Format mode Print Markdown End

Commands

Get Summary by ID

bun .opencode/skills/memory-summary-retrieve/scripts/get-summary-by-id.ts SUMMARY_ID

Input: SUMMARY_ID (UUID)

Output:

ID: abc-123
Type: coding_session
Compression: 6.25x (5000 → 800 tokens)
Memories: 44
Created: 2026-01-07T10:30:00Z

File: /tmp/summary-abc-123.json

List Project Summaries

bun .opencode/skills/memory-summary-retrieve/scripts/list-summaries.ts PROJECT_ID [LIMIT]

Input:

  • PROJECT_ID: UUID (required)
  • LIMIT: integer (default: 50)

Output:

Found: 3 summaries

1. abc-123
   Type: coding_session
   Compression: 6.25x
   Memories: 44

2. def-456
   Type: conversation
   Compression: 4.50x
   Memories: 30

Format for LLM Context

bun .opencode/skills/memory-summary-retrieve/scripts/format-summary-context.ts SUMMARY_ID

Input: SUMMARY_ID (UUID)

Output (Markdown):

## OBJECTIVE: Implement authentication

## PROGRESS:
- Created AuthService → JWT generation working
- Added middleware → Routes protected

## FILES TOUCHED:
| Path | Operation | Changes |
|------|-----------|---------|
| src/auth/service.ts | created | JWT logic |

## CURRENT STATE: Tests passing

## CRITICAL DETAILS:
- JWT_SECRET required in production
- Token expiry: 24h

Summary Structure

interface Summary {
  id: string;                    // UUID
  summaryType: string;           // coding_session | conversation | custom
  sections: object;              // Type-specific structured data
  content: string | null;        // Formatted text for LLM
  originalMemoryIds: string[];   // Source memory UUIDs
  originalTokenCount: number;    // Pre-compression tokens
  compressedTokenCount: number;  // Post-compression tokens
  compressionRatio: number;      // original / compressed
  model: string;                 // AI model used
  createdAt: string;             // ISO timestamp
}

Section Schemas

coding_session

{
  objective: string;
  progress: string[];
  filesTouched: { path: string; operation: string; changes: string }[];
  currentState: string;
  criticalDetails: string[];
}

conversation

{
  topics: string[];
  decisions: string[];
  actionItems: string[];
  context: string[];
  openQuestions: string[];
}

custom

{
  prompt: string;
  content: string;
  keyPoints: string[];
}

Configuration

Variable Default Description
BRAINYAPIURL http://localhost:3000 API endpoint
SUMMARYOUTPUTFORMAT json Output format (json \ markdown)

Error Codes

Error Cause Resolution
"Summary not found" Invalid SUMMARY_ID Verify UUID
"Project not found" Invalid PROJECT_ID Verify UUID
Empty list No summaries exist Run memory-summarize first

Decision Tree

What do you need?
├── Single summary by ID → get-summary-by-id.ts
├── List of project summaries → list-summaries.ts
└── Formatted text for LLM → format-summary-context.ts

Exit Codes

Code Meaning
0 Success
1 Error (invalid input, API failure)
2 Not found
3 No content