Agent Mesh — Overview¶
Target
This page describes intended behaviour or structure. No implementation is claimed unless a section is explicitly marked Current implementation or Evidence.
Rewritten 2026-10-09 (design plan P2)
This page replaces the June-2026 overview that described eleven ConnectSoft.Factory.AgentMesh.* services including registries, a model router and a tool adapter layer. Those responsibilities now live with their owners: publication in the Control plane (BC-04), model routing in Model & Compute (BC-07), tool execution in Tools & MCP (BC-08), capacity in Runtime Cloud (BC-26). The Agent Mesh keeps what is its own: executing attempts and driving workflows. The old page is archived under catalogs 2026-06.
The Agent Mesh is where work is done and nowhere else: one attempt of one step, under one lease, against one immutable snapshot, with every external effect routed through a governed executor and every resumable point checkpointed. Dynamic agent reasoning (the plan-call-observe-verify loop) and deterministic orchestration (DAG workflows) coexist in the same worker, with Run Control as the single authority over both.
| Platform | PF-02 Agent Mesh (Agent & Orchestration runtime) |
| Bounded contexts | BC-06, BC-38 |
| Services | 6 (1 hosts, 5 modules, 0 external, 0 later) — 3 modelled |
| Gateways | — |
| Status | target |
Purpose¶
- Execute, never decide. The runtime claims leases, runs attempts and reports outcomes; the Control plane accepts, dispatches, approves and records.
- Survive anything. Process restarts, node loss, provider outages, tool failures and approval delays never lose a run: checkpoints before every gated call, durable timers, lease reconciliation and
Uncertainoutcomes instead of guesses (ADR-0024, Proposed). - Coexist. Agents reason dynamically inside a step; workflows orchestrate deterministically across steps with conditions, retries, compensation, timers and human gates (WorkflowEngineService).
- Stay replaceable. The Microsoft Agent Framework is the execution adapter behind a contract with versioned checkpoints; a second adapter passes the same suite.
Bounded contexts and services¶
| Context | Owns | Services (granularity) |
|---|---|---|
| BC-06 Execution | Attempt execution, checkpoints, call records, decision requests, sub-agent delegations, loaded releases | AgentRuntimeService (module); AgentExecutionService, AgentValidationService, AgentCorrectionService merged |
| BC-38 Workflow Definitions & Engine | Workflow definition versions, workflow run projections, step runs, timers, compensation | WorkflowEngineService (module) |
| Host | Composition, execution adapter, workload identity, capacity advertisement | AgentRuntimeWorker (standalone) |
| Service | Context | Granularity | Status |
|---|---|---|---|
| AgentCorrectionService | BC-06 | module of host | unmodelled |
| AgentExecutionService | BC-06 | module of host | unmodelled |
| AgentRuntimeService | BC-06 | module of host | target |
| AgentRuntimeWorker | BC-06 | standalone host | target |
| AgentValidationService | BC-06 | module of host | unmodelled |
| WorkflowEngineService | BC-38 | module of host | target |
Role in the Factory¶
flowchart LR
CP["Control Plane<br/>Run Control, Asset Publication"] -- "AttemptDispatched, ApprovalDecided, releases" --> Mesh["Agent Mesh<br/>AgentRuntimeWorker"]
Mesh -- "ReportAttemptOutcome, RequestApproval, StepReady" --> CP
Mesh -- "model calls with receipts" --> MC["Model & Compute"]
Mesh -- "tool and MCP calls with policy decision ids" --> Tools["Tools & MCP"]
Mesh -- "context snapshots, artifacts" --> KM["Knowledge & Memory"]
Mesh -- "capacity, sandboxes" --> RC["Runtime Cloud<br/>Execution Capacity"]
Mesh -- "spans, timeline events" --> Obs["Observability"]
The execution loop¶
flowchart TB
D["AttemptDispatched<br/>lease + fencing token"] --> R["Resolve and load release<br/>verify hashes, adapter compatibility"]
R --> C["Build context snapshot<br/>Knowledge, token budget"]
C --> P["Plan"]
P --> M["Model call<br/>profile, receipt"]
M --> T{"Tool call?"}
T -- "read / sandbox" --> X["Execute via Tools & MCP"]
T -- "gated class" --> A["Policy decision, approval bound to proposal hash, checkpoint"]
A --> X
X --> O["Observe, update state"]
O --> V{"Verified?"}
V -- no, corrections left --> P
V -- yes --> Rep["Report one outcome<br/>hash + fencing token"]
V -- corrections exhausted --> Rep
Component view¶
flowchart LR
subgraph P["Agent Mesh"]
AgentRuntimeWorker["AgentRuntimeWorker"]
end
P --> RunControlService["RunControlService"]
P --> AgentRegistryService["AgentRegistryService"]
P --> ModelRouterService["ModelRouterService"]
P --> ToolAdapterService["ToolAdapterService"]
P --> ContextBuilderService["ContextBuilderService"]
P --> ArtifactService["ArtifactService"]
P --> PolicyEngineService["PolicyEngineService"]
P --> AgentPoolManager["AgentPoolManager"]
P --> ControlPlaneApi["ControlPlaneApi"]
P --> ModelGatewayHost["ModelGatewayHost"]
P --> ToolExecutorHost["ToolExecutorHost"]
P --> KnowledgeHost["KnowledgeHost"]
P --> RuntimeCloudHost["RuntimeCloudHost"]
P --> ext_identity_platform["ext-identity-platform"]
Built from the ConnectSoft estate¶
| Component | Use here | Status |
|---|---|---|
AI agent host template (ConnectSoft.AI.SoftwareFactory.AgentTemplate) |
AgentRuntimeWorker host |
extend |
| Worker template | hosting shape, health, scheduling | exists |
ConnectSoft.Extensions.AI and .AgentsFramework |
Microsoft Agent Framework adapter, keyed model clients | extend |
ConnectSoft.Extensions.AI.Factory |
lifecycle skeleton (accept, prompt, run, validate, retry) to become the attempt loop | extend |
ConnectSoft.Extensions.ModelContextProtocol |
MCP client side of tool calls | extend |
| MessagingModel Orleans adapter | inbox, outbox, grains, reminders | exists |
| Observability libraries | OpenTelemetry GenAI spans | exists |
Modernization (2 to 3 year horizon)¶
- OpenTelemetry GenAI semantic conventions on every model and tool span, joined to the run trace.
- Structured outputs and tool-call reliability as evaluation gates (D32) rather than runtime heuristics.
- Agent memory and governed learning: the runtime proposes, Knowledge promotes after review (D32, D33).
- Computer-use and browser agents as sandboxed tools of the Tools & MCP platform, never as runtime privileges.
- A2A: supervisor attempts may delegate to partner agents as tools of class external (ADR-0023).
Current implementation¶
ConnectSoft.Extensions.AI.Factory (FactoryAgentBase lifecycle without persistence, lease or cancellation), ConnectSoft.Extensions.AI.AgentsFramework (keyed agents, explicit tools, RAG, file skills, DevUI) and the agent host template (direct RunAsync entry paths, credit-counter grain, logging-only jobs, saga scaffold) exist; no attempt, checkpoint, lease, workflow engine or release loader exists. The Platform repository holds six placeholder workflow definitions that nothing executes.
Final-state summary¶
One worker host, two modules, one execution adapter behind a contract, Orleans grains for durability, the Control plane for truth. Every attempt is resumable or honestly Uncertain; every workflow is data validated at publication; every effect is a governed call with a receipt.
Related¶
- Workflows · UI surfaces · Security · Observability · Deployment · Later capabilities · Durability spike
- Design pages kept from the 2026 target: agent runtime · release loading · task contracts · execution engine · failure and recovery
- Catalogs: bounded contexts · microservices · APIs · events · aggregate roots · data model · storage · workers