mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
- docs/rag/architecture/optimal-brain.md: Complete architecture overview - docs/rag/workflows/proactive-knowledge.md: Task context injection workflow - docs/rag/workflows/cross-agent-learning.md: Learning network workflow - docs/rag/workflows/rule-enforcement.md: Standards validation workflow
3.1 KiB
3.1 KiB
Cross-Agent Learning
When one agent learns something, all agents benefit. The learning network enables organizational knowledge to compound over time.
Recording Learnings
When you discover something useful, record it:
roboco_record_learning(
content="Use transactions for multi-table updates to prevent partial writes",
category="pattern",
team="backend", # Optional: backend, frontend, ux_ui
shareable=True, # Default: True
tags=["database", "transactions", "consistency"]
)
Learning Categories
| Category | When to Use |
|---|---|
error_handling |
How to handle specific errors |
performance |
Optimization techniques |
testing |
Testing strategies and patterns |
pattern |
Code patterns and idioms |
architecture |
Design decisions and trade-offs |
security |
Security best practices |
workflow |
Process improvements |
tooling |
Tool usage tips |
Searching Learnings
Before starting work, check what others learned:
roboco_search_learnings(
query="database connection pooling",
category="performance", # Optional filter
team="backend", # Optional filter
top_k=10
)
What to Record
DO record:
- Solutions to tricky problems
- Performance optimizations discovered
- Security patterns you implemented
- Testing strategies that worked
- Workflow improvements
- Tool configurations that helped
DON'T record:
- Obvious/basic knowledge
- Temporary workarounds
- Context-specific hacks
- Personal preferences
Good Learning Examples
# Specific and actionable
roboco_record_learning(
content="Redis SCAN is O(N) total but O(1) per call. Use SCAN over KEYS for large datasets.",
category="performance",
tags=["redis", "scan", "keys"]
)
# Pattern with context
roboco_record_learning(
content="Use circuit breakers for external API calls. Implemented in services/http_client.py:42",
category="pattern",
tags=["resilience", "circuit-breaker", "api"]
)
# Security insight
roboco_record_learning(
content="Always validate file uploads server-side. Client validation is insufficient.",
category="security",
tags=["upload", "validation"]
)
Learning Flow
Agent solves problem
|
v
roboco_record_learning()
|
v
+------------------+
| Indexed in KB |
+------------------+
|
+-- Available via roboco_search_learnings()
+-- Included in roboco_ask_mentor() responses
+-- Injected in proactive context for similar tasks
|
v
Future agents benefit
Best Practices
- Record immediately - Don't wait, you'll forget details
- Be specific - Include file paths, function names
- Add context - Why does this matter?
- Tag appropriately - Helps future discovery
- Search first - Before solving, check if someone already did
Team vs Org Scope
teamfilter: Learnings from your cell (backend/frontend/ux_ui)- No filter: Learnings from entire organization
Cross-team learnings are often valuable - security and performance insights apply everywhere.