Feature deep dive
Context Profiles for AI Agent Memory Retrieval
Tune what context gets injected for different task types with retrieval presets that match planning, incidents, handoffs, and daily work.
Not every task needs the same context. A planning session needs architecture decisions and project scope; an incident needs recent changes and rollback procedures. Injecting everything wastes tokens and dilutes focus.
ClawVault context profiles are retrieval presets that tune which memory categories, recency windows, and graph depth get used for each task type. Switch profiles with a flag instead of manually crafting retrieval queries.
Why teams lose context
- •One-size-fits-all retrieval wastes tokens on irrelevant context.
- •Incident response gets polluted with planning-level abstractions.
- •Handoff context misses key decisions when retrieval is not tuned.
- •Teams manually adjust search queries instead of using repeatable presets.
How ClawVault helps
- •Define retrieval profiles for common task types: default, planning, incident, handoff.
- •Each profile tunes category weights, recency bias, and graph traversal depth.
- •Switch profiles with a single CLI flag for consistent behavior.
- •Customize profiles or create new ones as team workflows evolve.
01Why task-aware retrieval matters
Context windows are finite. Injecting all available memory for every task reduces signal quality and increases token cost.
Task-aware retrieval focuses on the memory categories and time horizons most relevant to the current objective. This improves agent reasoning quality while keeping context injection lean.
02Built-in context profiles
ClawVault ships with four profiles that cover the most common agent workflows. Each profile adjusts category priorities, recency windows, and traversal depth.
- •default — balanced retrieval across all categories for general tasks.
- •planning — prioritizes decisions, project scope, constraints, and architecture records.
- •incident — emphasizes recent changes, lessons, runbooks, and rollback procedures.
- •handoff — surfaces decisions, active blockers, and current working state for context transfer.
03Using context profiles in practice
Switch profiles with the --profile flag on context retrieval commands. The profile controls what gets injected without changing your underlying memory data.
04Customizing and extending profiles
Built-in profiles cover common workflows, but teams can customize category weights, add new profiles, or adjust recency windows to match specific operational needs.
- •Override category priorities per profile in your ClawVault config.
- •Create custom profiles for specialized workflows like compliance review or onboarding.
- •Adjust recency bias to control how much historical vs recent context gets injected.
- •Test profile effectiveness by comparing retrieval quality across task types.
Profile-driven retrieval vs manual query tuning
Manual query tuning works for one-off tasks, but profiles provide consistent, repeatable retrieval behavior across team members and sessions.
| Criterion | ClawVault | Manual query tuning |
|---|---|---|
| Consistency | Same profile produces same retrieval behavior every time | Depends on individual query crafting skill |
| Speed | Single flag switch, no query construction needed | Requires manual adjustment for each task type |
| Token efficiency | Profiles filter irrelevant categories automatically | Over-injection common without careful tuning |
| Team scalability | New team members use the same profiles immediately | Retrieval quality varies by operator experience |
When should I use ClawVault?
- •Use context profiles when different task types need different memory focus areas.
- •Use context profiles when token budget matters and you want lean, targeted context injection.
- •Use context profiles when team members with varying experience need consistent retrieval quality.
Frequently asked questions
01What are context profiles for AI agents?
02How do context profiles reduce token waste?
03Can I create custom context profiles?
04Do context profiles work with semantic search?
Related guides
Context Recovery
Use checkpoint workflows to restore working state after interruptions.
Memory Graph
Traverse knowledge graph connections for richer context retrieval.
Semantic Search Memory
Combine profile-scoped retrieval with meaning-based search.
How OpenClaw Memory Works
Technical breakdown of memory flow and retrieval pathways.