Skip to main content
  1. Documentation/

Skills & Memory

2 mins
Table of Contents

Skills
#

Skills are knowledge-only markdown packages. They implement three-stage progressive disclosure to minimize context window consumption:

StageWhat the agent seesToken cost
1. AdvertiseCompact index in system prompt: name + description~100 tokens per skill
2. LoadFull SKILL.md via load_skillVaries
3. ReadSpecific resource files via load_skill_resourceOn demand

Skills live at skills_dir/{name}/SKILL.md with optional resources/ directories. Metadata is synced to a skills table in the database.

Skill Creation and Modification
#

Agents can create or modify skills via submit_skill, which goes through a skill-specific review pipeline: taint check, hash check, structure validation, injection scan, and AI reviewer.

Tainted conversations cannot modify skills without human review. This prevents a poisoning chain: web content → agent → skill modification → persistent knowledge base corruption.

The platform ships with built-in skills (e.g., failure-patterns for common failure modes, iterative-planning for the Ralph Loop pattern). Built-in skills are synced at startup without overwriting user modifications, so they serve as defaults that evolve through experience.

Memory Architecture
#

Conversation Boundaries
#

In single-stream messaging (Signal, Telegram), a 6-hour silence gap triggers a new conversation. At the boundary, a background thread generates a structured summary covering:

  • Topics discussed
  • Key decisions made
  • User preferences noted
  • Pending items

New conversations receive the prior summary rather than raw message history, preserving continuity without consuming context on stale details.

Cross-Conversation Recall
#

The knowledge base provides full-text search (FTS5 with BM25 ranking and Porter stemming) across:

  • conversations/ — past conversation summaries
  • reflections/ — self-reflection outputs

Recent conversation hints (last 3 titles and dates) are appended to the system prompt automatically.

Reflective Self-Improvement
#

Cadenced self-reflection runs via cron, forming a compression chain:

CadenceInputOutput
DailyRaw activity data: conversations, arcs, tools, errorsDaily notes
WeeklyDaily reflections + 7-day statisticsWeekly patterns
MonthlyWeekly reflections + 30-day stats + skill catalogMonthly insights

Each reflection creates a dedicated conversation, invokes the full chat agent with tool access, saves to the reflections table, and archives the conversation. An activity threshold skips API calls on quiet days.

Reflection Auto-Action
#

Reflections produce proposed_actions, but observations alone don’t close the loop. After a reflection completes, an auto-action process examines proposed actions and submits workable changes through the existing review pipelines.

The review level is configurable: AI review, human review, or no review. If the reflection touched tainted data, a separate tainted_review_mode applies (default: human). Rate limits prevent runaway self-modification.