Skip to main content

Memory & Learning

OrcBot’s memory system provides multi-layered storage for conversations, user preferences, learned knowledge, and semantic search capabilities. The memory architecture supports both short-term operational memory and long-term persistent storage.

Memory Architecture

Memory Types

  1. Short Memory: Recent action steps and observations (last ~50 items)
  2. Episodic Memory: LLM-generated summaries of completed actions
  3. Long Memory: Persistent markdown files (USER.md, LEARNING.md, JOURNAL.md)
  4. Vector Memory: Semantic search index for embedding-based recall
  5. Daily Memory: Append-only logs organized by date
  6. Contact Profiles: Per-contact relationship context (WhatsApp)

Memory Limits

  • Context limit: 50 short memories (configurable via memoryContextLimit)
  • Episodic limit: 200 summaries (configurable via memoryEpisodicLimit)
  • Consolidation threshold: 30 short memories before summarization
  • Memory content max: 500 characters per entry
  • Flush interval: Auto-flush when soft threshold reached

recall_memory

Semantic search across ALL memory types. This is the primary skill for recalling past conversations and context.

Parameters

string
required
Natural language description of what to recall. The system finds semantically similar memories, not just keyword matches.
number
default:"10"
Maximum number of results to return

Return Value

string
Formatted list of relevant memories with timestamps, types, sources, and relevance scores.

Features

  • Semantic search: Uses vector embeddings for meaning-based recall (when configured)
  • Cross-channel: Searches across Telegram, WhatsApp, Discord, Slack, email
  • Multi-type: Searches short, episodic, and long-term memory
  • Keyword fallback: Falls back to keyword search if vector memory unavailable
  • Ranked results: Sorted by relevance score (semantic) or recency (keyword)

Example Usage

Recall recent deployment discussion:
Find information about a user:
Recall technical details:

Response Example

Metadata

  • isDeep: false - Memory operations are fast
  • isParallelSafe: true
Use natural language queries. The semantic search understands meaning, so “when is the deployment?” works better than “deployment date”.

update_user_profile

Permanently persist information learned about the user.

Parameters

string
required
Information to add to USER.md. Should be factual, concise, and actionable.

Return Value

string
Confirmation that the profile was updated

What to Store

Store:
  • User preferences (“prefers concise answers”, “works in PST timezone”)
  • Core identity (name, role, company, location)
  • Communication style (“direct and technical”)
  • Important relationships (“team lead for Project X”)
  • Constraints and requirements (“Python 3.11 only”, “no external dependencies”)
Don’t store:
  • Ephemeral information (“currently working on feature Y”)
  • Passwords or secrets
  • Detailed conversation logs (use memory for that)
  • Information that changes frequently

Example Usage

USER.md Format

The skill appends to USER.md in a structured format:

Metadata

  • isDeep: false
  • isDangerous: false
USER.md is long-term memory. Only store information that’s likely to remain relevant for weeks or months. Don’t spam it with ephemeral details.

update_learning

Research a topic and persist knowledge to LEARNING.md.

Parameters

string
required
Topic to research and learn about
string
Optional pre-researched content to save. If omitted, the skill automatically researches the topic.

Return Value

string
Confirmation with a summary of what was learned

Features

  • Auto-research: If no content provided, uses web_search or LLM to gather info
  • Structured storage: Organizes knowledge by topic headings
  • LLM extraction: Uses fast model to distill key facts (capped at 3000 chars input)
  • Size limits: Per-entry cap of 3000 chars to prevent bloat

Example Usage

Auto-research:
Save researched content:

Response Example

LEARNING.md Format

Metadata

  • isDeep: true - Research operations are substantive
  • isResearch: false
LEARNING.md is for technical knowledge. Use it to build a knowledge base of programming concepts, frameworks, APIs, and technical patterns you encounter.

update_journal

Write a self-reflection entry to JOURNAL.md.

Parameters

string
required
Journal entry content. Should be introspective and reflective.

Return Value

string
Confirmation that the journal was updated

What to Journal

  • Reflections on complex tasks
  • Lessons learned from failures
  • Insights about user behavior or preferences
  • Self-improvement observations
  • Strategic thinking about long-term goals

Example Usage

JOURNAL.md Format

Metadata

  • isDeep: false

deep_reason

Perform intensive multi-step chain-of-thought analysis.

Parameters

string
required
Topic or question to analyze deeply

Return Value

string
Multi-step reasoning output with conclusions and insights

Use Cases

  • Ethical dilemmas (“Should we prioritize speed or security?”)
  • Complex technical decisions (“Which database architecture?”)
  • Strategic planning (“How to scale this system to 1M users?”)
  • Root cause analysis (“Why did this deployment fail?”)

Example Usage

Response Example

Metadata

  • isDeep: true
  • isResearch: false

RAG Knowledge Store

The RAG (Retrieval-Augmented Generation) knowledge store provides persistent, searchable document storage with semantic search.

rag_ingest

Ingest content into the knowledge store. Parameters:
string
required
Content to ingest (text, markdown, JSON, CSV, code)
string
required
Source identifier (e.g., “report.md”, “api-docs”)
string
default:"default"
Collection name for organization
string
Document title
array
Tags for filtering
string
Content format: text, markdown, csv, json, jsonl, code
Example:

rag_ingest_file

Ingest a local file. Parameters:
string
required
Path to the file to ingest
string
Collection name
array
Tags
string
Document title
Example:

rag_ingest_url

Download and ingest from a URL. Parameters:
string
required
URL to download and ingest
string
Collection name
array
Tags
string
Document title
Features:
  • Auto-detects HTML and applies Readability extraction
  • Handles plain text, markdown, JSON
  • Preserves metadata (URL, fetch date)
Example:
Semantic search across ingested documents. Parameters:
string
required
Search query
number
default:"10"
Max results
string
Search within specific collection
array
Filter by tags
Example:
Response Example:

rag_list

List documents and collections. Parameters:
string
List specific collection (omit for all)
Example:

rag_delete

Delete documents or entire collections. Parameters:
string
Specific document ID to delete
string
Delete entire collection
Example:

Best Practices

Memory organization strategy:
  1. Use recall_memory for recent conversations and context
  2. Use update_user_profile for permanent user facts
  3. Use update_learning for technical knowledge
  4. Use update_journal for self-reflection
  5. Use RAG for large documents and external knowledge
Avoid memory bloat:
  • Keep USER.md entries concise (under 100 words each)
  • Don’t duplicate information across memory types
  • Use RAG for large documents instead of update_learning
  • Let consolidation happen automatically
Vector memory requires API keys. Semantic search needs openaiApiKey or googleApiKey. Without it, the system falls back to keyword search.

Channels

Send context-aware messages

Scheduling

Schedule autonomous memory review