Molecule AI
ArchitectureTechnical Reference

Memory, Tiers & Tools

Hierarchical Memory Architecture, the runtime tier system, and tools & capabilities.

Part of the Comprehensive Technical Documentation. Definitive reference based on a non-invasive scan of the molecule-core repository.

9. Hierarchical Memory Architecture

Three Scopes

ScopeVisibilityWrite AccessUse Case
LOCALThis workspace onlySelfPrivate scratch facts, reasoning, working state
TEAMParent + children + siblingsSelfHandoffs, coordination, team-level knowledge
GLOBALReadable by all workspacesRoot onlyOrg-wide policies, standards, institutional knowledge

Four Memory Surfaces

SurfaceStorageEndpointPurpose
Scoped agent memoryagent_memories tablePOST /workspaces/:id/memoriesHMA-backed distributed memory with scope enforcement
Key/value workspace memoryworkspace_memory tablePOST /workspaces/:id/memorySimple structured state, UI-visible, optional TTL
Activity recallactivity_logs + agent_memoriesGET /workspaces/:id/session-search"What just happened?" contextual recall
Awareness-backedExternal serviceSame tool interfaceWhen AWARENESS_URL + AWARENESS_NAMESPACE configured

Memory → Skill Compounding Flywheel

Task execution
  → Durable insight captured in LOCAL/TEAM memory
  → Repeated success patterns detected (repetition signal)
  → Memory row promoted → SKILL.md package created
  → Hot-reload (~3 seconds) → skill injected into live runtime
  → Agent Card updated → broadcast to peers via WebSocket
  → Future tasks use promoted skill → faster + more reliable
  → Organization becomes more capable over time

Key property: promotion events are visible in activity logs. Skills are inspectable in Canvas Skills tab. This is not hidden prompt inflation.


10. Runtime Tier System

TierNameContainer FlagsUse Case
T1SandboxedRead-only rootfs, tmpfs /tmp, 512 MiB, no /workspace mountUntrusted code, text-only analysis
T2Standard (default)Read-write, 512 MiB, 1 CPU, /workspace mountMost agent workloads
T3Privileged--privileged, --pid=host, Docker network accessInternal tooling, elevated operations
T4Full AccessT3 + --network=host + Docker socket mountSystem-level orchestration, DevOps

Unknown tier values default to T2 for safety. Applied via provisioner.ApplyTierConfig() during container creation.


16. Tools & Capabilities

Workspace Tools (workspace/builtin_tools/)

Tool FilePurposeRBAC
memory.pyHMA memory commit_memory() / search_memory()memory.write, memory.read
delegation.pyA2A delegation to peer workspaces with retry + tracingdelegate permission
approval.pyHuman-in-the-loop approval flow with polling/WebSocketapprove permission
audit.pyRBAC enforcement + audit trail loggingaudit enforcement
compliance.pyOWASP Agentic compliance checkscompliance check
governance.pyMicrosoft Agent Governance Toolkit integrationpolicy evaluation
hitl.pyMulti-channel HITL (dashboard, Slack, email)hitl.bypass_roles
sandbox.pyCode execution (subprocess or Docker backend)sandbox access
telemetry.pyOpenTelemetry span creation and tracingtrace emission
awareness_client.pyAwareness namespace memory wrappermemory scope
security_scan.pyCVE and security scanning (pip-audit/Snyk)security audit
temporal_workflow.pyTemporal.io workflow integrationworkflow engine
a2a_tools.pyA2A delegation helpers and route resolutiondelegate/receive

Built-In MCP Tools (from .mcp.json)

ServerPurpose
molecule20+ platform management tools (workspace CRUD, chat, memory, teams, secrets, files, approvals)
awareness-memoryPersistent cross-session memory via Awareness SDK

On this page