Factory (Droid)
Integrate memories.sh with Factory's Droid CLI.
Factory provides Droid, an AI coding agent that runs in your terminal and IDE. Droid reads instructions from .factory/ configuration and supports MCP servers.
Quick Setup
cd your-project
memories initThis automatically:
- Sets up your local memory store
- Configures MCP for supported tools
- Generates instruction files with your existing memories
Manual Setup
Option 1: Generated File
Generate instructions for Droid:
memories generate claude -o .factory/instructions.mdDroid will read this file and incorporate your rules, decisions, and facts into its context.
Option 2: MCP Server
Add memories.sh to Factory's MCP configuration. Create or edit .factory/mcp.json:
{
"mcpServers": {
"memories": {
"command": "npx",
"args": ["-y", "@memories.sh/cli", "serve"]
}
}
}For global configuration (applies to all projects), add to ~/.factory/mcp.json.
Recommended: Use Both
- Generated file — Provides instructions Droid always sees
- MCP server — Gives Droid live access to search, recall, and add memories
Syncing Factory Config
To sync your Factory/Droid configuration across machines:
# On your main machine
memories files ingest
# On a new machine
memories files apply --global --forceThis syncs:
.factory/config.json— Droid configuration.factory/instructions.md— Custom instructions.factory/droids/*.md— Custom droid definitions.factory/tasks/*.md— Task definitions.factory/skills/**/*— Skills and references
Factory-Specific Features
Custom Droids
Factory allows creating custom droids with specialized behaviors. These are stored in .factory/droids/ and synced automatically:
# Import your custom droids
memories files ingest
# Apply on another machine
memories files apply --globalTasks
Project task files (.factory/tasks/*.md) help Droid understand ongoing work:
# Import project tasks
memories files ingest --project
# Apply on another machine
cd your-project
memories files apply --projectSkills
Factory skills (.factory/skills/**/*) provide reusable agent capabilities. These are synced with memories files just like other configuration.
Using with Factory Cloud
If you use Factory's cloud features alongside memories.sh:
- Local memories — Use memories.sh for rules and decisions you want across all tools
- Factory cloud — Use Factory's built-in features for Droid-specific context
- Sync both — Run
memories files ingestto capture Factory configs in memories.sh
This gives you portability while still using Factory's native features.