Skip to main content

Catalog

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.

experiments/orchestrator-workers-tuning.yaml

The architecture orchestrator-workers, optimized by the experiment orchestrator-workers-tuning: 31 variants of its marked places, each simulated for 24h with 8 seeds under the behaviour profile coding of the field coding.

Fitness 150.5 → 212.1 (+40.9 %), as written → optimized. Fitness is the weighted sum of the KPIs the experiment scores.

What the optimization changed​

2 of 4 marked places take another value; the others keep theirs.

marked placeas writtenoptimized
parts.orchestrator.count12
parts.workers.count812

The weighted KPIs that moved, the largest change of the fitness first:

KPIweightas writtenoptimizedfitness
tasks_correct+1080.50107.9+273.8
false_completions_shipped−598.50130.8−161.2
cost_usd−0.051805.62423.2−30.88
questions_defaulted−153.8876.62−22.75
owner_wait_share−2000.0820.073+1.86
backlog_wait_p90_seconds−0.0011462.9597.3+0.866

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.

KPIas writtenoptimizedwhat it counts
agents_total914Agent copies: the sum of count over the agent parts.
principals_total11Principal parts.
human_touchpoints11Links that end at a principal and carry a question or a proposal.
autonomy_depth11Links in the longest chain of order and question links from agent to agent.
model_call_paths22Distinct paths of model_call links from an agent part to a model part.
ungated_model_calls00Paths of model_call links from an agent to a model that pass no gateway part.
single_points2 (gateway, model)2Parts whose removal leaves some agent with no model_call path to a model.
border_parts00Parts named in the border, the parts that take input from outside.
egress_targets00Distinct parts and endpoints named in the egress of the sandbox parts.
shared_workspaces00Workspace parts whose sharing is not exclusive.
capacity_ratio0.50.75Agent copies that claim a pool divided by its capacity, the largest over the pools.

Result​

The full result of orchestrator-workers-tuning: objective, landscape, trade-offs, sensitivity, variants and timeline.Open full screen ↗

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

Download​

  • Architecture as writtenorchestrator-workers.yamlthe parts, links and policies, with the marked places at their values as written
  • Contractorchestrator-workers.contract.yamlthe ports a runtime implements to run the architecture as written, with their protocols, settings, instances and routing invariants
  • Optimized architectureorchestrator-workers.best.yamlevery marked place at the value of the best variant; its vary ranges are kept, so it can be searched again
  • Experimentorchestrator-workers-tuning.yamlseeds, horizon, faults, the search and its weights; it names the two files beside it
  • Behaviour profilecoding.yamlhow long turns, builds and answers take, and what model calls cost
  • Resultresult.jsonevery variant with its KPIs, the best one and the timeline, as the result page draws it

Run it​

Put the downloaded files in one directory and run the experiment with agenticspec sim. agenticspec is the binary of every release; a checkout of the repository builds it with cargo build --release -p agenticspec. The same seeds give the same result.json.

agenticspec sim run orchestrator-workers-tuning.yaml --out out/

agenticspec sim check orchestrator-workers.best.yaml accepts the optimized architecture. To search on from it, set architecture: orchestrator-workers.best.yaml in the experiment; its fitness as written is then the best fitness above.

In a checkout, the same run is agenticspec sim run experiments/orchestrator-workers-tuning.yaml --out out/.

With --events, the run also writes out/events.jsonl: the run of the result's timeline as an event log, one line per building-block event (agentic.work.TaskCreated, agentic.resource.ClaimQueued, ...) with its sequence number, time, part, copy and subject key (task-3). The same seed writes the same lines, and result.json does not change.

It also writes out/replay.json, and out/index.html plays it back over the graph: the baseline and the best variant at every seed, each part's waiting and busy items and its spend over simulated time, and the links that carry an item at the time shown. Play, pause, a speed, a scrubber and a choice of run and seed move it; open the page from the directory, it needs no server.

With --live, the run streams to that page while it runs: the first line it prints is the address, agenticspec sim: live on http://127.0.0.1:<port>/, on this machine only. The baseline at the first seed is streamed before the search and the shown run after it, paced in simulated time (--pace, simulated seconds per second, 60 by default), each event as events.jsonl writes it, and the graph moves as the events arrive; the scrubber ends at the last one. When both are sent the command ends once the last page closes its connection, or after --linger seconds (0 by default) when none is open. The files it writes are the same bytes.

Deploy​

Later. An entry runs in the simulator today; the agent runtime and the compute that implement the building blocks come later, and with them a way to deploy an entry.