SRA Architecture — Pre-Message Skill Reasoning
Skill Runtime Advisor: Semantic matching middleware for AI Agent skill discovery
POST /recommend
lookup
scan SKILL.md
rag_context + top_skill
response
User Message
"Draw an architecture diagram"
Natural language input
SRA Proxy :8536
① Tokenize + Synonym Expand
② TF-IDF Scoring
③ Co-occurrence Matrix
④ Score & Rank
→ rag_context + top_skill
Latency: < 10ms | Unix Socket + HTTP
Skill Index Store
TF-IDF Matrix
Synonym Graph
Co-occurrence Map
~/.hermes/skills/
62 SKILL.md files
Auto-scanned every 1h
Hermes Agent
✓ Inject rag_context into prompt
✓ should_auto_load? → load skill
✓ Execute with enhanced context
✓ Tool calls (terminal, file, web...)
Agent runs normally — SRA is invisible
Works with Claude Code, Codex CLI too
Agent Response
"Here's your architecture diagram..."
+ correct tools used automatically
via Telegram / Discord / CLI / etc.
SRA Zone
Agent Zone
Legend
Input
Middleware
Index Store
Output
Request
Lookup