Skip to content
mlmentorship

Design an enterprise agent platform

A deep architecture case covering delegated authority, tool contracts, durable state, safe retries, memory, evaluation, observability, rollout, cost, and multi-organization governance.

Published · 30 min read ·Role-specific ·Advanced

ML system design · active recall

Practice before you read

40 minutes. Scope first; then cover data, baseline, model, evaluation, serving, monitoring, and iteration.

ML system design · closed-book attempt

Design an enterprise agent platform

Scope first; then cover data, baseline, model, evaluation, serving, monitoring, and iteration.

Problem

Context. A fictional company has 40 agent teams, several providers, and about 300 tools with inconsistent execution and permission contracts. The detailed workload below includes duplicate credits after a timeout and an unauthorized export proposal induced by uploaded content. Task. Define a two-year platform direction and useful first-quarter release, including tool contracts, authorization, state, retries, evidence, and migration. Explain how the two incidents are prevented or reconciled without requiring one planning runtime. Constraints. Preserve regional restrictions and delegated authority; model proposals do not grant permission. A timeout is an unknown effect outcome, not proof of failure. Separate logical actions, attempts, committed effects, and authoritative reconciliation. A fictional company has 40 agent teams, several model providers and about 300 tools. Independent systems disagree on schemas, permissions, memory, traces and retries. Peak starts are 2,000 workflows/second; most finish within one minute and five calls, but some run for hours. Ten tools move value or alter access; 50 read restricted data. A support agent sends a 50-unit account credit, loses the response, then retries and creates another credit. Separately, an uploaded report induces a research agent to propose a broader internal-data export than the user authorized. Design a two-year platform direction with a first release in one quarter, incremental migration and regional processing restrictions. What prevents the duplicate effect and unauthorized export without requiring every team to use one planning runtime?

40:00recommended time

Closing or reloading clears the scratchpad. Only score, weak rubric dimensions, attempt count, and retry date can be stored locally.

30-second answer map

Distinguish the control plane's authorization and version decisions from execution work and from the evidence plane's durable record of decisions and effects.

Persist permission before dispatch; reconcile a lost reply instead of paying twice

Persist permission before dispatch; reconcile a lost reply instead of paying twiceOne illustrative 50-unit credit preserves credit-123 and downstream key k-456 across control, durable evidence, dispatch, a committed effect with a lost reply, and authoritative reconciliation. Denied actions or failed durable writes stop before dispatch. Unknown transport outcome does not permit a second logical credit.Illustrative credit-123; exact amount 501. CONTROL: authorize exact args2. EVIDENCE: durable credit-123record3. EXECUTION: dispatch key k-456Account commits 50; reply is lostReconcile k-456 -> same commitreceipt
The durable authorized record precedes dispatch. Denial or a failed write stops there. A lost reply triggers same-key reconciliation, not another logical credit.
Check: Which evidence must exist before dispatch? Which later receipt establishes the authoritative effect?
Full interview answer 30 min read
Reading depth

Design an enterprise agent platform that coordinates authorized tool use, durable execution, and evidence across independent teams and runtimes.

Problem

Context. A fictional company has 40 agent teams, several providers, and about 300 tools with inconsistent execution and permission contracts. The detailed workload below includes duplicate credits after a timeout and an unauthorized export proposal induced by uploaded content.

Task. Define a two-year platform direction and useful first-quarter release, including tool contracts, authorization, state, retries, evidence, and migration. Explain how the two incidents are prevented or reconciled without requiring one planning runtime.

Constraints. Preserve regional restrictions and delegated authority; model proposals do not grant permission. A timeout is an unknown effect outcome, not proof of failure. Separate logical actions, attempts, committed effects, and authoritative reconciliation.

A fictional company has 40 agent teams, several model providers and about 300 tools. Independent systems disagree on schemas, permissions, memory, traces and retries. Peak starts are 2,000 workflows/second; most finish within one minute and five calls, but some run for hours. Ten tools move value or alter access; 50 read restricted data.

A support agent sends a 50-unit account credit, loses the response, then retries and creates another credit. Separately, an uploaded report induces a research agent to propose a broader internal-data export than the user authorized.

Design a two-year platform direction with a first release in one quarter, incremental migration and regional processing restrictions. What prevents the duplicate effect and unauthorized export without requiring every team to use one planning runtime?

Picture: one logical action, several observations

Logical call credit-123 uses downstream key k-456 and exact approved arguments. Separate its durable record from each network attempt and from the account system’s authoritative state.

EventDurable call stateAccount systemPermitted next action
Authorize exact creditauthorizedNo dispatch yetPersist authorization, then dispatch
Send k-456dispatchedMay process requestWait or query status
Commit; response lostoutcome_unknownOne 50-unit credit existsReconcile, not a new logical credit
Replacement worker resumesoutcome_unknownSame committed creditLookup k-456 with current authority
Lookup returns commit IDreconciled_successStill one creditRecord receipt and finish original call

The downstream contract must bind key, arguments, committed effect and recoverable result consistently. A client-created UUID does not supply that guarantee. Revocation after dispatch cannot erase the committed credit.

Separate control, execution, and evidence planes

Control decides authority and versions; execution performs bounded work; evidence records decisions and observed effects.

Control grants exact authority; execution persists one action; evidence resolves its effect

Control grants exact authority; execution persists one action; evidence resolves its effectControl validates the user’s exact grant before saving authorization. Execution persists one logical credit and key before dispatch; attempts do not create new logical actions. Reply loss leaves the effect unknown. A replacement runtime reconciles that same key with current authority. Evidence closes the call only after an authoritative receipt. Without downstream deduplication and lookup, stop automatic retries.Control: a proposal does not widenthe grantAllowed: credit fifty, exact accountand region.askgrantsavePersist exact authorization beforesending.askstoptoolUploaded text cannot authorize abroader export. Nothing is dispatchedon this route.Execution: one durable logical credit1Saved authorizationLogical call C, key K,exact credit fifty. Notsent yet.2Dispatched; response lostDurable state: outcomeunknown. The account mayalready contain thecredit.3Replacement worker resumesWith current lookupauthority, reconcileoriginal key K. Do notcreate another credit.4Evidence: authoritativereceipt R1One fifty-unit creditexists. Finish theoriginal logical call;retain its receipt.No downstream deduplication andlookup? Keep the effect unknown; noautomatic retry.
Read it this way: Control validates the user’s exact grant before saving authorization. Execution persists one logical credit and key before dispatch; attempts do not create new logical actions. Reply loss leaves the effect unknown. A replacement runtime reconciles that same key with current authority. Evidence closes the call only after an authoritative receipt. Without downstream deduplication and lookup, stop automatic retries. Does reply loss alone permit another credit?
Reference drawing

Control grants exact authority; execution persists one action; evidence resolves its effect

Control grants exact authority; execution persists one action; evidence resolves its effectControl validates the user’s exact grant before saving authorization. Execution persists one logical credit and key before dispatch; attempts do not create new logical actions. Reply loss leaves the effect unknown. A replacement runtime reconciles that same key with current authority. Evidence closes the call only after an authoritative receipt. Without downstream deduplication and lookup, stop automatic retries.Control: a proposal does not widenthe grantAllowed: credit fifty, exact accountand region.askgrantsavePersist exact authorization beforesending.askstoptoolUploaded text cannot authorize abroader export. Nothing is dispatchedon this route.Execution: one durable logical credit1Saved authorizationLogical call C, key K,exact credit fifty. Notsent yet.2Dispatched; response lostDurable state: outcomeunknown. The account mayalready contain thecredit.3Replacement worker resumesWith current lookupauthority, reconcileoriginal key K. Do notcreate another credit.4Evidence: authoritativereceipt R1One fifty-unit creditexists. Finish theoriginal logical call;retain its receipt.No downstream deduplication andlookup? Keep the effect unknown; noautomatic retry.
Derivation
Persist permission before dispatch; reconcile a lost reply instead of paying twiceOne illustrative 50-unit credit preserves credit-123 and downstream key k-456 across control, durable evidence, dispatch, a committed effect with a lost reply, and authoritative reconciliation. Denied actions or failed durable writes stop before dispatch. Unknown transport outcome does not permit a second logical credit.Illustrative credit-123; exact amount 501. CONTROL: authorize exact args2. EVIDENCE: durable credit-123record3. EXECUTION: dispatch key k-456Account commits 50; reply is lostReconcile k-456 -> same commitreceipt
The durable authorized record precedes dispatch. Denial or a failed write stops there. A lost reply triggers same-key reconciliation, not another logical credit.
Check: Which evidence must exist before dispatch? Which later receipt establishes the authoritative effect?
Read it this way: Control validates the user’s exact grant before saving authorization. Execution persists one logical credit and key before dispatch; attempts do not create new logical actions. Reply loss leaves the effect unknown. A replacement runtime reconciles that same key with current authority. Evidence closes the call only after an authoritative receipt. Without downstream deduplication and lookup, stop automatic retries. Does reply loss alone permit another credit?

References: NIST SP 800-207, RFC 8693, durable execution, and OpenTelemetry GenAI conventions.

Apply ten invariants

  1. Authority comes from verified identity and explicit delegation, never prompt text.
  2. Every tool call uses a versioned action contract with an owner and retry semantics.
  3. Consequential calls have durable authorization before dispatch.
  4. Unknown effects remain unknown until authoritative reconciliation.
  5. Retrieved content, tool output and memory do not become trusted control instructions.
  6. Time, tokens, calls, concurrency and cost have enforced limits and terminal reasons.
  7. High-risk completion needs independent policy and final-state evidence.
  8. Tenant and regional data, credentials and authority remain isolated.
  9. Tool, model, workflow and policy versions can be revoked independently.
  10. Contracts and evidence remain portable across runtime replacement.

Change retry support, authority or residency

1. The tool lacks deduplication and status lookup

Picture and change: prohibit automatic retry after possible dispatch. Add a genuinely reconcilable downstream wrapper or approved manual resolution; client bookkeeping alone is insufficient.

Check: timeout plus unknown external state remains unresolved, not failed-safe.

Use when: transport results cannot establish effect absence.

2. Access is revoked while approval waits

Picture and change: invalidate or narrow delegation and reauthorize immediately before dispatch. Bind approval to exact arguments, policy and expiration; old approval cannot restore revoked authority.

Check: no new consequential call starts from the expired grant.

Use when: work outlives its initiating authorization.

3. A region prohibits external payload processing

Picture and change: keep model, memory, tool and trace payloads in approved regional planes. Share only permitted identity, version, policy and aggregate metadata.

Check: a provider outage cannot silently reroute restricted text through a forbidden region.

Use when: residency governs ordinary operation and failover alike.

Test the second incident and transfer

The uploaded report remains untrusted evidence even if its proposed export passes JSON validation. Evaluate purpose, source-data class, destination and authority across the entire tool chain before issuing credentials. Individually permitted read/send tools do not automatically authorize their composition.

Why is compensation not rollback?

Check your answer

Compensation is a new action that can fail; it cannot erase observations or irreversible consequences of the original effect.

State the boundary before choosing a framework

Build a shared agent control plane and tool gateway around several execution runtimes.

First-release contracts cover identity, delegation, tools, durable state, policy, evidence, budgets and staged releases. Keep planning and domain workflows behind adapters; shared enforcement must not be optional.

Clarify product, authority, and risk

BoundaryQuestions that change the contract
ProductAdvice, draft or action? Interactive or asynchronous? Customer, employee or software consumer? Cross-product workflow? Useful fallback?
ToolRead/write, reversibility, idempotency, status lookup, region, data classes, cost and approval support?
AuthorityUser/workload identity, joint delegation, tenant, purpose, resource, amount, expiration and revocation target?
DataPermitted session/team/region/provider flows, retention, correction, deletion and provenance?
ReliabilityArrival distribution, duration tails, calls, recovery/audit targets and task/tenant budgets?

Peak starts and a typical duration do not establish mean concurrency; size queues and recovery from actual distributions.

Define success around safe useful work

RoleEvidence
ProductDefined completion, corrections/escalations, time-to-value, abandonment/retries, reversibility and delayed errors
SafetyUnauthorized dispatch, approval validity, duplicate/unknown effects, bypass, tenant/region exposure and revocation time
DeliverySafe onboarding, observe-mode time, trace completeness, compliant release time, support burden and diagnosis time
EfficiencyCost/tokens/calls per success, p50/p95/p99 duration, queue delay, post-terminal waste, gateway and storage costs

Do not average unauthorized effects into task success or count registrations as user value.

Classify actions by consequence

Classify action, arguments, identity and context, not tool name alone.

ClassExampleDefault controlCompletion evidence
Read-onlySearch approved documentsAutomatic within scoped authorityAuthorized response tied to source versions
Reversible writeCreate a draft ticketAutomatic with audit and undo windowAuthoritative write ID and tested undo deadline
Consequential reversibleChange a reservationConfirmation, limits, and compensation pathCommitted external state and valid compensation action
Irreversible or regulatedSend funds, delete records, grant accessStrong authentication, explicit approval, and narrow policyAuthoritative commit ID, approval record, and immutable audit event
Code or infrastructureRun code, deploy, change production stateSandbox or controlled executor with reviewed scopeExecutor result plus observed target state and health

Reading one account differs from exporting all accounts. Declare reversibility, compensation and neither explicitly; compensation requires its own authorization and evidence.

Establish platform invariants

The core’s ten invariants define the common boundary, not a prescribed planning algorithm.

Keep control metadata transactional; keep sensitive payloads in separately governed stores referenced by identity, hash and redacted summary.

Model identity and delegated authority

Represent user/service and agent workload authority separately; permission for a human read does not imply permission for external-model export.

Delegation
  delegation_id
  principal_identity
  agent_workload_identity
  tenant_id
  purpose
  allowed_actions
  resource_scope
  argument_constraints
  region
  expires_at
  confirmation_policy
  approval_policy
  issuer
  policy_version

Short-lived capability

Bind narrow executor credentials to action, arguments, resource, tenant, purpose and expiration after policy approval. Refresh requires another decision; expansion requires new delegation and applicable confirmation. Reauthorize consequential dispatch, record revocation timing and reconcile effects already sent.

Authorization versus instruction

Prompts guide behavior, not permission. Central policy sets a floor; product, tool and regional owners may tighten it. Exceptions need an authorized owner, bounded scope, evidence and expiration.

Revocation

Support revocation by principal, workload, model/workflow/tool version, tenant, region, rule and credential issuer, with a declared propagation target.

Define a complete tool contract

Keep contracts machine-readable and reviewable, with exact versions on calls.

ToolAction
  tool_id
  action_id
  version
  owner
  input_schema
  output_schema
  side_effect_class
  data_classes_read
  data_classes_written
  authorization_attributes
  idempotency_mode
  status_lookup
  timeout_semantics
  compensation_action
  rate_limit
  cost_model
  region_support
  logging_policy
  retention_policy
  deprecation_state

Use a common result envelope while keeping the result body tool-specific.

ToolResult
  logical_call_id
  outcome
  result
  error_code
  external_operation_id
  observed_at
  retry_after

outcome distinguishes succeeded, failed, partial and unknown. Partial results identify completed effects and approved compensation; each contract specifies authoritative completion fields.

Schema

Validate types, bounds, enumerations, resources, cross-field constraints and unexpected fields. Then evaluate authorization: syntactically valid amounts can still be prohibited.

Side effects

Retry modeRequired downstream contract
safe_retryRepeating the logical action converges without a key
key_deduplicatedDownstream binds key, arguments, effect and recoverable result
reconcile_before_retryAuthoritative lookup establishes effect absence before another dispatch
no_automatic_retryUnknown effects need review or a separately approved action

Also declare read/write, compensation and irreversibility; HTTP method alone proves none of these properties.

Ownership and service level

Name owner, escalation, service target and timeout meaning: “never started” differs from “effect unknown.”

Versioning

Declare compatibility ranges; breaking contracts need new versions and migration periods.

Enforce policy at the tool boundary

All governed calls pass enforcement before credentials issue. Evaluate identities, tenant/region, workflow/model/action versions, arguments, data classes, delegation, prior state, budgets and approval evidence.

allow | deny | require_confirmation | require_approval | reduce_scope

Record reason class and policy version without exposing sensitive decision details.

Fail behavior

Fail high-risk actions closed; only explicitly approved low-risk reads may use narrow cached grants. Advice/drafts can remain available without action authority.

Policy conflicts

Define regional/tenant/product/central precedence mechanically; stricter applicable rules win unless an authorized bounded exception says otherwise.

Treat untrusted content as data

Preserve provenance/trust for user uploads, retrieval, emails, tool results, memory, generated code and other agents’ messages.

Separate control context

Separate platform policy, product instructions, user request, evidence, tool results and working state. Typed sections aid inspection but do not replace enforced authorization and egress policy.

Data-flow policy

Check source-data class against model/tool destination before each flow; internal readability does not imply permission to publish or export.

Argument construction

Resolve typed account, repository and file identifiers through authorized lookups; do not trust raw paths from retrieved text.

Generated code

Bound filesystem, network, process, secret, time and compute access; passing sandbox tests does not prove broad safety.

Use a durable execution state machine

Prior stateEvent/guardNext state
createdAdmission succeedsrunning
runningUser/approval/tool neededCorresponding waiting_for_*
WaitingAuthorized response/receipt arrivesrunning
NonterminalVerified task completioncompleted
NonterminalUnrecoverable failurefailed
NonterminalCancellation resolved under policycancelled
NonterminalHard resource limitexhausted

Use expected-version CAS or equivalent concurrency control for every transition; terminal states are not sequential stages.

Execution identity

Execution
  execution_id
  tenant_id
  workflow_version
  model_policy_version
  delegation_id
  current_state
  step_number
  budget_state
  created_at
  deadline
  terminal_reason

Model output is an event, not authoritative workflow state.

Leases and workers

Use expiring worker leases and fencing/concurrency checks. Replacement workers reconcile dispatched calls before resuming effects; lease expiry does not prove downstream failure.

Cancellation

Cancellation stops new calls, not existing effects; reconcile or approve compensation before declaring a resolved terminal outcome.

Branching and replay

Replay with simulated tools, recorded outputs or read-only environments; label events and exclude them from production outcomes.

Design tool-call state for ambiguous outcomes

A tool call needs its own state machine.

proposed
  -> authorized
  -> dispatched
     -> succeeded
     -> failed
     -> outcome_unknown
outcome_unknown
  -> reconciled_success
  -> reconciled_failure
  -> manual_review
succeeded
  -> compensation_requested
compensation_requested
  -> compensated
  -> compensation_failed

Persist logical identity, exact arguments, authorization and supported downstream key before dispatch. Partial/irreversible unresolved effects need review; failed compensation is a new incident.

Idempotency key

Reuse the logical key across transport attempts; later intentional actions receive new keys. Downstream enforcement, not client UUID generation, prevents duplicate effects.

Unknown outcome

Query authoritative status, preserve unknown if unresolved, and retry only under the declared safe-retry contract. Elapsed time alone never proves effect absence.

Tools without safe retry support

A wrapper must genuinely reconcile downstream effects; otherwise prohibit automatic retry and use approved manual resolution.

Exactly-once language

Deduplication/status contracts can support one logical outcome despite repeated attempts; do not promise exactly-once physical execution.

Add human approval without creating theater

Review requires a person with information, authority and time to change the decision.

Approval
  approval_id, principal, reviewer_role, delegation_id
  action, target, exact_arguments_or_bounds, arguments_hash
  agent_version, workflow_version, policy_version
  evidence_refs, uncertainty, expected_effect, reversibility
  reason, expires_at, safe_alternative

Confirmation versus approval

Confirmation verifies initiating intent; approval accepts risk under a reviewer’s authority. Match frequency to consequence to avoid routine click-through.

Approval binding

Changed recipient, amount, repository or scope needs a new decision outside the approved bounds.

Delegated approval

Delegate reviewer roles by action class, retain stricter regional rules and review authority periodically.

Partition working state and durable memory

StoreContract
ExecutionStructured plan/state, calls, budgets and approvals; explicit lifecycle
ConversationAuthoritative transcript distinct from compacted model context
PreferencesUser-visible purpose, correction and retention; inferred text is not automatically durable fact
Domain knowledgeGoverned source identities/versions, not unrestricted vector-store copies
Learned workflowsReviewed provenance and tenant isolation for reusable examples/plans
AuditRestricted access/retention, excluded from ordinary agent context

Make memory writes explicit

Treat writes and deletions as separately authorized tools, with product-selected policy rather than model-chosen retention.

MemoryWrite
  class, subject, tenant, source_execution, provenance
  confidence, visibility, permitted_readers
  retention, correction_path, deletion_policy
MemoryDeletion
  memory_id, authorized_requester, tombstone_version
  required_stores, acknowledgements, deadline, status

Poisoning

Restrict durable sources, review inferred entries and test delayed-session poisoning. A stored preference must not suppress current delegation or required confirmation. Deletion records retain structure, not prohibited payloads.

Deletion guarantees

Tombstone the authoritative read path first; invalidate indexes, summaries, caches and replicas by identity. Keep retrieval blocked and deletion pending until all required stores acknowledge; failures page the owner. Verify across tenants/regions. Trained-model influence needs separate lineage, retraining, approved unlearning or retirement, not a vector-store deletion claim.

Context compaction

Keep permissions, intent, unresolved calls, negative constraints and source references outside lossy summaries; compare decisions across compaction.

Route model calls through a gateway

Record provider, model, policy, region, context classification, tokens, schemas and safety settings. Also record output identity, cache behavior, latency, errors, retries, usage and cost.

Routing

Route by task, risk, latency, cost and data policy; larger models do not replace deterministic authorization or qualified review.

Provider failure

Evaluate each fallback pair for policy, context, action sequence, timing and cost, not final-text similarity alone.

Caching

Cache against actual identity/context/tool/freshness dependencies; reauthorize when delegation, policy or resources change.

Model retries

Repeated model calls get new output identities and can propose different actions; model retry is not tool-retry safety.

Isolate tool execution

BoundaryEnforcement
CredentialsNarrow, short-lived executor grants; no reusable secrets in prompts, traces or general runtime environments
NetworkAction-specific destinations/egress; private reads do not imply arbitrary internet access
CodeEphemeral bounded sandboxes, clean images, controlled packages/mounts, captured artifacts; separate build/test/deploy authority
BrowserUser/origin-bound sessions; protect uploads, cross-site actions and stale authentication
CompositionEnforce source-to-destination information flow across the whole trajectory

Bound loops, concurrency, and budgets

Enforce time, calls, tokens, money, branches, retries, data volume and approval-wait limits. Distinguish completed, cancelled, denied, exhausted, expired and unresolved-side-effect outcomes.

Loop progress

Detect repeated plans, identical failures, unchanged state and oscillation; deterministic limits remain authoritative over model judgment.

Concurrency

Declare dependencies/conflict keys; serialize same-resource writes unless downstream concurrency is safe.

Tenant fairness

Use tenant quotas, weighted queues, bursts and reviewed priorities; reserve incident capacity without creating permanent privilege.

Make multi-agent coordination explicit

Use multiple agents only for measured value. Each needs identity, role, input/output, authority, budget, state access, parent, termination rules and evidence requirements.

Shared state

Use structured task ownership and events, not inferred ownership from shared chat.

Delegation

Child capabilities and budgets are subsets of the parent’s; recursion cannot manufacture authority.

Independent checking

Shared model/prompt/data can reproduce errors; checking needs genuinely distinct evidence or constraints.

Deadlock and duplication

Lease task claims with logical action IDs, detect duplicate claims and reconcile before replacement side effects. Bound delegation depth and deadlocks. Runtime delegation transfers capabilities; delegated technical authority assigns engineering decision rights.

Build observability for decisions and effects

ViewSignals
ExecutionQueues, duration, steps, retries, leases, terminal/unknown state
ModelRouting, tokens, proposals, denials, repetition and meaningful uncertainty
ToolDispatch, outcome, reconciliation, errors, limits and saturation
PolicyAllow/deny/confirmation/approval/exception by tenant and action
ProductCompletion, corrections, escalation, incidents and delayed results
CostExecution/task/tenant/model/tool/outcome breakdown and tails

Preserve useful traces without over-collecting

Use event metadata, redacted arguments, approved samples, restricted incident evidence and prohibited-storage classes as separate tiers. Encrypt, restrict access, audit trace reads and redact before analytics.

Reasoning traces

Record observable proposals, decisions, effects and user-facing rationale, not private model reasoning as a required security record.

Deletion

Remove governed payloads while retaining permitted structural evidence of the event and deletion.

Evaluate agents at several layers

LayerRequired evidence
Final stateAuthoritative accounts, repository/tests or research artifacts/claims
AuthorityDelegation, confirmation/approval, prohibited and unnecessary effects
TrajectoryTool/argument correctness, recovery, repetitions, efficiency and termination; allow multiple valid paths
ProductReal completion, corrections and delayed failures
EconomicsFixed-cost success, cost/success and latency/resource tails

Construct representative evaluation suites

Cover tasks/difficulty, outages, ambiguity, permissions, sensitive data, injection channels, memory, corrections, providers, regions and unknown effects. Hold out scenario families, not just strings.

Deterministic checks

Check final state, authority, schemas, approvals, data flow, duplicates, budgets, termination and artifact integrity directly.

Semantic graders

Use qualified humans or calibrated judges for ambiguous usefulness; blind comparisons and inspect disagreements.

Safety-utility frontier

Report false allows and false blocks by consequence; severe-harm protection must not hide blocked valid work.

Stochasticity

Repeat representative cases with justified uncertainty; nine successes do not compensate for one prohibited severe action.

Test the whole system adversarially

Test controlled adversarial scenarios across every input and infrastructure boundary, without exposing real assets.

FamilyBoundary to verify
Injection/forgeryUser, retrieval, arguments, tool results, code and agent messages cannot grant authority
Isolation/exfiltrationConfused deputy, escalation, cross-tenant retrieval and composed-tool data flow
DurabilityDuplicate effects, delayed results, unknown outcomes and stale grants
PersistenceMemory poisoning, delayed triggers and compaction
OperationsApproval fatigue, sandbox boundaries, resource exhaustion and fallback downgrade

Adaptive testing supplements static lists; record owner, severity, fix, retest and residual risk without publishing sensitive exploit details.

Use production evidence carefully

Sample success/failure, corrections, escalation, costly tails, denials, unknowns, rare high-risk tools and new tenants/regions. Respect purpose and privacy before training on traces. Replay checks compatibility, not reactions to unobserved policies; deployed-policy selection remains a bias.

Stage releases by risk and authority

Progress through offline tests, simulated replay, shadow planning, internal reads, confirmed reversible writes and narrow consequential canaries. Then use suitable controlled experiments, regional/tenant rollout, retained holdouts and monitoring; benchmark success does not grant write authority.

Release unit

DeploymentManifest
  workflow, model, provider, runtime, tool_contract_versions
  policy_version, memory_policy, region, owner
  compatibility_ranges, evaluation_receipts, rollback_units
ExecutionEvent
  execution_id, event_id, expected_state_version, timestamp
  logical_call_id, attempt_id, actor, decision, policy_version
  evidence_refs, result_identity, outcome, budget_delta

Roll components independently only within declared compatibility ranges.

Stop conditions

Stop or narrow authority for unauthorized/duplicate effects, cross-tenant exposure, severe policy changes, overdue unknowns, unsafe budgets or invalid evidence.

Rollback

Rollback units include workflow/model versions, individual tools, policy, memory writes and advice-only mode; narrow containment can beat global shutdown.

Design for degraded operation

FailureDegraded behavior
ProviderQueue durable work or use evaluated policy-compatible fallback/advice; no unauthorized new destination
PolicyBlock high risk; only approved narrow low-risk grants or advice
ToolPreserve state, explain unavailable action, offer manual/later path; no retry loop
Event storeNo consequential dispatch without durable pre-write
MemoryUse explicit context or ask again; invent no preferences
BudgetConservative local limits; queue expensive work until reliable accounting

Isolate tenants, regions, and environments

PartitionRequired separation
TenantState, memory, credentials, retrieval, traces, quotas and security-relevant cache keys; test missing/confused identity
RegionModel/memory/tool/trace payloads local where required; share only approved control metadata
EnvironmentDistinct dev/eval/staging/production credentials; simulated tools share schema, never production authority

Attribute and control cost

Include context, planning, tools, retrieval/memory, sandboxes, approvals/support, traces and abandoned work in cost/success and tail accounting.

Cost controls

Evaluate smaller-model routing, provenance-preserving compaction, valid read caches, progress stops, branch/retry caps, background batching and risk-targeted review. Estimate long jobs; cheap calls can produce expensive workflows through extra steps and corrections.

Budget response

Soft limits request bounded replanning; hard limits stop calls with a partial/escalated outcome. The model cannot increase its own hard budget.

Decide what to build, buy, and standardize

Adopt where suitableIntegrate with company semantics
Models, generic workflows, queues, secrets, telemetry, policy engines and sandboxesIdentity/delegation, tools, data flow, approvals, evaluation, releases, incidents/revocation and cost attribution

Portability

Keep tools, events, cases, policy inputs and manifests portable; declare provider-specific dependencies instead of flattening every capability.

Exit test

Price provider/runtime/policy/memory replacement before adoption.

Migrate existing agents incrementally

PhaseAcceptance evidence
0: InventoryOwners, tools, credentials, risk, incidents/cost and unknown retry semantics; choose read-heavy and reversible-write pilots
1: ObserveAdapter events match current behavior; identify bypass and missing identity/schema/outcome
2: Low riskEnforce schemas, delegation, budgets and traces; tested bounded incident exception
3: ConsequentialDeduplication/status, approval and reconciliation pass simulation/canary
4: Shared releaseManifest, comparable evaluation, model/policy revocation
5: Retire bypassGateway reliability and product degradation proven before removing direct credentials

One authority controls each action during migration; dual enforcement creates conflicting decisions.

Define ownership around semantics

OwnerDecision/operating responsibility
PlatformIdentity/enforcement, registry/gateway, events, policy infrastructure, budgets/telemetry, release/revocation, migration and platform incidents
ProductTask/UX, workflow/prompts, outcomes, tools, fallback, confirmation, incidents/residual risk
ToolAction semantics, schema/compatibility, side effects/retries, service levels, data policy, status/compensation and incidents
Security/policyClassification, authorization, approvals, bounded exceptions, threats and audit interpretation

Make adoption reveal product quality

Provide registration, approved tools, typed clients, local simulation, standard evaluations, shadow/canary, traces/cost and bounded exceptions. Measure safe onboarding, ticket-free releases, diagnosis and bypass attempts; repeated exceptions reveal missing capabilities or misplaced ownership.

Walk through the duplicate-credit incident

The core ledger retains credit-123 through the lost response and authoritative lookup. Before dispatch, validate account, amount, reason, tenant, region and required confirmation. After reconciliation, cite the commit/audit IDs; unsupported downstream semantics require manual handling, not another key.

Walk through the malicious-document incident

Preserve the report’s trust label through retrieval/context, deny prohibited export before credentials issue, and log policy version/reason class. Offer an approved internal summary and retain a controlled regression case; model obedience is not the security boundary.

Staff-level decisions

Reusable cross-team contracts need migration, tested degradation and aligned owners; defend one mechanism rather than listing interfaces.

Principal-level decisions

Choose shared versus local boundaries, portfolio, migration/retirement and exit evidence while developing independent technical owners.

Senior-principal decisions

Titles below describe scope archetypes, not employer grading rules or hiring guarantees.

Define a doctrine, not one implementation

Keep authority, typed effects, trust, portable evidence, product ownership and stricter regional policy stable across implementation changes.

Federate technical authority

Delegate domain decision rights, interface review, incident authority and escalation instead of creating a single-person approval bottleneck.

Balance several portfolios

Balance control, models, products, security, migration and retirement; revisit funding using incidents, adoption, costs and changed capabilities.

Coordinate external constraints

Preserve provider/regional variation and decide when external standards improve portability versus freezing an immature boundary.

Design succession and reversal

Retain decision records, owners, compatibility, incident practice and portable evidence through leadership changes. A regulated product may separate execution while retaining tool/audit contracts; state evidence that would reverse centralization.

Retain technical depth

Defend unknown effects, capabilities, event consistency, data flow, evaluator support or regional failover under a concrete changed condition.

Compare rejected architectures

One universal agent runtime

Standardize authority/evidence first; consolidate planning only when operating evidence supports the coupling.

Permissions in prompts

Prompt instructions do not enforce authorization.

Direct tool credentials in each agent

Broad direct credentials defeat governed revocation, audit and data flow.

Retry every timeout

Unknown effects need reconciliation, not automatic new dispatch.

Store every trace forever

Classify retention instead of accumulating privacy and cost risk.

Human approval for every write

Match review to consequence, reversibility and uncertainty; universal review creates fatigue.

Central team owns all tools

Tool owners retain semantics and operation under shared contracts.

Structure a 60-minute interview

Minutes 0 to 7: scope authority and incidents

Scope users, consequences, identity, regions, scale and incidents.

Minutes 7 to 15: invariants and architecture

Draw authority, tools, state, evidence, budgets and isolation.

Minutes 15 to 27: deep technical boundary

Defend one boundary: capability, retries, state, memory/data flow, coordination or isolation.

Minutes 27 to 38: evaluation and rollout

Cover final state, permissions, trajectories, repeated/adversarial evaluation, staged authority, stops and rollback.

Minutes 38 to 48: migration and operation

Show pilots, single-authority migration, degradation, ownership, cost and adoption evidence.

Minutes 48 to 55: principal portfolio

Choose shared/local boundaries, sourcing, portability, retirement and review points.

Minutes 55 to 60: senior-principal scope

Explain doctrine, delegated technical authority, external constraints, succession and reversal evidence.

Distinguish answer levels

Senior

One reliable product workflow, tools, state, evaluation and confirmation.

Staff

Reusable cross-team contracts, retries, migration and ownership.

Principal

Cross-organization boundaries, delivery balance, provider options and delegated owners.

Senior principal

Several independently owned directions with coherent doctrine, external constraints, succession and reversible decisions.

Observer scorecard

Score each dimension from 0 to 2.

Dimension012
AuthorityTrusts promptsNames permissionsBinds identity, delegation, arguments, and credentials
Tool contractNames schemasAdds side effectsDefines retry, status, policy, version, and ownership
StateKeeps a transcriptAdds checkpointsSeparates workflow and tool-call state with reconciliation
SecuritySays filter injectionsAdds allowlistsEnforces data flow, sandbox, tenant, and approval boundaries
EvaluationMeasures task successAdds trajectoriesTests final state, authority, severe tails, and held-out families
ReliabilityAdds retriesAdds fallbackHandles unknown effects, degraded modes, revocation, and rollback
MigrationRequires adoptionSuggests pilotsTransfers authority incrementally and retires bypass paths
Principal scopeAdds more teamsGives a roadmapChooses shared boundaries, portfolio, owners, and exit evidence
Senior-principal scopeSays company-wideAdds multi-year scaleDefines doctrine, federated authority, succession, and reversal
CommunicationLists componentsUses a structurePreserves the decision while changing depth under challenge

Use this as a practice diagnostic, not a validated hiring rubric; explain evidence behind each score.

Strong signals

Inspectable authority, effect state, provenance, outcome evidence, staged rollout, ownership and exit paths support the design.

Weak signals

Broad credentials, transcript-only state, blind retries, ungoverned memory and model-only security violate those boundaries.

Changed-condition follow-ups

  1. A region prohibits sending customer text to the primary model provider. What remains shared?
  2. A tool reports success but the downstream state is inconsistent. Which record is authoritative?
  3. A user revokes access while an asynchronous workflow is waiting for approval. What happens next?
  4. A product needs a tool action that cannot support idempotency or status lookup. Can it join the platform?
  5. A malicious tool result asks the agent to send prior context to an external endpoint. Where is it blocked?
  6. A model update doubles denied-action proposals while task success improves. Do you ship?
  7. A research agent needs broad read access for one week. How do you grant and review it?
  8. One tenant consumes half the model budget during a customer incident. How does scheduling change?
  9. A vendor offers an integrated runtime, memory, and tool gateway. Which contracts must remain portable?
  10. Product teams bypass the gateway because policy evaluation adds 100 milliseconds. What do you change?
  11. A regulator requires explanations for every denied financial action. What evidence is safe and sufficient?
  12. Two principal engineers disagree on whether memory should be centralized. How does the decision proceed?
  13. A new model can plan across 1,000 steps. Which platform limits should change, if any?
  14. The platform reduces incidents but slows agent launches by 40%. Is the program succeeding?
  15. The executive sponsor leaves. Which mechanisms keep the direction valid, and which decisions reopen?
  16. An external tool standard gains adoption but omits your data-flow policy. Do you adopt, extend, or reject it?

For each follow-up, state which invariant changes, which authority decides, which evidence is required, and what remains reversible.


Related: agent safety control-plane design, evaluate an agent, LLM security threat models, design a multi-team ML platform, and the annotated upper-IC agent-platform mock.