Skip to content

Agentic Tool Architecture for Embodied AI Codesign

In progress · updated 2026-10-30 · embodied-ai-architect/docs/plan/agentic-tool-architecture.md

This document captures architectural decisions for building an Agentic AI system optimized for hardware/software codesign of complex embodied AI systems (drones, quadrupeds, bipeds, AMRs) and edge AI perception applications.


Two distinct registration patterns exist:

  1. Orchestrator Pattern (orchestrator.py)

    • Manual dictionary-based registration: orchestrator.register_agent(agent)
    • Hard-coded execution order in process() method
    • No validation—missing agents are silently skipped
  2. LLM Tool Pattern (llm/tools.py)

    • Dual registration: definitions (JSON schema) + executors (callables)
    • Must be kept in sync manually
    • Runtime error if tool called but executor missing

No mechanism to validate tool completeness before execution. The system discovers missing capabilities at runtime.


DesignSpeedAccuracyRobustnessLLM Cognitive Load
Generic + argsMediumLowerFragileHigh
Task-specific by nameFast (parallel)HighHighMedium
Context-adaptiveSlowUnpredictableLowLow
Do-everythingSlowNoisyMediumLow

Create named tools per analytical dimension:

analyze_accuracy(model, dataset, threshold?)
analyze_energy(model, hardware, power_budget?)
analyze_latency(model, hardware, target_ms?)
analyze_memory(model, hardware, memory_limit?)
analyze_cost(model, hardware, budget?)

Rationale:

  • LLMs excel at semantic matching (goal → tool name)
  • LLMs struggle with complex parameterization (goal → correct arg combinations)
  • Parallel execution when dimensions are independent
  • Partial results possible if some analyses fail

Tools should perform domain reasoning, not the LLM. The tool knows thresholds and interpretations; the LLM receives a verdict it can trust.

{
"verdict": "PASS | FAIL | PARTIAL | UNKNOWN",
"confidence": "high | medium | low",
"summary": "One sentence: what was checked, what was found",
"metric": {
"name": "string",
"measured": "number",
"required": "number | null",
"unit": "string",
"margin": "+/- percentage from requirement"
},
"evidence": "Brief description of how this was determined",
"suggestion": "If not PASS, actionable next step (or null)"
}
LLM Executor NeedSchema Feature
Subtask complete?verdict field—no parsing required
Can I trust it?confidence field
Compose results?Uniform schema across tools
Report to user?summary field
Recover from failure?suggestion field

ApproachQuery CapabilityRelationshipsRemote AccessBest For
File tree (YAML/JSON)Load & searchImplicitGit syncStatic, structured facts
RDF/Knowledge GraphSPARQL, inferenceExplicit, typedYesRich relationships
Relational DBSQLForeign keysYesTabular data
System promptAlways availableNoneN/ASmall, critical knowledge
Vector embeddingsSemantic similarityNoneYesUnstructured, fuzzy matching

Research shows hybrid architectures outperforming single-approach systems:

  • Temporal Knowledge Graphs (Zep/Graphiti): 18.5% higher accuracy, 90% lower latency vs vector-only
  • Hybrid Retrieval: semantic embeddings + keyword search + graph traversal
  • Structured Memory Notes (A-MEM): Zettelkasten-style linked notes with metadata
  • Lost constraints: top-k retrieval misses critical facts
  • Semantic drift: matches on topic but wrong on specifics
  • Context dilution: too many partially-relevant chunks

For hardware specs and requirements, these are fatal flaws. Exact facts need graph/relational lookup, not vector similarity.

┌─────────────────────────────────────────────────────────┐
│ Tool Query Layer │
│ get_hardware_spec(hw, spec) → exact lookup │
│ get_usecase_requirements(usecase) → structured list │
│ find_similar_usecases(description) → semantic search │
└─────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────────┐
│ Graph Store │ │ Vector Index │ │ YAML/JSON Files │
│ (relations) │ │ (semantic) │ │ (version ctrl) │
└──────────────┘ └──────────────┘ └──────────────────┘

Phase 1: YAML files as source of truth

hardware/jetson_nano.yaml
name: Jetson Nano
specs:
compute_gflops: 472
memory_gb: 4
power_watts: 10

Phase 2: Load into lightweight graph (NetworkX or SQLite)

  • Enables relational queries
  • Supports relationship traversal

Phase 3: Add vector index for semantic queries (optional)

  • Fuzzy use-case matching
  • Embed descriptions for similarity search

ApproachTrade-offs
LLM-drivenFlexible but opaque, hard to validate
Template workflowsPredictable but rigid
Goal-orientedPowerful but complex
HybridBalance of flexibility and structure

With dimension-specific tools, decomposition becomes:

User: "Can YOLOv8s run on Jetson Nano for drone obstacle avoidance?"
Decomposition:
1. Identify relevant dimensions → latency, energy, memory (from use case)
2. Map to tools → analyze_latency, analyze_energy, analyze_memory
3. Execute (parallel)
4. Synthesize: all PASS? → yes. any FAIL? → explain which and why

The decomposition focuses on which dimensions matter, not how to parameterize tools.


  1. Tool semantics over arguments: Make selection the hard part (LLM handles well), not parameterization

  2. Verdict-first outputs: Tools return judgments, not raw data for LLM to interpret

  3. Structured facts, graph lookup: Don’t use vector similarity for exact knowledge

  4. Knowledge outside prompts: Tool descriptions in prompt, domain facts in knowledge store

  5. Parallel when independent: Dimension analyses can run concurrently



Document created: December 2024 Status: Design Discussion