Skip to content

Extensions and Memory

NebulaRaven edited this page Aug 13, 2026 · 1 revision

MCP, Skills, Sub-Agents, and Persistent Memory

简体中文 · Home

MCP

GrayCode supports the Model Context Protocol over:

  • stdio with a local command, arguments, and environment variables.
  • SSE with a URL and request headers.
  • Streamable HTTP with an HTTP URL and request headers.

Once connected, server tools are offered alongside built-in tools. Connect only trusted servers and review commands, environment variables, and headers for sensitive data. If a model rejects a server's JSON Schema, try schema cleanup.

Skills

A Skill is an on-demand knowledge module for content such as:

  • Project conventions and commit rules
  • Framework or domain knowledge
  • Troubleshooting playbooks
  • Specialized tool and workflow instructions

The model sees a summary of available Skills and loads full content through read_skill only when needed. This avoids permanently injecting every knowledge module into the system prompt.

Sub-Agents

A Sub-Agent is a specialized agent with its own prompt and allowed tool set. Typical roles include test analysis, documentation, security review, and frontend visual inspection.

Key capabilities:

  • Foreground or background execution; foreground work can continue in the background when the user resumes chatting.
  • Nested delegation within configured depth and permission limits.
  • Mailbox communication between agents and the main conversation.
  • Continuation of completed runs through continueFromRunId.
  • Configurable iteration, runtime, queue timeout, and model synchronization policies.

SubAgent Monitor provides multiple run tabs, live output, pause/resume/exit controls, read-only history, and loading of earlier messages. Background results return as compact cards in the main chat with a link to the full run.

Avoid splitting tightly coupled steps that require shared immediate state. Delegate independent tasks with clear output boundaries.

OptMem persistent memory

OptMem retains project conventions, user preferences, knowledge, and decisions across conversations without an external memory service.

  • Global memory is shared by every workspace.
  • Workspace memory belongs only to the current workspace.

memory_wake and memory_recall cover both scopes. Older entries are compressed into tree summaries to save tokens, and memory_zoom expands those summaries. Other common tools include:

  • memory_note to record durable information.
  • memory_recall to search memory with regular expressions.
  • memory_compress to merge or compress summaries.
  • memory_forget to remove summaries or raw entries.
  • memory_config to inspect and adjust runtime limits.

Under Settings → Memory, you can inspect, edit, add, and batch-delete raw entries and tune wake lines, entry length, and pagination. Sub-Agents do not use memory tools by default, preventing duplicate or incorrect long-term writes.

Store only durable information that will matter later. Temporary task state belongs in TODO, Plan, or Progress rather than persistent memory.

Clone this wiki locally