Skip to main content

Architecture

author-reviewer

Workers write; a reviewer agent checks every task a worker reports done and sends a rejected one back for rework. An author-reviewer loop cost $0.95-1.07 per file against $1.98-2.91 for a multi-agent workflow (2610.09995); required review sub-agents raised the defects reported from 49.9% to 69.6% (2609.20812). The simulator models the reviewer by its false-accept and false-reject rates (2611.02207) and the cost of its model calls; it does not model a reviewer that misses planted harm (2611.00689) apart from those rates, nor a reviewer that teaches a worker.

architectures/author-reviewer.yaml

Search result​

A short run of the experiment reviewer-tuning tried 27 variants of the marked places. Its fitness, the weighted sum of KPIs the experiment scores, is 229.8 as built and 337.6 for the best variant. How the run was made: Optimization.

Marked places​

A marked place carries vary: the value as built and the values a search may try there. The best value is that of the best variant.

placeas builtbest valuethe search may try
parts.reviewer.strictnessbalancedstrictlenient, balanced, strict
parts.worker.count8144, 6, 8, 10, 12, 14, 16, 18, 20

KPIs that moved​

34 of 102 KPIs differ between the architecture as built and its best variant; the others are equal. A weight is what the experiment scores a KPI by: above 0 more is better, below 0 less is better.

KPIweightas builtbest variantchange
false_completions_shipped−588.50082−7.3 %, better
backlog_wait_p90_seconds−0.00110309.8245.4−97.6 %, better
cost_usd−0.051879.32484.5+32.2 %, worse
owner_wait_share−2000.0270.017−37.3 %, better
questions_defaulted−11819.500+8.3 %, worse
tasks_correct+108089.500+11.9 %, better
agents_total–1016+60.0 %
task_completion–0.8230.840+2.1 %
agent_time_cost_usd–240384+60.0 %
backlog_wait_p50_seconds–3038.30−100.0 %
capacity_ratio–0.5000.875+75.0 %
cost_per_task_usd–11.15114.552+30.5 %
jobs–657.5768.5+16.9 %
jobs_killed–3945.500+16.7 %
operator_wait_share–0.0080.005−34.9 %
pool_utilization–0.0750.087+17.3 %
questions_asked–92.500103.5+11.9 %
questions_forwarded–3235+9.4 %
review_calls–18472924.5+58.3 %
reviews–275.5462.5+67.9 %
reviews_rejected–107291+172.0 %
rework_turns–6703.59200+37.2 %
steps–20942643+26.2 %
steps_failed–12731638.5+28.7 %
tasks_claimed_done–276.5485+75.4 %
tasks_done–168.5171.5+1.8 %
tasks_started–177.5204.5+15.2 %
tokens_cache_read–12294600001575390000+28.1 %
tokens_cache_write–81964000105026000+28.1 %
tokens_input–4098200052513000+28.1 %
tokens_output–1229460015753900+28.1 %
turns–1864423332+25.1 %
worker_busy_share–0.8570.606−29.3 %
wrong_assumptions–78+14.3 %

Graph​

The architecture as a graph, with the best variant of a short run of the experiment reviewer-tuning at its marked places.Open full screen ↗

Check​

accepted 10 parts and 10 links; the structural check refuses nothing.

The architecture as a whole​

Read from the document alone, before any simulation: its size, autonomy, exposure, weak points and fixed limits. agenticspec sim check reports the same numbers; a marked place counts at its value as built. The KPIs are in the KPI catalogue under the block architecture.

KPIvaluewhat it counts
agents_total10Agent copies: the sum of count over the agent parts.
principals_total1Principal parts.
human_touchpoints1Links that end at a principal and carry a question or a proposal.
autonomy_depth1Links in the longest chain of order and question links from agent to agent.
model_call_paths3Distinct paths of model_call links from an agent part to a model part.
ungated_model_calls0Paths of model_call links from an agent to a model that pass no gateway part.
single_points2 (gateway, model)Parts whose removal leaves some agent with no model_call path to a model.
border_parts1Parts named in the border, the parts that take input from outside.
egress_targets1Distinct parts and endpoints named in the egress of the sandbox parts.
shared_workspaces0Workspace parts whose sharing is not exclusive.
capacity_ratio0.5Agent copies that claim a pool divided by its capacity, the largest over the pools.

Contract​

The ports a runtime implements to run this architecture: each port's protocol, the part that uses it with the settings that narrow it, and how many instances run. Derived from the document and the ports of the building blocks; how. The contract file: author-reviewer.contract.yaml.

portkindblockprotocolpartsettingsinstances
sandbox.sandboxOutboundsandboxDefineSandbox (CheckEgress | CheckSecretRead | CheckWrite)*boxegress: [gateway], isolation: process8
resource.claimOutboundresourceRequestClaim (ExpireWait | GrantClaim (ExpireClaim | KillClaim | ReleaseClaim) | WithdrawClaim)buildscapacity: 16, job_limit: 10m, kind: build_slots1
channel.messageOutboundchannelSendMessage (MarkDelivered (MarkRead | MarkReadInTurn)? | MarkLost)chatkind: operator1
gateway.callOutboundgatewayAdmitCall CompleteCallgatewayrate_limit_per_minute: 1201
model.inferenceOutboundmodelStartInference FinishInferencemodelroute: frontier1
channel.messageOutboundchannelSendMessage (MarkDelivered (MarkRead | MarkReadInTurn)? | MarkLost)operatornone1
harness.sessionOutboundharness(OpenSession | SpawnSubAgent) (CompactContext | NameSession | RecordRestart | RecordTurn | RequestRoute)* EndSessionoperatoracts_for: owner, harness: coding, role: operator1
model.inferenceOutboundmodelStartInference FinishInferenceoperatornone1
question.questionPrincipalquestionAsk (Answer | RecordUnreadableAnswer | TakeDefault ReviseAnswer? | Withdraw)operatornone1
channel.messageOutboundchannelSendMessage (MarkDelivered (MarkRead | MarkReadInTurn)? | MarkLost)ownernone1
question.questionPrincipalquestionAsk (Answer | RecordUnreadableAnswer | TakeDefault ReviseAnswer? | Withdraw)ownerkind: human1
harness.sessionOutboundharness(OpenSession | SpawnSubAgent) (CompactContext | NameSession | RecordRestart | RecordTurn | RequestRoute)* EndSessionreviewerharness: coding, role: reviewer1
model.inferenceOutboundmodelStartInference FinishInferencereviewernone1
workspace.leaseOutboundworkspaceRequestLease GrantLease RecordWrite* (ExpireLease | ReleaseLease)treesharing: exclusive8
workspace.proposalOutboundworkspacePropose (MergeProposal | RejectProposal | SupersedeProposal)treesharing: exclusive8
harness.sessionOutboundharness(OpenSession | SpawnSubAgent) (CompactContext | NameSession | RecordRestart | RecordTurn | RequestRoute)* EndSessionworkerharness: coding8
model.inferenceOutboundmodelStartInference FinishInferenceworkernone8
question.questionPrincipalquestionAsk (Answer | RecordUnreadableAnswer | TakeDefault ReviseAnswer? | Withdraw)workernone8
resource.claimOutboundresourceRequestClaim (ExpireWait | GrantClaim (ExpireClaim | KillClaim | ReleaseClaim) | WithdrawClaim)workernone8

Routing invariants, one per link whose value travels in a port:

  • owner -> operator carries prompt over chat: every channel.message@owner to operator over chat
  • operator -> owner carries question over chat: every question.question@operator to owner over chat
  • worker -> operator carries question: every question.question@worker to operator
  • operator -> gateway carries model_call: every model.inference@operator inside gateway.call@gateway
  • worker -> gateway carries model_call: every model.inference@worker inside gateway.call@gateway
  • reviewer -> gateway carries model_call: every model.inference@reviewer inside gateway.call@gateway
  • gateway -> model carries model_call: every gateway.call@gateway to model
  • worker -> builds carries claim: every resource.claim@worker to builds

Border: operator.

Ingresses: who reaches the architecture from outside, what each audience may use, and over which protocols.

ingressaudienceauthenticatedexportscommandsviewsfeedsmetrics
metricscontrol.monitornometrics_scrape00012
operatorcontrol.operatoryeshttp, event_stream, ui, tool638910
  • metrics: cache_bust_count, cache_hit_share, context_size_p90_tokens, cost_usd, human_prompt_share, owner_wait_share, priced_message_share, secrets_in_prompts, secrets_in_tool_output, secrets_left_session, sub_agents_started, subagent_cost_share
  • operator: agentic.channel.SetPostingRule, agentic.gateway.DetachUpstream, agentic.gateway.DrainGateway, agentic.gateway.StopGateway, agentic.question.Answer, agentic.sandbox.RetireSandbox

Parts​

partblocksettings
ownerprincipalkind human
gatewaygatewayrate_limit_per_minute 120
modelmodelroute frontier
operatoragentacts_for owner; harness coding; role operator
revieweragentharness coding; role reviewer; strictness balanced marked: lenient, balanced, strict
workeragentcount 8 marked: 4 to 20 by 2; harness coding
chatchannelkind operator
boxsandboxegress gateway; isolation process; per worker
buildspoolcapacity 16; job_limit 10m; kind build_slots
treeworkspaceper worker; sharing exclusive

No link, no reach: a part reaches only what a link names.

  • owner sends prompt to operator over chat.
  • operator sends question to owner over chat.
  • worker sends question to operator.
  • operator sends order to worker.
  • worker sends review to reviewer.
  • operator sends model_call to gateway.
  • worker sends model_call to gateway.
  • reviewer sends model_call to gateway.
  • gateway sends model_call to model.
  • worker sends claim to builds.

Border​

What a human reaches directly: operator.

Policies​

policyvalue
operator_answers_alonefalse
question_default_after15m

Optimization​

The experiment reviewer-tuning searches the marked places of this architecture under a behaviour profile. The figures on this page come from a short run of it: 24 evaluations of 2 seeds each. The experiment file asks for more; agenticspec sim run experiments/reviewer-tuning.yaml runs it in full.

Every KPI of the architecture as built and of its best variant:

KPIkindas builtbest variant
acts_for_not_principalcorrectness00
acts_for_without_partcorrectness00
agent_time_cost_usdquality240384
agent_without_model_pathcorrectness00
agents_totalcompleteness1016
as_not_principalcorrectness00
autonomy_depthquality11
backlog_wait_p50_secondsquality3038.30
backlog_wait_p90_secondsquality10309.8245.4
border_partsquality11
border_without_partcorrectness00
bus_reach_not_eventcorrectness00
capacity_ratioquality0.5000.875
claim_conflictsquality00
coordination_callsquality00
coordination_messagesquality00
cost_per_task_usdquality11.15114.552
cost_usdquality1879.32484.5
decision_kind_unknowncorrectness00
duplicate_runsquality00
egress_targetsquality11
egress_without_partcorrectness00
empty_architecturecorrectness00
endpoint_invalidcorrectness00
external_store_not_in_egresscorrectness00
false_completions_shippedcorrectness88.50082
firing_failure_sharecorrectness00
firing_skip_sharequality00
firing_start_wait_p90_secondsquality00
firingsquality00
firings_emptyquality00
firings_queuedquality00
firings_skippedquality00
firings_startedquality00
gateway_without_modelcorrectness00
human_touchpointsquality11
invalid_concurrencycorrectness00
invalid_schedulecorrectness00
jobsquality657.5768.5
jobs_killedquality3945.500
link_existscorrectness00
link_grant_invalidcorrectness00
merge_conflictsquality00
model_call_pathscompleteness33
module_link_cyclescorrectness00
not_a_channelcorrectness00
not_reached_by_principalcorrectness00
operator_decided_owner_questionsquality00
operator_wait_sharequality0.0080.005
owner_wait_sharequality0.0270.017
per_without_partcorrectness00
pool_utilizationquality0.0750.087
postsquality00
principals_totalcompleteness11
question_without_answerercorrectness00
questions_askedquality92.500103.5
questions_defaultedquality1819.500
questions_forwardedquality3235
queue_wait_p50_secondsquality00
queue_wait_p90_secondsquality00
rate_limited_secondsquality00
review_callsquality18472924.5
review_without_reviewercorrectness00
reviewsquality275.5462.5
reviews_rejectedquality107291
rework_turnsquality6703.59200
self_referencecorrectness00
semantic_store_without_modelcorrectness00
setting_invalidcorrectness00
setting_unknowncorrectness00
shared_workspacesquality00
single_pointsquality22
slot_wait_sharequality00
stepsquality20942643
steps_failedquality12731638.5
store_reach_not_record_or_readcorrectness00
swarm_needs_agentcorrectness00
task_completioncompleteness0.8230.840
tasks_arrivedquality205205
tasks_claimed_donequality276.5485
tasks_correctquality8089.500
tasks_donequality168.5171.5
tasks_startedquality177.5204.5
tokens_cache_readquality12294600001575390000
tokens_cache_writequality81964000105026000
tokens_inputquality4098200052513000
tokens_outputquality1229460015753900
trigger_source_not_triggercorrectness00
trigger_target_not_agentcorrectness00
trigger_without_sourcecorrectness00
turnsquality1864423332
under_not_authoritycorrectness00
ungated_model_callsquality00
ungoverned_tool_callcorrectness00
unknown_blockscorrectness00
unknown_carriescorrectness00
unknown_link_partscorrectness00
unreachable_partscorrectness00
via_not_in_egresscorrectness00
via_without_endpointcorrectness00
worker_busy_sharequality0.8570.606
wrong_assumptionsquality78