ArchitectureTechnical Reference
Skills, Bundles, Coordinator & MCP
Skills system, bundle system, the coordinator pattern, and MCP server integrations.
Part of the Comprehensive Technical Documentation. Definitive reference based on a non-invasive scan of the molecule-core repository.
13. Skills System
Three Capability Sources
- Workspace-local skills:
skills/<skill-name>/SKILL.md+tools/directory - Plugin-mounted rules:
/pluginsvolume (read-only), shared across all workspaces - Built-in tools: delegation, approval, memory, sandbox, telemetry, audit, compliance, governance
Skill Directory Structure
skills/generate-seo-page/
├── SKILL.md # YAML frontmatter + natural language instructions
├── tools/
│ ├── write_page.py # @tool-decorated Python functions
│ └── check_gsc.py
├── examples/ # Few-shot examples
├── templates/ # Reference files (HTML, etc.)
└── links.yaml # External resource URLsSKILL.md Frontmatter
---
name: "Generate SEO Landing Page"
description: "Create SEO-optimized bilingual landing pages"
version: "1.0.0"
tags: ["seo", "content", "bilingual"]
examples: ["Create a Vancouver renovation page in EN/ZH"]
requires:
env: ["GSC_CREDENTIALS"]
bins: ["jq"]
---
# Agent instructions follow in natural language...Hot-Reload Pipeline
| Step | Action | Timing |
|---|---|---|
| 1 | File watcher detects change in skills/ | 2s debounce |
| 2 | Reload skill metadata + tool Python modules | Immediate |
| 3 | Rebuild agent tools and Agent Card | ~100ms |
| 4 | Broadcast updated card via WebSocket | ~50ms |
| 5 | Peer system prompts rebuilt with new awareness | ~500ms |
| Total | End-to-end propagation | ~3 seconds |
14. Bundle System
Bundle Format (.bundle.json)
{
"schema": "1.0",
"id": "seo-agent-vancouver",
"name": "Vancouver SEO Agent",
"tier": 1,
"model": "anthropic:claude-sonnet-4-6",
"system_prompt": "...full prompt text...",
"skills": [{
"id": "generate-seo-page",
"name": "Generate SEO Landing Page",
"files": {
"SKILL.md": "---\nname: ...",
"tools/write_page.py": "def write_page(...):\n ..."
}
}],
"tools": [{"id": "web_search", "config": {}}],
"prompts": {"prompts/page-generation.md": "..."},
"sub_workspaces": [],
"agent_card": {"...": "A2A card snapshot"},
"author": "molecule",
"version": "1.2.0"
}Inclusion/Exclusion Rules
| Included | Excluded |
|---|---|
| Full system prompt text | API keys / secrets |
| All skill files (inlined) | Memory / conversation history |
| Prompt templates + assets | Database data |
| Tool configurations | Runtime state |
| Sub-workspace bundles (recursive) | |
| Agent Card snapshot |
Workflow
- Export: Right-click workspace → "Export as bundle" →
.bundle.jsondownload - Import: Drag
.bundle.jsononto Canvas →POST /bundles/import→ recursive provisioning → new IDs →source_bundle_idtraces lineage
17. Coordinator Pattern
How Team Expansion Works
- Workspace "expands into team" → becomes coordinator (team lead)
- Coordinator fetches children's Agent Cards to understand capabilities
- For each incoming task: analyzes → selects best-suited child → delegates via A2A
- Aggregates responses when tasks span multiple children
- Falls back to self-handling only if no child suitable
Key Properties
- Enforcement: Coordinators cannot do direct work — all execution delegated to children
- Recursive: Child workspaces can themselves expand into teams (unlimited depth)
- Transparent: Upstream parent doesn't need to know if child is single agent or team of fifty
- Detectable:
coordinator.pychecksget_children()— if children exist, coordinator mode activates
28. MCP Server & Integrations
Molecule AI MCP Server (mcp-server/)
20+ tools for Claude Code, Cursor, Codex, or any MCP client:
- Workspace CRUD (list, create, get, delete, restart)
- Agent communication (
chat_with_agent) - Memory operations (
commit_memory,search_memory) - Team management (
expand_team,collapse_team) - Secrets management (
set_secret,list_secrets) - File operations (
read_file,write_file,delete_file) - Approvals (
list_pending_approvals,decide_approval) - Config updates (
update_workspace) - Templates (
list_templates)
Transport: stdio (local CLI integration)
{
"mcpServers": {
"molecule": {
"type": "stdio",
"command": "node",
"args": ["./mcp-server/dist/index.js"],
"env": {"MOLECULE_URL": "http://localhost:8080"}
}
}
}Awareness MCP Server
For persistent cross-session memory:
{
"awareness-memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@awareness-sdk/local", "mcp"]
}
}