Home>>Agent Architecture
โ—‡
ยง
๐Ÿ—๏ธ

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