> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medera.info/llms.txt
> Use this file to discover all available pages before exploring further.

# Agentic Architecture

> How the canvas, runtime, and care orchestrator fit together.

The Medera Agentic Framework is built around two pillars: the **visual canvas** where you author workflows, and the **care orchestrator** that runs them. Both share one event bus and one tenant audit trail.

## Stack

<Frame>
  <svg viewBox="0 0 720 540" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="medera/agentic-stack.svg" style={{ width: '100%', height: 'auto', display: 'block', maxWidth: '780px', margin: '24px auto' }}><defs><pattern id="mdr-dots" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="rgba(0,0,0,0.08)" /></pattern></defs><rect x="0" y="0" width="720" height="540" fill="#ffffff" /><rect x="0" y="0" width="720" height="32" fill="#141413" /><circle cx="14" cy="16" r="3" fill="#ff5f57" /><circle cx="26" cy="16" r="3" fill="#febc2e" /><circle cx="38" cy="16" r="3" fill="#28c840" /><text x="54" y="20" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11" fontWeight="500">medera/agentic-stack.svg</text><text x="706" y="20" textAnchor="end" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">three-tier architecture</text><rect x="0" y="32" width="720" height="508" fill="#fafaf6" /><rect x="0" y="32" width="720" height="508" fill="url(#mdr-dots)" /><rect x="0.5" y="0.5" width="719" height="539" fill="none" stroke="#141413" strokeOpacity="0.18" /><text x="360.0" y="56" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="16" fontWeight="600">Three-tier agentic architecture</text><rect x="20" y="80" width="680" height="64" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><rect x="41.80" y="110.20" width="9.00" height="3.60" fill="#141413" /><rect x="50.80" y="110.20" width="1.80" height="3.60" fill="#141413" /><rect x="52.60" y="101.20" width="1.80" height="1.80" fill="#76a1fc" /><rect x="52.60" y="103.00" width="1.80" height="1.80" fill="#76a1fc" /><rect x="52.60" y="110.20" width="1.80" height="3.60" fill="#76a1fc" /><rect x="52.60" y="119.20" width="1.80" height="1.80" fill="#76a1fc" /><rect x="52.60" y="121.00" width="1.80" height="1.80" fill="#76a1fc" /><rect x="54.40" y="101.20" width="9.00" height="3.60" fill="#141413" /><rect x="54.40" y="110.20" width="9.00" height="3.60" fill="#141413" /><rect x="54.40" y="119.20" width="9.00" height="3.60" fill="#141413" /><text x="82.8" y="108.0" textAnchor="start" fill="#141413" fontFamily="Inter, sans-serif" fontSize="14" fontWeight="600">Canvas</text><text x="82.8" y="126.0" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Visual workflow editor · 16 nodes + 8 BH-OS rails</text><line x1="360.0" y1="156" x2="360.0" y2="172" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="356.0,172 364.0,172 360.0,178" fill="rgba(20,20,19,0.25)" /><rect x="20" y="188" width="680" height="64" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><rect x="49.00" y="211.00" width="3.60" height="1.80" fill="#141413" /><rect x="56.20" y="211.00" width="3.60" height="1.80" fill="#141413" /><rect x="45.40" y="212.80" width="3.60" height="1.80" fill="#141413" /><rect x="59.80" y="212.80" width="3.60" height="1.80" fill="#141413" /><rect x="43.60" y="214.60" width="1.80" height="9.00" fill="#141413" /><rect x="63.40" y="214.60" width="1.80" height="9.00" fill="#141413" /><rect x="52.60" y="209.20" width="3.60" height="1.80" fill="#141413" /><rect x="52.60" y="212.80" width="3.60" height="1.80" fill="#76a1fc" /><rect x="52.60" y="214.60" width="3.60" height="1.80" fill="#76a1fc" /><rect x="52.60" y="216.40" width="3.60" height="1.80" fill="#76a1fc" /><rect x="52.60" y="218.20" width="3.60" height="1.80" fill="#76a1fc" /><rect x="52.60" y="220.00" width="3.60" height="1.80" fill="#76a1fc" /><rect x="52.60" y="221.80" width="3.60" height="1.80" fill="#76a1fc" /><rect x="45.40" y="223.60" width="1.80" height="1.80" fill="#141413" /><rect x="61.60" y="223.60" width="1.80" height="1.80" fill="#141413" /><rect x="47.20" y="225.40" width="3.60" height="1.80" fill="#141413" /><rect x="58.00" y="225.40" width="3.60" height="1.80" fill="#141413" /><rect x="50.80" y="227.20" width="7.20" height="1.80" fill="#141413" /><rect x="52.60" y="229.00" width="3.60" height="1.80" fill="#141413" /><text x="82.8" y="216.0" textAnchor="start" fill="#141413" fontFamily="Inter, sans-serif" fontSize="14" fontWeight="600">Workflow Runtime</text><text x="82.8" y="234.0" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Durable execution · WORM audit · semver versioning</text><line x1="360.0" y1="264" x2="360.0" y2="280" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="356.0,280 364.0,280 360.0,286" fill="rgba(20,20,19,0.25)" /><rect x="20" y="296" width="680" height="64" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><rect x="43.60" y="326.20" width="1.80" height="3.60" fill="#141413" /><rect x="45.40" y="324.40" width="5.40" height="1.80" fill="#141413" /><rect x="45.40" y="329.80" width="5.40" height="1.80" fill="#141413" /><rect x="50.80" y="326.20" width="1.80" height="3.60" fill="#141413" /><rect x="58.00" y="326.20" width="1.80" height="3.60" fill="#141413" /><rect x="59.80" y="324.40" width="5.40" height="1.80" fill="#141413" /><rect x="59.80" y="329.80" width="5.40" height="1.80" fill="#141413" /><rect x="65.20" y="326.20" width="1.80" height="3.60" fill="#141413" /><rect x="50.80" y="326.20" width="7.20" height="3.60" fill="#76a1fc" /><text x="82.8" y="324.0" textAnchor="start" fill="#141413" fontFamily="Inter, sans-serif" fontSize="14" fontWeight="600">Care Orchestrator</text><text x="82.8" y="342.0" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Voice + workflow agents · event bus · state machine</text><rect x="40" y="400" width="320" height="100" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="60" y="426" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="700" letterSpacing="2">INTEGRATIONS</text><text x="60" y="450" textAnchor="start" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11">Voice provider · EHR (FHIR R4) · billing</text><text x="60" y="468" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11">ePA · clearinghouse · screeners</text><text x="60" y="488" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11">Mobile · web · embedded SDKs</text><rect x="360" y="400" width="320" height="100" fill="#dbe5ff" stroke="#76a1fc" strokeWidth="1" /><text x="380" y="426" textAnchor="start" fill="#4f7be0" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="700" letterSpacing="2">COMPLIANCE PATH</text><text x="380" y="450" textAnchor="start" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11">HIPAA · 42 CFR Part 2 · audit</text><text x="380" y="468" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11">Tenant isolation · RLS · encryption</text><text x="380" y="488" textAnchor="start" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11">Merkle-chain integrity · WORM</text></svg>
</Frame>

## Workflow execution

<Frame>
  <svg viewBox="0 0 720 460" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="medera/exec-sequence.svg" style={{ width: '100%', height: 'auto', display: 'block', maxWidth: '780px', margin: '24px auto' }}><defs><pattern id="mdr-dots" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="rgba(0,0,0,0.08)" /></pattern></defs><rect x="0" y="0" width="720" height="460" fill="#ffffff" /><rect x="0" y="0" width="720" height="32" fill="#141413" /><circle cx="14" cy="16" r="3" fill="#ff5f57" /><circle cx="26" cy="16" r="3" fill="#febc2e" /><circle cx="38" cy="16" r="3" fill="#28c840" /><text x="54" y="20" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11" fontWeight="500">medera/exec-sequence.svg</text><text x="706" y="20" textAnchor="end" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">workflow execution</text><rect x="0" y="32" width="720" height="428" fill="#fafaf6" /><rect x="0" y="32" width="720" height="428" fill="url(#mdr-dots)" /><rect x="0.5" y="0.5" width="719" height="459" fill="none" stroke="#141413" strokeOpacity="0.18" /><rect x="26.0" y="60" width="140" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="96.0" y="81" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="12" fontWeight="600">Client</text><line x1="96.0" y1="100" x2="96.0" y2="430" stroke="rgba(20,20,19,0.40)" strokeDasharray="3 3" /><rect x="158.0" y="60" width="140" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="228.0" y="81" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="12" fontWeight="600">API</text><line x1="228.0" y1="100" x2="228.0" y2="430" stroke="rgba(20,20,19,0.40)" strokeDasharray="3 3" /><rect x="290.0" y="60" width="140" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="360.0" y="81" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="12" fontWeight="600">Runtime</text><line x1="360.0" y1="100" x2="360.0" y2="430" stroke="rgba(20,20,19,0.40)" strokeDasharray="3 3" /><rect x="422.0" y="60" width="140" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="492.0" y="81" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="12" fontWeight="600">Orchestrator</text><line x1="492.0" y1="100" x2="492.0" y2="430" stroke="rgba(20,20,19,0.40)" strokeDasharray="3 3" /><rect x="554.0" y="60" width="140" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="624.0" y="81" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="12" fontWeight="600">Live agents</text><line x1="624.0" y1="100" x2="624.0" y2="430" stroke="rgba(20,20,19,0.40)" strokeDasharray="3 3" /><line x1="106.0" y1="130" x2="218.0" y2="130" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="212.0,126 212.0,134 218.0,130" fill="rgba(20,20,19,0.25)" /><text x="162.0" y="124" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">POST /workflows/{id}/execute</text><line x1="238.0" y1="160" x2="350.0" y2="160" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="344.0,156 344.0,164 350.0,160" fill="rgba(20,20,19,0.25)" /><text x="294.0" y="154" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Enqueue execution job</text><line x1="370.0" y1="190" x2="482.0" y2="190" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="476.0,186 476.0,194 482.0,190" fill="rgba(20,20,19,0.25)" /><text x="426.0" y="184" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Dispatch agent</text><line x1="502.0" y1="220" x2="614.0" y2="220" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="608.0,216 608.0,224 614.0,220" fill="rgba(20,20,19,0.25)" /><text x="558.0" y="214" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Invoke live agent</text><line x1="614.0" y1="250" x2="502.0" y2="250" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="508.0,246 508.0,254 502.0,250" fill="rgba(20,20,19,0.25)" /><text x="558.0" y="244" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Return result</text><line x1="482.0" y1="280" x2="370.0" y2="280" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="376.0,276 376.0,284 370.0,280" fill="rgba(20,20,19,0.25)" /><text x="426.0" y="274" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Resolve node</text><line x1="350.0" y1="310" x2="238.0" y2="310" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="244.0,306 244.0,314 238.0,310" fill="rgba(20,20,19,0.25)" /><text x="294.0" y="304" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Stream events</text><line x1="218.0" y1="340" x2="106.0" y2="340" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="112.0,336 112.0,344 106.0,340" fill="rgba(20,20,19,0.25)" /><text x="162.0" y="334" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">WSS events + JSON</text></svg>
</Frame>

## Tenant isolation

Every workflow runs inside a tenant-scoped transaction. Row-level security enforces that all reads and writes are filtered by `organization_id` — a misconfigured tenant ID cannot reach another tenant's data.

## Versioned execution

Published workflows are immutable snapshots. Draft edits made after a publish never affect executions of the published version — what you run is what you signed.

***

## What's next

<CardGroup cols={2}>
  <Card title="Core Concepts" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/book.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=491b19a75d428ef8cd36d8afc2d3612c" href="/agentic/core-concepts" width="40" height="40" data-path="icons/ui/book.svg">Vocabulary and building blocks.</Card>
  <Card title="Orchestrator" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/layout-dashboard.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=924f63310a2c475420e62629953c3d1c" href="/agentic/orchestrator" width="40" height="40" data-path="icons/ui/layout-dashboard.svg">Multi-agent runtime.</Card>
  <Card title="Context & Memory" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/memory.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=c830629c46ea0098a37580b8f4f65d63" href="/agentic/context-memory" width="40" height="40" data-path="icons/ui/memory.svg">Variable scopes and persistent memory.</Card>
  <Card title="Canvas" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/layers.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=b19e6f39887a8a61762fcb53957d2271" href="/agentic/canvas/overview" width="40" height="40" data-path="icons/ui/layers.svg">Build your own workflow.</Card>
</CardGroup>
