Memory

From automateyournetwork/netclaw · View interactive version

Memory is an AI agent skill from the GitHub repository automateyournetwork/netclaw. NetClaw's native persistent memory (spec 033) — structured facts with temporal validity, semantic search across past sessions, decision logging, and entity relationships, backed by SQLite + ChromaDB at ~/.openclaw/memory/. This is the primary, GAIT-integrated memory system referenced by SOUL Princip

How to use this skill

Skill file

Skill: Persistent Memory

Purpose: Provide persistent context across NetClaw sessions through structured facts, semantic search, and entity relationships.

Overview

The Memory skill enables NetClaw to remember information about your network across sessions. Instead of re-explaining your topology, device names, and past issues every time, NetClaw builds a memory that grows smarter with each interaction.

Memory vs. the RAG Knowledge Base: Memory (memory_* tools, ~/.openclaw/memory/) holds NetClaw's OWN experience — facts, session summaries, decisions, entity relationships. Document content lives in the separate RAG knowledge base (rag skill, rag_* tools, ~/.openclaw/rag/). "Remember this PDF / URL / standard" routes to rag_ingest, not memory_record_fact; "what does the vendor guide say" routes to rag_search, not memory_recall. Operational facts ("PE2 is in maintenance until Friday"), past-session questions, and decision history stay here. Neither store writes into the other.

Capabilities

1. Structured Fact Storage

Store precise facts about network entities with temporal validity:

2. Semantic Recall

Search past sessions using natural language:

3. Decision Logging

Record operational decisions with rationale:

4. Entity Relationships

Track network topology and dependencies:

MCP Tools

| Tool | Purpose |

|------|---------|

| memory_record_fact | Store a fact with temporal validity |

| memory_get_facts | Query current facts for an entity |

| memory_invalidate | Mark a fact as no longer current |

| memory_timeline | Query historical facts |

| memory_store_session | Store session summary for semantic search |

| memory_recall | Semantic search across past sessions |

| memory_record_decision | Log a decision with rationale |

| memory_get_decisions | Query past decisions |

| memory_link_entities | Create relationship between entities |

| memory_query_graph | Query entity relationships |

Usage Examples

Record a Fact

memory_record_fact entity="PE2" key="bgp_state" value="established" metadata={"peer": "10.0.0.1"}

Query Facts

memory_get_facts entity="PE2"

Semantic Search

memory_recall query="BGP flapping problem" top_k=5

Record a Decision

memory_record_decision context="PE2 BGP session flapping" decision="Increased hold timer to 180s" rationale="Reduce flap frequency" entities=["PE2", "RR1"] cr_number="CHG0001234"

Link Entities

memory_link_entities subject="PE2" predicate="peers_with" object="RR1"

Data Storage

All memory data persists in ~/.openclaw/memory/:

Data is automatically pruned after 1 year.

Integration

With GAIT

All memory write operations log to GAIT for audit trail.

With HEARTBEAT

Memory enables pattern detection in health checks:

"3rd BGP flap on PE2 this week - want me to investigate?"

With SOUL

Memory directly fulfills Principle #9: "Get smarter every session."

Prerequisites

Troubleshooting

Server Won't Start

uvx --from netclaw-memory-mcp memory-mcp-server --help

Check Data Directory

ls -la ~/.openclaw/memory/

Verify Database

sqlite3 ~/.openclaw/memory/memory.db "SELECT COUNT(*) FROM facts;"
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.