Production AI Architecture — синтез тем №01–76 в одну рабочую систему: как cognitive runtime, knowledge, tools, quality, security, model infrastructure, data lifecycle, queues/workflows и operations соединяются так, чтобы AI-продукт был не демо, а управляемой, измеримой, отказоустойчивой и адаптивной production-системой.
№41 Cognitive Architecture synthesizes the active cognitive runtime and Executive Controller around R01–R10. №77 is broader: it wraps that runtime with production controls, data/execution infrastructure, model infrastructure, security, governance, deployment and operations. №46 Observability, №47 Evals, №48–53 controls/security, №55–76 infrastructure each own their mechanisms; №77 composes rather than redefines them. №95 Master Map will later summarize the entire 01–95 knowledge map, including methodologies and metrics; №77 specifically answers “как выглядит production AI system”.
Prerequisites: practically all №01–76, with especially strong dependencies on №41 Cognitive Architecture, №45 Verification, №46 Observability, №47 Evals, №48–53 controls/security, №55–69 data/execution/reliability infrastructure, №65 Gateway, №70 Serving and №76 Governance. Forward: №84–94 metrics measure whether the production system creates value; №95 maps the whole discipline.
CONTROL PLANE: policies, model/tool registry, prompts/skills/configs, routing rules, quotas, governance, deployment config. DATA PLANE: user inputs, retrieved evidence, artifacts, state, events, tool results, model traffic. RUNTIME: R01–R10 executing adaptive tasks. OFFLINE: evals, optimization, learning, ingestion, consolidation, indexing, incident analysis and deployment validation.
Architecture must define: request/run identity; durable vs ephemeral state; retries/idempotency; deadline/cancellation propagation; backpressure; failover; model/tool timeouts; verification gates; security/governance blocks; human escalation; observability; deployment rollback; recovery objectives and what happens when each dependency is unavailable.
№77 не вводит новые reasoning algorithms, storage engines, brokers, model servers or governance rules. Она владеет COMPOSITION: WHO CALLS WHOM, WHAT IS STATEFUL, WHAT IS CONDITIONAL, WHERE TRUST BOUNDARIES ARE, HOW FAILURE PROPAGATES, AND HOW THE WHOLE SYSTEM IS DEPLOYED AND OPERATED.
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CHANNEL / PRODUCT LAYER │
│ Web / App / API / Slack / Email / Voice / Browser UI / Scheduled Events │
└──────────────────────────────────────────────────────┬─────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ R01 EXECUTIVE CONTROLLER / ORCHESTRATOR │
│ task contract · mode FAST/STANDARD/DEEP · budgets · routing · workflow ownership │
└──────────────┬──────────────────────────────────────────────────────────────────────┬──────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────┐ ┌────────────────────────────────┐
│ COGNITIVE RUNTIME │ │ CONTROL / QUALITY │
│ R02 Task Formulator │ │ policies / permissions │
│ R03 Decomposer / Planner │ │ verification / HITL │
│ R04 Context Manager │ │ observability / evals │
│ R05 Working Memory + State │ │ governance / budgets │
│ R06 Knowledge / Research Engine │ └────────────────────────────────┘
│ R07 Tool / Action Engine │
│ R08 Quality Engine │
│ R09 Model Router │
│ R10 Learning Engine │
└──────────────┬──────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ PRODUCTION FABRIC │
│ contracts · events · queues/workers · scheduler · broker · artifact store · provenance │
│ cache · retries/circuit breakers · quotas · durable workflows · distributed reliability │
└───────────────────────────────┬──────────────────────────────────┬─────────────────────────────────┘
│ │
┌───────────▼───────────┐ ┌───────────▼────────────────┐
│ KNOWLEDGE / DATA │ │ MODEL INFRASTRUCTURE │
│ connectors / ingestion│ │ model gateway / serving │
│ parsing / vector DB │ │ hosted / self-hosted │
│ graph / artifacts │ │ quantization / multimodal │
└───────────────────────┘ └────────────────────────────┘
│ │
└───────────────┬──────────────────┘
▼
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CROSS-CUTTING SECURITY & GOVERNANCE │
│ secrets · least privilege · injection defense · sandbox · data classification · retention │
│ residency · deletion · tenant isolation │
└────────────────────────────────────────────────────────────────────────────────────────────────────┘
Owns task run, complexity mode, orchestration, budgets, stop/escalation decisions.
Turns raw request into explicit objective, constraints, success criteria and ambiguity.
Breaks difficult work into dependent steps and replans when evidence changes.
Builds bounded task context from instructions, state, evidence and media.
Owns active process state, intermediate artifacts, checkpoints and blackboard semantics.
Retrieval, RAG, external evidence, research hops, provenance-aware knowledge access.
Typed tools, connectors, code/sandbox, browser/computer use, external actions.
Verification, deterministic checks, critics/judges when warranted, HITL boundaries.
Selects eligible model/deployment by policy, capability, quality, cost, latency and availability.
Feedback, lessons, memory consolidation, cases, prompt/skill/eval optimization offline.
Single-pass or near-single-pass. Minimal context. No multi-agent. No tree search. Tools/RAG only if obviously required. Cheap model where sufficient.
Decompose as needed, retrieve evidence, use tools, maintain working state, verify material outputs and permit bounded replan.
Multiple candidates, critics, reasoning search, stronger models, simulation/formal solvers and human gate only when task risk/uncertainty/complexity justify it.
| Signal | FAST | STANDARD | DEEP trigger |
|---|---|---|---|
| Task ambiguity | Low | Resolvable through context/retrieval | Material ambiguity + high cost of wrong assumption |
| Evidence need | None/simple | RAG/tool lookup | Multi-hop/conflicting/high-stakes evidence |
| Action risk | Read-only | Reversible writes | Money, external publish, destructive/security changes |
| Uncertainty | Low | Verifier can resolve | Persistent disagreement / weak evidence / unknowns |
| Reasoning depth | Direct transform | Plan + few steps | Search, solver, simulation or candidates demonstrably help |
| Model need | Cheap sufficient | Standard | Strong model escalation justified by evals |
{
"run_id": "RUN-...",
"tenant_id": "T-...",
"principal_id": "P-...",
"task_type": "research_report",
"objective": "...",
"success_contract": {
"required_output_schema": "report/v3",
"evidence_required": true,
"verification_level": "MATERIAL_CLAIMS"
},
"mode": "STANDARD",
"deadline_at": "...",
"budgets": {
"model_cost": 1.50,
"tool_calls": 20,
"steps": 30
},
"policy_context": {
"data_class": "INTERNAL",
"purpose": "ANALYSIS"
},
"correlation_id": "..."
}Capabilities, versions, health, permissions and deployment refs.
What may run, where data may go, which actions require approval.
Versioned behavior configuration separate from application code where practical.
Per tenant, task, model, tool and environment limits.
Task phase, IDs, decisions, status and metadata.
Files, reports, media, screenshots, datasets and exports addressed by stable refs.
Queues/broker carry IDs, small payloads, causation and artifact refs.
Source versions/selectors/provenance rather than copied uncontrolled text everywhere.
Structured inputs/outputs/errors/versioning. Prevent “prompt prose” from becoming the only API contract.
Durable work, time-based triggers and pub/sub transport without conflating them with workflow semantics.
PostgreSQL/kv + Artifact Store + provenance/lineage.
At-least-once assumptions, circuit breakers, DLQ, reconciliation, locking and consistency.
Protect external providers and internal capacity from runaway agent loops.
Run → spans → tool/model/workflow events without hidden CoT.
Least privilege, secrets, trust boundaries, sandbox and injection controls.
Classification, purpose, retention, residency, provider eligibility and deletion.
EXTERNAL SYSTEMS / FILES / WEB
↓
№54 CONNECTORS
↓
№55 INGESTION & SYNC
backfill / incremental / reconcile
↓
№56 PARSING / OCR / EXTRACTION
↓
DOCUMENT IR
pages / blocks / tables / figures
↓
┌────────┴───────────┐
↓ ↓
№66 VECTOR INDEX №67 GRAPH (only if justified)
↓ ↓
└────────┬───────────┘
↓
R06 KNOWLEDGE ENGINE
№08 RAG / №27 Agentic RAG
↓
evidence refs + selectors
↓
R04 CONTEXT MANAGER
↓
MODEL
ALL DURABLE OBJECTS:
artifact_ref
source_version
provenance
tenant/access
governance metadata
Proposes typed action with intent and arguments.
Validates schema, permissions, policy, idempotency, sandbox/browser constraints.
Tool/API/code/browser action → typed result → verification.
Schema validation, tests, calculations, constraints, source existence and tool return codes.
Material claims trace to exact source/version/selector.
Critic/judge/self-consistency only where deterministic checks cannot answer.
Approval/handoff for high-impact ambiguity or actions.
R01 / R02 / R03 / R04 / R06 / R08
↓
R09
MODEL ROUTER
↓
№65 MODEL GATEWAY
policy → capabilities → health → quality → cost/latency
↓
┌──────────────┼─────────────────┬──────────────────┐
↓ ↓ ↓ ↓
HOSTED A HOSTED B LOCAL MODEL SPECIALIZED
vision/realtime/etc.
↓
№70 SERVING PROFILE
batching / KV / capacity
↓
optional:
№71 self-hosting
№72 quantization
№73 multimodal
№75 realtime
| State class | Example | Typical home | Lifetime |
|---|---|---|---|
| REQUEST CONTEXT | Current prompt slice | Process/model context | Seconds/minutes |
| WORKING STATE | Plan, phase, pending tool | Postgres/Redis/workflow state | Run lifetime |
| ARTIFACT | PDF/report/image/code result | Artifact Store | Defined lifecycle |
| MEMORY | Verified durable fact/preference | Memory store | Long-lived but governed |
| KNOWLEDGE | External documents/chunks | Source store + index | Source lifecycle |
| TRACE | Run/span/events | Telemetry backend | Operations retention |
| EVAL DATA | Representative task/sample | Eval repository | Versioned offline lifecycle |
Short model calls, low-latency RAG, fast tools, verification and final response. Propagate deadline/cancellation.
Long research, document ingestion, exports, bulk inference, scheduled jobs, consolidation, indexing, evals and retraining pipelines.
R01 starts workflow RUN-42
↓
checkpoint task contract
↓
enqueue research step
↓
worker executes
↓
persist result/artifact refs
↓
workflow waits for:
tool
timer
human approval
event
↓
process crashes
↓
new worker replays workflow state
↓
does NOT repeat already committed side effect
because:
operation_id
idempotency
reconciliation
↓
resume from durable checkpoint
{
"message_id":"MSG-...",
"type":"research.step.requested",
"schema_version":3,
"tenant_id":"T-...",
"run_id":"RUN-...",
"correlation_id":"RUN-...",
"causation_id":"EVT-...",
"operation_id":"OP-...",
"payload":{
"task_ref":"state://...",
"input_artifact_refs":["artifact://..."]
},
"deadline_at":"...",
"created_at":"..."
}Duplicate delivery, worker crash after commit, replay and retry are normal distributed-system events. Business effect identity must survive them.
Timeout → compatible fallback → degraded model → bounded failure.
Circuit breaker, retry policy, stale/read-only fallback where valid.
Use direct source/API or declare evidence unavailable; do not hallucinate.
Backpressure, queue age alerts, autoscale or reject low-priority work.
Fail closed on sensitive operations, not “best effort allow”.
Do not mark workflow complete if required artifact was not durably stored.
Depending on risk, buffer/outbox traces or block high-governance flows if audit evidence is mandatory.
Deadline/SLA → expire/escalate, not keep invisible zombie work forever.
REQUEST DEADLINE ↓ R01 remaining_budget_ms ↓ RAG timeout MODEL timeout TOOL timeout SUBTASK timeout ↓ cancel if no longer useful BUT: cancel local wait ≠ undo committed remote effect for consequential action: cancel before commit → stop cancel after unknown commit → reconcile cancel after confirmed commit → compensate only if business operation supports it
Planning/search/subagents can multiply provider and worker demand.
Per-run, tenant and global limits.
Escalating backlog should reduce optional deep work before hard overload.
Disable optional critics/search/candidates and serve simpler path when policy permits.
TRUSTED: system policy host code authenticated principal approved tool contracts permission service secret vault UNTRUSTED: user content web pages retrieved documents emails PDFs image text audio/video content tool-returned external text UNTRUSTED CONTENT MAY: inform reasoning UNTRUSTED CONTENT MAY NOT: grant itself permissions reveal secrets expand allowed domains/tools bypass approval execute arbitrary code change system policy
Objective, mode, outcome, cost, latency and final verification.
Plan step, retrieval, tool, model, worker, workflow or verifier calls.
Retry, fallback, approval, cancellation, queue delay, circuit breaker and policy block.
Stable refs link outputs to inputs and transformations independently from trace retention.
Understand → plan → retrieve/tool → model → verify → act/respond under request budgets.
Collect traces/feedback → cluster failures → update evals → test prompts/routing/skills/models/policies → canary → deploy.
ONLINE:
task → run → outcome → trace → feedback
OFFLINE:
traces + feedback
↓
failure clusters
↓
eval dataset
↓
candidate changes
prompt
skill
router
retrieval
model
policy
tool
↓
ablation / eval
↓
promote only if uplift
↓
production canary
One application contains R01–R10 modules; Postgres + object store + external model/tool APIs. Best default until scale proves otherwise.
Split ingestion, async workers, model gateway, browser sandbox or governance services where scaling/security/lifecycle differ.
Multiple product runtimes share model gateway, knowledge platform, queues/workflows, policy, observability and governance.
┌──────────────────────────┐
│ WEB / API APP │
└────────────┬─────────────┘
↓
┌────────────────────────────────────────────────────────────┐
│ AI APPLICATION / ORCHESTRATOR │
│ R01–R10 as logical modules │
│ contracts · policy hooks · routing · verification │
└───────┬──────────────────┬───────────────────┬─────────────┘
│ │ │
↓ ↓ ↓
┌─────────────┐ ┌────────────────┐ ┌──────────────────┐
│ POSTGRESQL │ │ ARTIFACT STORE │ │ MODEL GATEWAY/API│
│ state │ │ files/reports │ │ hosted models │
│ memory │ │ media │ │ │
│ metadata │ └────────────────┘ └──────────────────┘
│ provenance │
└──────┬──────┘
│
↓
┌────────────────┐
│ VECTOR INDEX │ optional / conditional
└────────────────┘
OPTIONAL WHEN NEEDED:
worker queue
durable workflow
scheduler
browser sandbox
self-hosted model
graph DB
EDGE / API GATEWAY
↓
PRODUCT AI API
↓
R01 EXECUTIVE / WORKFLOW CLIENT
├────────────────────────────────────────────────────┐
│ │
▼ ▼
SYNC RUNTIME DURABLE WORKFLOW
R02–R09 №68
│ │
├── R06 → Knowledge API ├── Queue → Workers
├── R07 → Tool Gateway ├── Scheduler
├── R08 → Verification └── Human waits/events
└── R09 → Model Gateway
↓
┌──────────────┼──────────────┐
↓ ↓ ↓
Hosted Self-hosted Specialized
model model pool vision/voice
SHARED PRODUCTION FABRIC:
Postgres
Artifact Store
Broker / Queue
Observability
Policy / Secrets
Governance
Provenance
| Axis | Signal | Typical split |
|---|---|---|
| CPU / async load | Ingestion/research blocks API | Worker pool + queue |
| GPU lifecycle | Model serving scales independently | Model serving pool |
| Security | Browser/code needs containment | Dedicated sandbox runner |
| Availability | Long workflows must survive deploys | Durable workflow service |
| Team ownership | Shared model/knowledge platform | Stable internal service interfaces |
| Data boundary | Restricted tenant/region | Separate storage/processing boundary |
| Traffic | One module saturates independently | Scale that module, not entire architecture |
Synthetic/sanitized data, mock tools, limited secrets, cheap models, local traces.
Same contracts/policies/deploy topology, test tenants, sandbox providers, failure injection and release candidate configs.
Strict secrets, governance, quotas, approvals, monitored model/tool routes and rollback-ready versions.
Git/container version.
Versioned templates/procedures.
Provider/model snapshots, thresholds, escalation rules.
Parser/index/embedding/source versions where material.
Guardrail/governance/permission versions.
Tool schema/provider adapter versions.
Representative tasks used to approve release.
One release manifest references all of the above.
{
"release_id":"AI-SYS-2026-08-31.4",
"app_version":"git:abc123",
"prompt_bundle":"prompt://v18",
"skill_bundle":"skills://v7",
"router_config":"router://v11",
"model_profiles":["model://..."],
"tool_contracts":"tools://v9",
"policy_bundle":"policy://v12",
"governance_bundle":"gov://v5",
"knowledge_profile":"knowledge://v23",
"eval_suite":"evalset://prod/v16",
"deployment_profile":"deploy://standard/eu/v4",
"approved_at":"..."
}When acceptance falls after release, you can identify whether change came from code, prompt, model route, retrieval/index, policy or provider configuration.
Request/workflow completion availability by task tier.
End-to-end, model, retrieval and tool latency.
Representative acceptance by task segment.
Not just token spend; include retries/tools/humans.
Unauthorized action/data-flow/injection escape rates.
Durable workflow/artifact/provenance failure rates.
Source update → index/search availability.
Manual review rate and queue SLA.
product_profile:
name: "SMM Post Writer"
task_types:
- social_post
- rewrite
- source_summary
default_mode: STANDARD
enabled:
rag: conditional
web_research: conditional
verification: on
browser_use: off
voice: off
debate: off
reasoning_search: off
self_consistency: off
model_policy:
default_tier: cheap
escalation: uncertainty_or_eval_failure
knowledge:
source_scope: client_workspace
vector_search: conditional
tools:
allowed:
- fetch_source
- save_draft
governance:
data_class: INTERNAL
acceptance:
grammar_check: required
source_grounding: required_if_factual
Do not fork the conceptual architecture for every product. Keep stable runtime/fabric interfaces and create a task/domain profile selecting mechanisms, policies, knowledge, tools, models, budgets and evals.
| Capability | Simple Writer | Research Agent | Action Agent |
|---|---|---|---|
| Default mode | FAST/STANDARD | STANDARD | STANDARD |
| RAG | Conditional | ON | Conditional |
| Multi-hop research | OFF | Conditional | OFF |
| Tools | Few read/write | Search/read/code | Strong typed action set |
| Verification | Grammar/source checks | Evidence/claim verification | Pre/post action verification |
| HITL | Optional | High-stakes only | Consequential commits |
| Browser Use | OFF | OFF/rare | Conditional |
| Deep reasoning | Rare | Conditional | Mostly planning exceptions |
| Async workflow | Usually no | Long jobs | When waits/approvals exist |
Can live in one app. Clear ownership beats physical separation.
State, memory, metadata, policy refs, provenance and small workflow records.
Durable files/outputs/media referenced everywhere else.
One abstraction for models, policy, routing, timeouts and telemetry.
Typed execution boundary with permissions and idempotency.
Cannot optimize or debug without them.
Deterministic checks first, model/human escalation second.
Identity, secrets, injection boundaries, data lifecycle.
Source store + parser + retrieval; vector DB only when workload benefits.
Add for long/bulk work, not merely because system is “agentic”.
Long waits/retries/human gates/checkpoints.
Search/debate/multi-agent only with measured eval uplift.
ai_system/ ├── app/ │ ├── api/ │ └── channels/ ├── runtime/ │ ├── executive.py # R01 │ ├── task_formulator.py # R02 │ ├── planner.py # R03 │ ├── context.py # R04 │ ├── state.py # R05 │ ├── knowledge.py # R06 │ ├── tools.py # R07 │ ├── quality.py # R08 │ ├── models.py # R09 │ └── learning.py # R10 ├── contracts/ ├── policies/ ├── prompts/ ├── skills/ ├── tools/ ├── knowledge/ │ ├── ingestion/ │ ├── parsing/ │ └── retrieval/ ├── production/ │ ├── queue/ │ ├── workflow/ │ ├── artifacts/ │ ├── provenance/ │ ├── caching/ │ └── resilience/ ├── model_infra/ ├── security/ ├── governance/ ├── observability/ ├── evals/ ├── profiles/ │ └── product.yaml └── deploy/
At MVP all of this can run inside one process plus PostgreSQL/object storage. Preserve interfaces and ownership so components can split later without rewriting the mental model.
| Phase | Build | Do not build yet |
|---|---|---|
| 0 — Baseline | Task contract, single model, typed output, traces, eval set. | Agents/search graphs/memory. |
| 1 — Reliable Core | R01–R05, Model Gateway, verification, tools, policy/security. | Distributed platform. |
| 2 — Knowledge | R06, ingestion/parsing/RAG if task requires external knowledge. | GraphRAG unless evals justify. |
| 3 — Actions | R07 permissions, idempotency, sandbox/HITL for real effects. | Computer use unless API missing. |
| 4 — Async | Queue/workers/workflow when long tasks appear. | Broker zoo. |
| 5 — Adaptive | FAST/STANDARD/DEEP, escalation, advanced cognition selectively. | Always-on debate/search. |
| 6 — Scale | Split services/failure domains based on telemetry. | Premature microservices. |
USER:
"Analyze X and produce sourced recommendation"
↓
INGRESS:
auth / tenant / deadline
↓
R02:
objective + required evidence + output contract
↓
R01:
STANDARD mode
↓
R03:
4 research questions
↓
R06:
internal RAG
+ web/tool research if authorized
↓
№61:
provenance for sources/evidence
↓
R05:
working state tracks open questions
↓
R04:
context contains only relevant evidence
↓
R09:
standard model
↓
draft
↓
R08:
deterministic citation resolution
claim/evidence verification
↓
uncertain key claim?
yes
↓
R01 escalates only that subproblem:
multi-hop research / stronger model
↓
final report
↓
№60:
durable artifact
↓
№46:
trace cost/latency/failures
↓
№47:
task may become eval sample if governed
↓
R10:
failure/feedback enters offline improvement loop
NOT USED:
debate
browser
voice
graph search
self-hosting
unless a real trigger appears.
USER:
"Book the approved appointment"
↓
R02:
resolve exact target/date/location
↓
R07:
prefer typed scheduling API
browser №74 only if API unavailable
↓
PERMISSIONS:
can this principal create booking?
↓
R03:
plan read availability → propose choice → commit
↓
READ-ONLY TOOL:
fetch slots
↓
R08:
verify chosen slot matches constraints
↓
CONSEQUENTIAL OPERATION:
exact operation contract
operation_id
↓
if approval required:
№49 HITL
↓
R07 executes ONCE
↓
unknown outcome?
reconcile before retry
↓
read-back confirms booking ID
↓
R08 PASS
↓
respond
SECURITY INVARIANT:
tool/page content cannot expand authority.
RELIABILITY INVARIANT:
retry cannot create duplicate booking.
Contracts, refs, topic→module ownership, enabled mechanisms, policy completeness and version consistency.
Representative product tasks from ingress to verified output/action.
Disable RAG/critic/search/strong model and measure delta before accepting complexity.
Provider outage, queue duplication, stale data, tool timeout, policy block, worker crash and human timeout.
Prompt injection, exfiltration attempts, confused-deputy and cross-tenant access.
Retention, deletion propagation, backup restore and provider routing.
Backpressure, queue age, model saturation and latency tail behavior.
Quality, cost, latency, safety and human escalation vs current production baseline.
run_id, tenant, principal, deadline and trace root.
operation_id/idempotency + reconciliation.
Host validates policy/permissions/tool contract.
Artifact/store commit precedes READY status.
Source version + selector + provenance for material claims.
Expensive mechanisms need triggers and eval uplift.
No infinite agent/tool/workflow loops.
Tenant/classification/purpose/retention survive derivatives.
Versioned release + eval/canary/rollback path.
| Area | Question |
|---|---|
| Task contract | Can we define success/failure without reading the model's mind? |
| Mode | Can easy requests avoid expensive mechanisms? |
| State | What survives process crash? What is ephemeral? |
| Tools | Who authorizes side effects? Are retries idempotent? |
| Knowledge | Can every cited fact resolve to exact source/version? |
| Models | Can provider/model change without changing product code? |
| Security | Can untrusted content ever expand authority? |
| Governance | Can we find and delete every governed derivative? |
| Reliability | What happens when each dependency times out or duplicates work? |
| Observability | Can we explain which components ran and why without storing hidden CoT? |
| Evals | Can we prove a new mechanism/model actually improves representative tasks? |
| Deployment | Can we roll back code + prompt + model route + policy config coherently? |
| Question | Answer |
|---|---|
| Стоит ли реализовывать? | Да — как architecture/profile/specification. Не как отдельный runtime service. |
| Separate Component? | N/A. №77 spans the whole production system. |
| Минимум 80% ценности? | 10 logical modules, adaptive modes, production fabric, typed contracts, model gateway, durable state/artifacts, quality/security/governance, eval-driven release and one concrete product profile. |
| Когда overkill? | Пытаться физически реализовать каждый механизм серии до появления соответствующего trigger. |
| Trigger? | Whenever turning conceptual AI capability into a deployable product or validating an existing architecture. |
| Как измерить uplift? | System-level: verified task success, latency, cost/success, availability, policy violations, escalation burden, recovery time and eval delta. |
| Можно ли rule/tool/code заменить отдельный LLM-agent? | В большинстве production-control задач — да. Contracts, policy, routing constraints, retries, queues, governance and verification should be deterministic wherever possible. |
Topics are mechanisms. Deployments are chosen by operational needs.
Spend cognition only when risk/uncertainty/complexity demands it.
Model/tool/worker/workflow/action contracts are machine-validatable.
Artifact/source/state refs move through the system; durable bytes stay in stores.
Model proposes; deterministic code/policy authorizes execution.
Idempotency/reconciliation are baseline, not later patches.
Deterministic first; critic/human only when warranted.
No architectural complexity without demonstrated delta.
Reuse architecture by configuration rather than copying a monolith blindly.
┌──────────────────────────────────────────────────────────────┐
│ PRODUCT │
│ Web · API · App · Email · Slack · Voice · Scheduled Events │
└──────────────────────────────┬───────────────────────────────┘
↓
AUTH / TENANT
↓
RUN / TASK CONTRACT
↓
┌──────────────────────────┐
│ R01 EXECUTIVE CONTROLLER │
└────────────┬─────────────┘
↓
SELECT MINIMAL MODE
↓
┌───────────────┼───────────────┐
↓ ↓ ↓
FAST STANDARD DEEP
└───────────────┼───────────────┘
↓
┌─────────────────────────────────────────┐
│ R02 TASK FORMULATOR │
│ R03 DECOMPOSER / PLANNER │
│ R04 CONTEXT MANAGER │
│ R05 WORKING MEMORY + STATE │
│ R06 KNOWLEDGE / RESEARCH ENGINE │
│ R07 TOOL / ACTION ENGINE │
│ R08 QUALITY ENGINE │
│ R09 MODEL ROUTER │
│ R10 LEARNING ENGINE │
└────────────────────┬────────────────────┘
↓
CONDITIONAL COGNITIVE MECHANISMS
RAG · multi-hop · agentic retrieval · code · solver · simulation
self-consistency · critic/judge · reflection · reasoning search
model escalation · subagents · human gate
ONLY WHEN TRIGGER + EVAL VALUE JUSTIFY THEM
↓
──────────────────────── PRODUCTION FABRIC ─────────────────────
CONTRACTS
typed input/output/errors/version
EXECUTION
events
queues/workers
scheduler
broker
durable workflows
STATE
PostgreSQL / state store
artifact store
provenance
caches
RELIABILITY
timeout
bounded retry
fallback
circuit breaker
idempotency
reconciliation
DLQ
backpressure
LIMITS
quotas
cost
concurrency
deadlines
OBSERVABILITY
run → trace → span → event
metrics
no hidden CoT
QUALITY
deterministic checks
evidence
verification
evals
HITL
SECURITY
principal
scopes
secret vault
injection defense
sandbox
least privilege
GOVERNANCE
classification
purpose
retention
residency
provider eligibility
deletion
↓
──────────────────────── KNOWLEDGE / DATA ──────────────────────
connectors
↓
ingestion / sync
↓
parsing / OCR / Document IR
↓
source versions / artifacts
↓
vector search / HNSW / embeddings
+ graph only if justified
↓
retrieval
↓
evidence refs + provenance
↓
──────────────────────── MODEL INFRASTRUCTURE ──────────────────
R09 ROUTER
↓
№65 MODEL GATEWAY
policy
capability
health
quality
cost
latency
↓
hosted models
self-hosted models
quantized models
multimodal models
realtime models
↓
№70 SERVING
batching
KV
capacity
latency
↓
──────────────────────── ACTION SURFACE ────────────────────────
typed API tools FIRST
if needed:
code sandbox
browser/computer use
voice/realtime
↓
for consequential action:
precondition
permission
approval
operation_id
execute
verify
reconcile
↓
──────────────────────── VERIFIED OUTCOME ──────────────────────
answer
artifact
business side effect
workflow result
↓
trace + provenance + feedback
↓
──────────────────────── OFFLINE LEARNING ──────────────────────
production traces
↓
failure clusters
↓
eval datasets
↓
candidate improvements:
prompt
skill
context
retrieval
routing
model
policy
tool
memory
fine-tuning only if necessary
↓
ablation + eval
↓
staging
↓
canary
↓
promote / rollback
══════════════════════════════════════════════════════════════════
THE SERIES DOES NOT DESCRIBE
A GIANT AGENT THAT DOES EVERYTHING.
IT DESCRIBES
A CONTROLLED SYSTEM
THAT CAN DO MORE
ONLY WHEN IT NEEDS TO.
PRODUCTION AI ARCHITECTURE =
SIMPLE DEFAULT PATH
+ EXPLICIT CONTRACTS
+ ADAPTIVE COGNITION
+ DURABLE STATE
+ CONTROLLED ACTIONS
+ EVIDENCE
+ VERIFICATION
+ MODEL ABSTRACTION
+ RELIABILITY
+ SECURITY
+ GOVERNANCE
+ OBSERVABILITY
+ EVAL-DRIVEN CHANGE
AND THE MOST IMPORTANT RULE:
DO NOT ASK
"HOW MANY OF THE 76 MECHANISMS
CAN WE PUT INTO THIS PRODUCT?"
ASK:
"WHAT IS THE SMALLEST
ARCHITECTURE THAT PASSES
OUR REAL TASK EVALS,
SURVIVES REAL FAILURES,
RESPECTS REAL AUTHORITY,
AND CAN GROW
WITHOUT BEING REWRITTEN?"
A. Related ECC ideas. Context-as-cache, scoped memory, lifecycle hooks, selective capabilities, feature flags, deterministic enforcement, provider-neutral adapters and eval-gated learning are applied only where relevant to №77 Production AI Architecture.
B–E. Existing boundary and placement. The existing conceptual boundary, class SYNTHESIS, default N/A and owner Whole Production System remain authoritative. Runtime/control/data/offline placement is unchanged; durable state stays outside model context.
F–H. Hooks and contracts. Use bounded PRE_MODEL/POST_MODEL, PRE_TOOL/POST_TOOL, CHECKPOINT and TASK_COMPLETED events as applicable. Illustrative fields and canonical contracts are defined in NEW_CONTRACTS_SPEC.md; no universal schema is implied.
I–J. Security and evaluation. Host-side schema, permission, secret, budget, idempotency and audit checks take precedence over LLM output. Optional mechanisms require a feature flag and WITH/WITHOUT ablation; measure quality, acceptance, correction, latency, cost, escalations and severe errors.
K–L. Task profiles and cross-references. A TaskProfile selects the relevant skill, tool/context slice, memory scope and enforcement profile independently from FAST/STANDARD/DEEP. See cross-reference map, hook spec and ablation plan. Provider adapters remain outside the core.