Agent Integration
TribalMind integrates with AI coding agents by generating instruction files — the config files that agents read to understand their behavior. Once set up, agents will automatically recall knowledge when debugging and store knowledge when they discover something useful.
Quick setup
Section titled “Quick setup”tribal setup-agentsThis auto-detects which agents you use and generates the appropriate config files. For more control:
# Specific agentstribal setup-agents -a CLAUDE.md -a .cursorrules
# All supported agentstribal setup-agents --allSupported agents
Section titled “Supported agents”Files: CLAUDE.md (root) or .claude/CLAUDE.md (repo-scoped)
Claude Code gets a dual-save snippet — it’s instructed to save knowledge to both TribalMind and its native auto-memory system simultaneously. This ensures knowledge is available both locally (for Claude Code’s own context) and in the shared team memory.
The snippet instructs Claude Code to:
- Run
tribal recallbefore exploring the codebase when debugging - Run
tribal rememberafter completing changes that produced useful insights - Always save to both
tribal rememberand native memory in the same step
Files: .cursor/rules/tribalmind.md (project rules) or .cursorrules (legacy)
Cursor receives a default snippet where TribalMind is presented as the agent’s memory system. The snippet instructs Cursor to:
- Use
tribal recallwhen investigating issues or needing project context - Use
tribal rememberwhen discovering gotchas, fixes, or important context
File: .windsurfrules
Same default snippet as Cursor — TribalMind is the agent’s memory system.
File: .github/copilot-instructions.md
Same default snippet — TribalMind is the agent’s memory system.
File: AGENTS.md
The cross-agent standard file. If you use multiple agents or want a single source of truth, this is a good default. Uses the default snippet.
What agents learn to do
Section titled “What agents learn to do”After setup, your agents will follow these patterns:
Recall first
Section titled “Recall first”When an agent starts any task, it runs tribal recall before exploring the codebase — not after. The prompts use opt-out framing: always recall, skip only for trivial tasks (renaming, formatting, etc.).
tribal recall --json "topic and task type"The query tip built into the prompt encourages agents to include both what the task is about and what kind of work it is (e.g., "auth token refresh | deployment process"). This surfaces both relevant knowledge and stored workflows.
If local recall returns nothing relevant, agents are instructed to automatically retry with --all for cross-repo search.
Remember proactively
Section titled “Remember proactively”After completing changes, agents ask themselves a single self-check question: “Did I discover WHY something works the way it does?” If yes, they store it immediately:
tribal remember "what was learned — specific and with context"Verifying integration
Section titled “Verifying integration”After running tribal setup-agents, check that your agent config file contains the TribalMind snippet:
- Open the generated file (e.g.,
CLAUDE.md) - Look for the
## TribalMind — Project Memorysection - Verify it includes the
tribal recallandtribal rememberinstructions
Customizing snippets
Section titled “Customizing snippets”The generated snippets are plain text appended to your agent config files. You can edit them freely — TribalMind won’t overwrite your changes unless you re-run tribal setup-agents.
If you want to regenerate, just run tribal setup-agents again. It will replace the existing TribalMind section.