PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-4-8-opus)
Token size
589
Example input
[SYSTEM_TYPE]: Customer support automation [EXECUTION_MODE]: Hybrid parallel-sequential [MEMORY_REQUIREMENT]: Long-term persistent [COMPLEXITY_LEVEL]: High [INTEGRATION_SCOPE]: ticketing system, knowledge base, billing API
Example output
1️⃣ Agent Role Definition Intake Classifier Responsibilities: parse inbound ticket, detect intent, assign severity tier, extract entities (account ID, order ref) NOT permitted: contact the customer, write to CRM, resolve tickets, access billing API Knowledge Retrieval Agent Responsibilities: query knowledge base, rank candidate articles, return top-N with confidence scores NOT permitted: author new knowledge base content, modify article records, compose customer-facing text Account Context Agent Responsibilities: pull CRM history, fetch billing status, surface open tickets and prior escalations NOT permitted: mutate CRM records, issue refunds, alter billing state Response Composer Responsibilities: draft customer reply from retrieval + context payloads, apply tone policy, flag low-confidence drafts NOT permitted: send messages directly, bypass review gate, invent policy claims not present in retrieved sources Action Executor Responsibilities: write ticket updates, apply approved billing adjustments, transition ticket state, log CRM interaction NOT permitted: act without approved action token, exceed refund authority ceiling, retry destructive writes Supervisor Agent Responsibilities: validate composer output against source grounding, enforce authority ceilings, route to human, own escalation NOT permitted: compose replies, perform retrieval, execute integration writes Boundaries are enforced so that no single agent can both decide and act — separation of judgment from execution is the primary containment control.2️⃣ Communication Protocol Message envelope fields: msg_id, trace_id, parent_msg_id sender_agent, recipient_agent intent (request | result | error | escalation) payload (typed, schema-versioned) confidence (0.0–1.0) source_refs[] (grounding citations) authority_token (scoped, expiring — required for any write) attempt_count, timestamp, schema_version State passing logic: Central ticket state object owned by Supervisor; agents receive read-only snapshots Agents return deltas, never mutate shared state directly Supervisor applies deltas and increments state version Version mismatch on submission → delta rejected, agent re-issued fresh snapshot Failure escalation path: Agent-local retry with adjusted parameters Reroute to sibling agent instance Degrade to lower-capability fallback path (e.g. generic acknowledgment) Supervisor holds ticket, marks needs_review Queue to human support agent with full trace and drafted context If unclaimed past SLA window → page on-call support lead 3️⃣ Task Routing Logic Decision tree: Severity = critical OR churn-risk account → Supervisor → human queue (skip automation) Intent = billing dispute → Account Context Agent → Supervisor (authority check) → Action Executor Intent = how-to / informational → Knowledge Retrieval Agent → Response Composer Intent = account status query → Account Context Agent → Response Composer Intent = ambiguous, classifier confidence < 0.6 → clarification loop (max 1) → else human queue Retrieval confidence < 0.5 → suppress draft → human queue Priority rules: Human-escalated tickets preempt all automated work Critical severity outranks queue age Billing-API-touching tasks serialize per account ID Tickets nearing SLA breach promoted one tier Retry attempts inherit original priority, never elevate Load balancing: Retrieval and Context agents run as stateless replica pools, least-in-flight dispatch Action Executor sharded by account ID hash to preserve per-account ordering Billing API calls pass through a shared token-bucket limiter Composer pool autoscales on queue depth; overflow drains to human queue rather than degrading grounding 4️⃣ Memory Architecture Short-term context: Per-ticket working set: current thread, classifier output, retrieved articles, context payload Rolling window of last N turns kept verbatim; older turns compressed to summary Evicted on ticket close, retained 24h for reopen Long-term storage: Customer profile store: preferences, tone history, prior resolutions, escalation history Resolution archive: ticket → action → outcome triples, indexed for retrieval Vectorized knowledge base with versioned article snapshots (so past answers remain auditable) Interaction ledger: append-only, immutable, retained per compliance window Retrieval triggers: On intake: pull customer profile + last three resolved tickets On classifier intent assignment: knowledge base semantic query On billing intent: fetch 90-day billing event history On repeat contact within 7 days: force-load prior thread verbatim On composer low confidence: widen retrieval to adjacent intent clusters 5️⃣ Control & Governance Layer Error detection: Schema validation on every message envelope Grounding check — every factual claim in a draft must map to a source_ref Confidence floor enforcement per agent type Timeout watchdog per agent invocation Loop detector: same intent re-routed > 2 times triggers halt Authority ceiling check before any billing write Anomaly monitor on refund amounts and action frequency per account Retry logic: Immediate retry, identical parameters (transient faults only, max 2) Retry with exponential backoff against a replica instance Retry with reduced scope (narrower query, smaller context) Fallback to degraded path (template acknowledgment, no claims) Abandon automation, hand to human with full trace Human-in-the-loop triggers: Any refund or credit above authority ceiling Grounding check failure Composer confidence below threshold Detected customer distress or legal/regulatory language Third contact on the same unresolved issue Any account flagged VIP or churn-risk Supervisor-detected policy conflict between retrieved sources 6️⃣ Latency & Performance Strategy Parallel execution: Knowledge Retrieval and Account Context run concurrently after classification Billing status fetch parallelized with CRM history pull Speculative retrieval kicked off on preliminary intent guess, discarded on mismatch Sequential constraints: Classification must precede all routing Composition must follow both retrieval and context completion Supervisor validation strictly gates execution Per-account billing writes serialized Bottleneck risks: Supervisor validation as a single funnel point Billing API rate limits under burst load Knowledge base vector search latency on cold index Composer queue depth during volume spikes Throughput optimization: Cache classifier results for near-duplicate inbound text Warm knowledge base index, pin hot articles Batch CRM reads across concurrent tickets Shard Supervisor validation by severity tier so critical path stays clear Precompute customer context on inbound channel open, before ticket submission 7️⃣ Risk & Stability Analysis Cascade failure — knowledge base outage causes composer to emit ungrounded drafts, Supervisor rejects all, queue floods human tier Mitigation: circuit breaker on retrieval, automatic switch to acknowledgment-only mode, human queue admission control with backpressure to intake Single-point dependency — Supervisor is the sole validation and authority gate Mitigation: multi-instance Supervisor with leader election, shared state store, shadow validator running in parallel to detect drift Resource exhaustion — volume spike saturates composer pool and billing rate limits Mitigation: per-tier admission control, priority preemption, hard concurrency caps per integration, graceful degradation to templated responses Grounding drift — knowledge base article updates while a draft is in flight Mitigation: version-pinned retrieval snapshots, revalidation before send Authority creep — repeated retries accumulate partial writes Mitigation: idempotency keys on all executor actions, single-use authority tokens Poison ticket — malformed or adversarial input loops through routing Mitigation: loop detector, attempt ceiling, quarantine queue 8️⃣ Scalability Roadmap Phase 1 — Foundation Planner count: single Supervisor instance, single Intake Classifier Executor scale: 2–3 replicas per stateless agent, one Action Executor shard Governance maturity: manual policy review, human approval on all billing writes, basic audit log Phase 2 — Consolidation Planner count: Supervisor cluster with leader election; classifier pool with per-channel specialization Executor scale: autoscaled retrieval/context pools, Action Executor sharded by account hash, regional replicas Governance maturity: automated policy engine, tiered authority ceilings, sampled human audit, drift monitoring on grounding rates Phase 3 — Federation Planner count: domain-partitioned Supervisors (billing, technical, account) under a meta-router Executor scale: multi-region executor fleets, dedicated pools per integration, independent scaling per intent cluster Governance maturity: continuous automated compliance evaluation, policy-as-code with versioned rollout, self-healing retry orchestration, human review reserved for exception classes only 9️⃣ Observability & Monitoring Metrics Agent-level KPIs: Classifier: intent accuracy vs. human relabel, confidence calibration curve Retrieval: top-1 relevance rate, empty-result rate, index freshness lag Context: fetch completeness, stale-record rate Composer: grounding pass rate, revision rate, tone policy violations Executor: write success rate, idempotency collision count Supervisor: rejection rate by cause, escalation rate, authority-block count Failure tracking: Error taxonomy by class (schema, timeout, grounding, authority, integration) Retry depth distribution — alert on rising tier-3+ usage Cascade indicator: correlated failure rate across agent types Human queue inflow rate and cause attribution Trace completeness — % of tickets with unbroken trace_id chain Latency benchmarks: End-to-end intake → send, p50 / p95 / p99 Per-agent invocation latency, same percentiles Parallel fan-out join wait time Supervisor validation queue depth and hold time Integration call latency per system (CRM, ticketing, KB, billing) SLA breach rate by severity tier 🔟 Executive Architecture Summary Core Structure: Intake Classifier → [Knowledge Retrieval ∥ Account Context] → Response Composer → Supervisor (validate + authorize) → Action Executor → Human Escalation Queue Critical Risk: Supervisor is the single validation and authority funnel — its saturation or failure degrades the entire pipeline to human-only handling. Optimization Priority: Shard Supervisor validation by severity tier and precompute customer context pre-submission, targeting the p95 latency dominated by the serial validate-then-execute gate.
🌀 Claude

Multiagent Architecture Designer

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-8-OPUS
Tested icon
Guide icon
4 examples icon
Free credits icon
Design production-grade multi-agent AI systems in seconds. Feed in five variables — system type, execution mode, memory needs, complexity, and integration scope — and get a complete 10-section architecture spec: agent roles with hard permission boundaries, message protocols, routing decision trees, memory layers, governance and retry tiers, latency strategy, risk analysis, scaling roadmap, monitoring KPIs, and an executive summary. Vendor-neutral. No code, pure architecture.
...more
Added 17 hours ago
Report
Browse Marketplace