Skip to main content

Architecture

orchestrator-workers

An orchestrator agent takes every task, spends its model calls on handing it out, and dispatches it over an order link to a worker swarm whose copies start one after another. Task-specific sub-agents helped (+5.91, +4.46) and general stage sub-agents hurt (-0.70, -2.31) (2609.32459); sub-agent concurrency helped only on the largest tasks (2610.10263); an author-reviewer loop cost $0.95-1.07 per file against $1.98-2.91 for a multi-agent workflow (2610.09995). The simulator charges the orchestrator the profile role `orchestrator` for every task, counts those calls as coordination calls, and makes it a queue every task passes; the workers take the handed tasks in order. With an orchestrator handing out the work no two copies race for one task, so a start stagger here only holds copies back. The simulator does not model how the orchestrator splits a task, results that come back to it, nor any gain or loss in success from orchestration: workers keep the coding role's pass rates.

architectures/orchestrator-workers.yaml

Search result​

A short run of the experiment orchestrator-workers-tuning tried 26 variants of the marked places. Its fitness, the weighted sum of KPIs the experiment scores, is 203.2 as built and 228.7 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.gateway.rate_limit_per_minute12012060, 120, 240
parts.orchestrator.count111, 2
parts.workers.count8124, 8, 12, 16
parts.workers.start_stagger30s30s0s, 3s, 30s

KPIs that moved​

27 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−599.500129.5+30.2 %, worse
cost_usd−0.051750.32285.7+30.6 %, worse
owner_wait_share−2000.0840.073−13.6 %, better
questions_defaulted−158.50073.500+25.6 %, worse
tasks_correct+1086.500108+24.9 %, better
agents_total–913+44.4 %
task_completion–0.7620.969+27.2 %
agent_time_cost_usd–215.8311.4+44.3 %
capacity_ratio–0.5000.750+50.0 %
cost_per_task_usd–9.4439.608+1.7 %
jobs–774.5967+24.9 %
jobs_killed–4858.500+21.9 %
pool_utilization–0.0900.112+24.3 %
questions_asked–109134+22.9 %
rework_turns–6831.58754+28.1 %
steps–22262781.5+25.0 %
steps_failed–1170.51516.5+29.6 %
tasks_claimed_done–430.5482+12.0 %
tasks_done–186237.5+27.7 %
tasks_started–439489.5+11.5 %
tokens_cache_read–11421900001471950000+28.9 %
tokens_cache_write–7663600098620000+28.7 %
tokens_input–3905300050045000+28.1 %
tokens_output–1156890014866500+28.5 %
turns–19526.525022.5+28.1 %
worker_busy_share–0.8260.731−11.6 %
wrong_assumptions–2027+35.0 %

Graph​

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

Check​

accepted 7 parts and 7 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_total9Agent 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_paths2Distinct 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_parts0Parts named in the border, the parts that take input from outside.
egress_targets0Distinct 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: orchestrator-workers.contract.yaml.

portkindblockprotocolpartsettingsinstances
resource.claimOutboundresourceRequestClaim (ExpireWait | GrantClaim (ExpireClaim | KillClaim | ReleaseClaim) | WithdrawClaim)buildscapacity: 16, job_limit: 10m, kind: build_slots1
gateway.callOutboundgatewayAdmitCall CompleteCallgatewayrate_limit_per_minute: 1201
model.inferenceOutboundmodelStartInference FinishInferencemodelroute: frontier1
harness.sessionOutboundharness(OpenSession | SpawnSubAgent) (CompactContext | NameSession | RecordRestart | RecordTurn | RequestRoute)* EndSessionorchestratorharness: coding, role: orchestrator1
model.inferenceOutboundmodelStartInference FinishInferenceorchestratornone1
question.questionPrincipalquestionAsk (Answer | RecordUnreadableAnswer | TakeDefault ReviseAnswer? | Withdraw)ownerkind: human1
workspace.leaseOutboundworkspaceRequestLease GrantLease RecordWrite* (ExpireLease | ReleaseLease)treesharing: exclusive8
workspace.proposalOutboundworkspacePropose (MergeProposal | RejectProposal | SupersedeProposal)treesharing: exclusive8
harness.sessionOutboundharness(OpenSession | SpawnSubAgent) (CompactContext | NameSession | RecordRestart | RecordTurn | RequestRoute)* EndSessionworkersharness: coding8
model.inferenceOutboundmodelStartInference FinishInferenceworkersnone8
question.questionPrincipalquestionAsk (Answer | RecordUnreadableAnswer | TakeDefault ReviseAnswer? | Withdraw)workersnone8
resource.claimOutboundresourceRequestClaim (ExpireWait | GrantClaim (ExpireClaim | KillClaim | ReleaseClaim) | WithdrawClaim)workersnone8

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

  • workers -> owner carries question: every question.question@workers to owner
  • orchestrator -> gateway carries model_call: every model.inference@orchestrator inside gateway.call@gateway
  • workers -> gateway carries model_call: every model.inference@workers inside gateway.call@gateway
  • gateway -> model carries model_call: every gateway.call@gateway to model
  • workers -> builds carries claim: every resource.claim@workers to builds

Border: none.

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

ingressaudienceauthenticatedexportscommandsviewsfeedsmetrics
metricscontrol.monitornometrics_scrape0009
operatorcontrol.operatoryeshttp, event_stream, ui, tool426680
  • metrics: cache_bust_count, cache_hit_share, context_size_p90_tokens, cost_usd, human_prompt_share, owner_wait_share, priced_message_share, sub_agents_started, subagent_cost_share
  • operator: agentic.gateway.DetachUpstream, agentic.gateway.DrainGateway, agentic.gateway.StopGateway, agentic.question.Answer

Parts​

partblocksettings
ownerprincipalkind human
gatewaygatewayrate_limit_per_minute 120 marked: 60, 120, 240
modelmodelroute frontier
orchestratoragentcount 1 marked: 1, 2; harness coding; role orchestrator
workersagentcoordination orchestrator; count 8 marked: 4, 8, 12, 16; harness coding; start_stagger 30s marked: 0s, 3s, 30s
buildspoolcapacity 16; job_limit 10m; kind build_slots
treeworkspaceper workers; sharing exclusive

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

  • owner sends prompt to orchestrator.
  • orchestrator sends order to workers.
  • workers sends question to owner.
  • orchestrator sends model_call to gateway.
  • workers sends model_call to gateway.
  • gateway sends model_call to model.
  • workers sends claim to builds.

Policies​

policyvalue
question_default_after15m

Optimization​

The experiment orchestrator-workers-tuning searches the marked places of this architecture under a behaviour profile. The figures on this page come from a short run of it: 40 evaluations of 2 seeds each. The experiment file asks for more; agenticspec sim run experiments/orchestrator-workers-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_usdquality215.8311.4
agent_without_model_pathcorrectness00
agents_totalcompleteness913
as_not_principalcorrectness00
autonomy_depthquality11
backlog_wait_p50_secondsquality00
backlog_wait_p90_secondsquality1429.41429.4
border_partsquality00
border_without_partcorrectness00
bus_reach_not_eventcorrectness00
capacity_ratioquality0.5000.750
claim_conflictsquality00
coordination_callsquality735735
coordination_messagesquality00
cost_per_task_usdquality9.4439.608
cost_usdquality1750.32285.7
decision_kind_unknowncorrectness00
duplicate_runsquality00
egress_targetsquality00
egress_without_partcorrectness00
empty_architecturecorrectness00
endpoint_invalidcorrectness00
external_store_not_in_egresscorrectness00
false_completions_shippedcorrectness99.500129.5
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
jobsquality774.5967
jobs_killedquality4858.500
link_existscorrectness00
link_grant_invalidcorrectness00
merge_conflictsquality00
model_call_pathscompleteness22
module_link_cyclescorrectness00
not_a_channelcorrectness00
not_reached_by_principalcorrectness00
operator_decided_owner_questionsquality00
operator_wait_sharequality00
owner_wait_sharequality0.0840.073
per_without_partcorrectness00
pool_utilizationquality0.0900.112
postsquality00
principals_totalcompleteness11
question_without_answerercorrectness00
questions_askedquality109134
questions_defaultedquality58.50073.500
questions_forwardedquality00
queue_wait_p50_secondsquality00
queue_wait_p90_secondsquality00
rate_limited_secondsquality00
review_callsquality00
review_without_reviewercorrectness00
reviewsquality00
reviews_rejectedquality00
rework_turnsquality6831.58754
self_referencecorrectness00
semantic_store_without_modelcorrectness00
setting_invalidcorrectness00
setting_unknowncorrectness00
shared_workspacesquality00
single_pointsquality22
slot_wait_sharequality00
stepsquality22262781.5
steps_failedquality1170.51516.5
store_reach_not_record_or_readcorrectness00
swarm_needs_agentcorrectness00
task_completioncompleteness0.7620.969
tasks_arrivedquality245245
tasks_claimed_donequality430.5482
tasks_correctquality86.500108
tasks_donequality186237.5
tasks_startedquality439489.5
tokens_cache_readquality11421900001471950000
tokens_cache_writequality7663600098620000
tokens_inputquality3905300050045000
tokens_outputquality1156890014866500
trigger_source_not_triggercorrectness00
trigger_target_not_agentcorrectness00
trigger_without_sourcecorrectness00
turnsquality19526.525022.5
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.8260.731
wrong_assumptionsquality2027