ยง
๐๏ธ
Agent Architecture
QUAD Agent Communication Architecture (QACA) - How agents talk to each other
The Single Gateway
All agent invocations go through the QUAD Agent Runtime (QAR). Whether triggered by IDE, CLI, Chat, or CI/CD - QAR enforces permissions and routes to the right agent.
๐ป
IDE
VSCode
โจ๏ธ
CLI
Terminal
๐ฌ
Chat
Claude
๐
Auto
CI/CD
๐
MCP
Desktop
โ
QUAD Agent Runtime (QAR)
๐ Permission Checker
โข Who is invoking?โข Can they invoke?โข Audit everything
๐
Orchestrator
Sequential
๐ก
Event Bus
Parallel
๐๏ธ
Shared Context
State
โ
Agent Pool
Circle 1: MGMT
Story
Estimation
Circle 2: DEV
Dev UI
Dev API
Circle 3: QA
Test
Perf
Circle 4: INFRA
Deploy DEV
Deploy PROD
Three Communication Patterns
1
Sequential (Orchestrator)
For: Estimation Pipeline, Code Review Chain
Code Agent
โ code_score
โ
DB Agent
โ db_score
โ
Flow Agent
โ flow_score
โ
Estimation
โ final_estimate
Output โ Input chainingOrder enforcedEach agent waits
2
Parallel (Event Bus)
For: Development Phase (UI + API simultaneously)
๐ก Story Assigned Event
โ
โ
๐จ
Dev Agent UI
Components
Interfaces
UI Tests
โ๏ธ
Dev Agent API
Controllers
Services
DTOs
โ
โ
โ
Both Complete Event
Run simultaneouslyAsync pub/subIndependent work
3
Hybrid (Stages)
For: Full Development Pipeline
STAGE 1: DEVPARALLEL
๐จDev Agent UI
โ๏ธDev Agent API
โ wait for all
STAGE 2: TESTPARALLEL
๐งชTest Agent UI
๐ฌTest Agent API
โ wait for all
STAGE 3: REVIEWSEQUENTIAL
๐Review Agent
Stages are sequentialWithin stage: parallelBest of both
Permission System
Permission Levels
โ
Level 0: NONE
Cannot access
๐๏ธ
Level 1: READ
Read-only
๐ก
Level 2: SUGGEST
Can suggest, human OK
โ๏ธ
Level 3: WRITE
Can modify (audited)
๐
Level 4: ADMIN
Full access (rare)
Example: Dev Agent UI
src/ui/**โ
WRITE
src/components/**โ
WRITE
src/api/**๐๏ธ READ
database/**โ NONE
tests/ui/**๐ก SUGGEST
๐Critical Rule
No agent can invoke Deploy PROD directly!
Only humans can trigger production deployment.
Who Can Invoke Whom
| Agent | โ Can Invoke | โ Cannot |
|---|---|---|
| Story Agent | Estimation Agent | Deploy PROD |
| Dev Agent UI | Test AgentReview | Deploy PRODDev API |
| Dev Agent API | Test AgentReview | Deploy PRODDev UI |
| Test Agent | Review Agent | Deploy PROD |
| Deploy DEV | (terminal agent) | Deploy PROD |
| Deploy PROD | (terminal agent) |
Key Takeaways
๐ช
Single Gateway
QAR is the ONLY way to invoke agents
๐
Permissions First
Checked BEFORE and AFTER every action
๐
Full Audit
Every action logged for compliance
๐ค
Human in Loop
PROD deployment requires approval
โ๏ธ
Configurable
YAML config per project
๐
Flexible
Sequential, Parallel, or Hybrid