automem

n8n node for AutoMem - persistent memory system for AI agents and workflows

Package Information

Downloads: 3 weekly / 20 monthly
Latest Version: 0.1.0
Author: paerrin

Documentation

n8n-nodes-automem

n8n community node for AutoMem - a persistent memory system for AI agents and workflows.

Installation

Community Installation (Recommended)

In n8n, go to SettingsCommunity NodesInstall and enter:

n8n-nodes-automem

Manual Installation

npm install -g n8n-nodes-automem

Then restart your n8n instance.

Local Development

# Clone and build
cd /mnt/ai2/n8n-automem-node
npm install
npm run build

# Link for development
npm link

# In your n8n directory
cd ~/.n8n
npm link n8n-nodes-automem

# Start n8n with hot reload
npm run dev

Configuration

1. Set up AutoMem API Credentials

In n8n: CredentialsNewAutoMem API

Configure:

  • Base URL: Your AutoMem instance (e.g., http://localhost:8765)
  • API Key: Optional authentication key

2. Use in Workflows

The AutoMem node will appear in your node palette.

Operations

🔹 Store Memory

Save memories with tags, importance scores, and metadata.

Input:

  • content (required): Memory text
  • tags: Comma-separated (e.g., "preference, ui")
  • importance: 0.0-1.0 (default: 0.5)
  • memoryType: Classification (e.g., "preference", "decision")

Output: Memory object with generated ID


🔹 Recall Memory

Search and retrieve memories with filters.

Input:

  • query: Search text
  • limit: Max results (1-50, default: 50)
  • filterTags: Comma-separated filter tags

Output: Array of matching memories


🔹 Update Memory

Modify existing memory content.

Input:

  • memoryId (required): Memory UUID
  • newContent: Updated text

Output: Updated memory object


🔹 Delete Memory

Permanently remove a memory.

Input:

  • memoryId (required): Memory UUID

Output: Success confirmation


🔹 Associate Memories

Link two memories with a relationship.

Input:

  • memory1Id (required): First memory UUID
  • memory2Id (required): Second memory UUID
  • relationshipType (required): e.g., "related", "causes", "contradicts"
  • strength (required): 0.0-1.0

Output: Association object


🔹 Check Health

Verify AutoMem service status.

Input: None

Output: Health status

Demo Workflow

Import demo-workflow.json to see all operations in action:

  1. Store Memory → Creates test memory
  2. Recall Memory → Searches stored memories
  3. Update Memory → Modifies content
  4. Associate Memories → Links memories
  5. Check Health → Verifies service
  6. Delete Memory → Cleanup

To import:
n8n → WorkflowsImport from File → Select demo-workflow.json

Use Cases

  • 🤖 AI Agent Memory: Persistent context across executions
  • 👤 User Preferences: Remember settings and choices
  • 📋 Decision Tracking: Log architectural decisions
  • 🔍 Pattern Recognition: Store learned patterns
  • 📚 Knowledge Base: Searchable information repository
  • 💬 Conversation Memory: Chatbot context retention

Examples

Store User Preference

{
  "operation": "storeMemory",
  "content": "User prefers dark mode",
  "tags": "preference, ui",
  "importance": 0.8,
  "memoryType": "preference"
}

Recall Project Decisions

{
  "operation": "recallMemory",
  "query": "authentication approach",
  "filterTags": "decision, security",
  "limit": 10
}

Link Related Memories

{
  "operation": "associateMemories",
  "memory1Id": "{{$json.id}}",
  "memory2Id": "{{$node[\"Previous\"].json.id}}",
  "relationshipType": "causes",
  "strength": 0.9
}

Development

Build

npm run build

Lint

npm run lint

Watch Mode

npm run build:watch

Test with n8n

npm run dev

Opens n8n at http://localhost:5678 with hot reload enabled.

Requirements

  • n8n 1.0.0+
  • Node.js 18.17.0+
  • AutoMem API instance

API Endpoints

The node communicates with AutoMem via these endpoints:

  • POST /store_memory - Store new memory
  • GET /recall_memory - Search memories
  • PUT /update_memory - Update memory
  • DELETE /delete_memory - Delete memory
  • POST /associate_memories - Link memories
  • GET /health - Health check

Troubleshooting

Node not appearing in n8n

  1. Check package.jsonn8n.nodes includes AutoMem
  2. Restart n8n after installation
  3. Clear browser cache

Connection errors

  1. Verify AutoMem service is running
  2. Check Base URL in credentials
  3. Test with: curl http://your-automem-url/health

Authentication issues

  1. Ensure API Key is correct (if required)
  2. Check AutoMem API logs
  3. Verify Bearer token format

Resources

Support

License

MIT

Changelog

0.1.0 (2025-12-17)

Initial release with full AutoMem API integration:

  • ✅ Store Memory operation
  • ✅ Recall Memory operation
  • ✅ Update Memory operation
  • ✅ Delete Memory operation
  • ✅ Associate Memories operation
  • ✅ Check Health operation
  • ✅ Bearer token authentication
  • ✅ Comprehensive error handling
  • ✅ TypeScript types
  • ✅ Demo workflow included

Discussion