Go to file
devops-engineer aa6458b42d
Some checks failed
Check merge_group trigger on required workflows / Required workflows have merge_group trigger (pull_request) Successful in 9s
CodeQL / Analyze (${{ matrix.language }}) (go) (pull_request) Successful in 8s
CodeQL / Analyze (${{ matrix.language }}) (javascript-typescript) (pull_request) Successful in 10s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
CodeQL / Analyze (${{ matrix.language }}) (python) (pull_request) Successful in 10s
E2E API Smoke Test / detect-changes (pull_request) Successful in 21s
CI / Detect changes (pull_request) Successful in 31s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 20s
Retarget main PRs to staging / Retarget to staging (pull_request) Has been skipped
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 16s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 19s
Harness Replays / detect-changes (pull_request) Successful in 21s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 23s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 24s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 26s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 30s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 24s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 37s
Harness Replays / Harness Replays (pull_request) Successful in 23s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 15s
CI / Python Lint & Test (pull_request) Successful in 8m27s
CI / Canvas (Next.js) (pull_request) Failing after 9m59s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Successful in 12m57s
fix(ci): replace gh api REST passthroughs with Gitea-compatible shapes (#75 class D)
Part of the post-#66 sweep to remove `gh` CLI dependencies that fail
silently against Gitea (which exposes /api/v1 only — no GraphQL → 405,
no /api/v3 → 404). Class D covers `gh api` REST passthroughs that
either have a Gitea v1 equivalent at a different path/shape or no
equivalent at all.

Three files in this class, each with a different fix shape because
each underlying Gitea capability is different:

`auto-promote-on-e2e.yml` (compute SHA ancestry):
  Old: `gh api repos/.../compare/A...B` returning `.status`
       (ahead|behind|identical|diverged).
  Gitea: `/api/v1/repos/.../compare/A...B` accepts only branch / tag
       refs — full commit SHAs return `BaseNotExist`. So even a
       "translate the URL" rewrite would fail. Verified empirically
       2026-05-07: branches/tags work, SHAs don't.
  Fix:  Add `actions/checkout@v6 fetch-depth=200` + use `git merge-
       base --is-ancestor` locally. Exact same four-bucket semantics
       (ahead | behind | diverged | error), zero cross-host API
       dependency. Same pattern PR #66 used for auto-sync. The 200-
       commit depth comfortably covers any realistic divergence
       between :latest and a candidate retag (promotes are minutes
       apart, not hundreds of commits).

`ci.yml` (canvas-deploy-reminder commit comment):
  Old: `gh api -X POST repos/.../commits/{sha}/comments` posting a
       deploy-reminder body for the operator.
  Gitea: NO commit-comments endpoint exists — `/repos/.../commits/
       {sha}/comments` returns 404 (verified 2026-05-07). Gitea only
       exposes `/commits/{sha}/statuses` for commit-level surface,
       which is the wrong shape for a free-form reminder.
  Fix:  Drop the API call. Write the reminder body to
       `$GITHUB_STEP_SUMMARY` instead. The reminder is entirely
       operator-facing and is just as discoverable on the run summary
       page (which an operator naturally lands on when they need to
       action a deploy). Commit comments were a stale UI artefact of
       the GitHub era, not a load-bearing automation surface.
  Permission: drop `contents: write` (no longer needed) → `read`,
       smallest scope per least-privilege.

`check-merge-group-trigger.yml` (merge_group: trigger linter):
  Old: `gh api .../branches/staging/protection/required_status_checks`
       reading the contexts list, then walking workflow files.
  Gitea: branch-protection API is at /api/v1/repos/.../branch_
       protections/{name} (different path) with `status_check_
       contexts` (different field name) — but the entire workflow
       only existed to lint that workflows producing a required
       check declare a `merge_group:` trigger, which is needed
       because GitHub's merge queue dead-locks at AWAITING_CHECKS
       when the trigger is missing. Gitea has NO merge queue, NO
       gh-readonly-queue/... ref shape, NO merge_group event
       semantics. The dead-lock pattern this linter catches cannot
       occur on Gitea by construction.
  Fix:  Convert to no-op stub (same pattern as the CodeQL stub
       landed in PR #51). Workflow name + trigger surface preserved
       so any external referrer (none confirmed via the 2026-05-07
       branch-protection audit) keeps resolving. Re-enable path
       documented in the file header for if/when Gitea grows a
       merge queue.

curl invocation pattern: `curl --fail-with-body -sS` (NOT `-fsS` —
the two short-fail flags are mutually exclusive in modern curl).

Token model: workflows continue to use act_runner's GITHUB_TOKEN
where they still need API access (`auto-promote-on-e2e.yml`'s
checkout uses the runner's default token; `ci.yml` no longer needs
any API auth for the deploy-reminder step; `check-merge-group-
trigger.yml` no longer makes any API calls).

Verification:
- YAML syntax validates for all three files.
- Live curl against Gitea confirms `/compare/A...B` accepts branch
  refs (200, total_commits=N) and refuses full SHAs (404,
  BaseNotExist) — justifying the local-git approach.
- `/repos/.../commits/{sha}/comments` confirmed 404 on Gitea.
- `git merge-base --is-ancestor` exit-code semantics match the
  GitHub compare API status semantics exactly: ahead = current is
  ancestor of target; behind = target is ancestor of current;
  diverged = neither.

Closes part of #75. Class A landed in #80; class F (gh run list →
no Gitea workflow-runs API at all) lands in a separate PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 15:35:59 -07:00
.ci-trigger chore: PM-triggered CI re-run 2026-04-21 15:40:21 +00:00
.githooks secret-scan: align local pre-commit + extend drift lint (closes #1569 root) 2026-05-01 23:47:56 -07:00
.github fix(ci): replace gh api REST passthroughs with Gitea-compatible shapes (#75 class D) 2026-05-07 15:35:59 -07:00
canvas feat(canvas): demo Mock #1 — purchase-success modal on URL flag 2026-05-07 08:32:35 -07:00
docs docs: callout Python>=3.11 requirement on Universal MCP install snippet 2026-05-05 13:44:25 -07:00
infra fix(quickstart): wire up template/plugin registry via manifest.json 2026-04-23 14:55:34 -07:00
scripts fix(ci): pre-clone manifest deps in workflow, drop in-image clone (closes #173) 2026-05-07 12:59:46 -07:00
tests test(e2e): Phase 3.5 — wheel parser classifies real server response (#2967) 2026-05-05 17:31:45 -07:00
tools fix(branch-protection): apply.sh respects live state + full-payload drift 2026-05-04 20:52:11 -07:00
workspace test(e2e): Phase 3.5 — wheel parser classifies real server response (#2967) 2026-05-05 17:31:45 -07:00
workspace-server fix(ci): apply pre-clone fix to platform Dockerfile too (followup #173) 2026-05-07 13:13:13 -07:00
.coverage-allowlist.txt ci: fix regex + add coverage allowlist (14 known 0% critical paths) 2026-04-23 11:20:36 -07:00
.env.example feat(compose): IMAGE_AUTO_REFRESH=true by default in local dev (#2116) 2026-04-26 13:49:08 -07:00
.gitattributes chore(gitattributes): pin LF on snapshot golden files 2026-04-28 21:01:44 -07:00
.gitignore fix(ci): pre-clone manifest deps in workflow, drop in-image clone (closes #173) 2026-05-07 12:59:46 -07:00
.mcp.json.example fix(security): GLOBAL memory delimiter spoofing + pin MCP npm version 2026-04-18 11:09:24 -07:00
CODE_OF_CONDUCT.md chore: open-source preparation — scrub secrets, add community files 2026-04-18 00:10:56 -07:00
CONTRIBUTING.md docs: surface molecule-mcp-claude-channel plugin in external-workspace creation + CONTRIBUTING 2026-04-29 11:33:31 -07:00
COVERAGE_FLOOR.md ci(coverage): per-file 75% floor for MCP/inbox/auth Python critical paths 2026-05-04 16:35:21 -07:00
docker-compose.infra.yml fix(quickstart): make README cp-paste flow bugless end-to-end (#1871) 2026-04-23 19:53:43 +00:00
docker-compose.yml feat(compose): IMAGE_AUTO_REFRESH=true by default in local dev (#2116) 2026-04-26 13:49:08 -07:00
LICENSE fix: replace residual "Agent Molecule" with "Molecule AI" in LICENSE 2026-04-13 13:06:21 -07:00
manifest.json feat(workspace-server): mock runtime + mock-bigorg org template 2026-05-07 08:40:37 -07:00
railway.toml fix: railway.toml buildContext must be repo root for workspace-server COPY paths 2026-04-18 00:29:38 -07:00
README.md docs(readme): fix clone + deploy URLs after molecule-core rename 2026-05-01 19:17:03 -07:00
README.zh-CN.md fix(quickstart): wire up template/plugin registry via manifest.json 2026-04-23 14:55:34 -07:00
render.yaml chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00

Molecule AI Icon Logo

Molecule AI Text Logo

English | 中文

The Org-Native Control Plane For Heterogeneous AI Agent Teams

The world's most powerful governance platform for AI agent teams.

License: BSL 1.1

Go Version Python Version Next.js

Visual Canvas • Runtime Compatibility • Hierarchical Memory • Skill Evolution • Operational Guardrails

Docs HomeQuick StartArchitecturePlatform APIWorkspace Runtime

Deploy on Railway Deploy to Render


The Pitch

Molecule AI is the most powerful way to govern an AI agent organization in production.

It combines the parts that are usually scattered across demos, internal glue code, and framework-specific tooling into one product:

  • one org-native control plane for teams, roles, hierarchy, and lifecycle
  • one runtime layer that lets LangGraph, DeepAgents, Claude Code, CrewAI, AutoGen, and OpenClaw run side by side
  • one memory model that keeps recall, sharing, and skill evolution aligned with organizational boundaries
  • one operational surface for observing, pausing, restarting, inspecting, and improving live workspaces

Most teams can build a workflow, a strong single agent, a coding agent, or a custom multi-agent graph.

Very few teams can run all of that as a governed organization with clear structure, durable memory boundaries, and production operations.

That is the gap Molecule AI closes.

Why Molecule AI Feels Different

1. The node is a role, not a task

In Molecule AI, a workspace is an organizational role. That role can begin as one agent, later expand into a sub-team, and still keep the same external identity, hierarchy position, memory boundary, and A2A interface.

2. The org chart is the topology

You do not wire collaboration paths by hand. Hierarchy defines the default communication surface. The structure is not decorative UI. It is part of the operating model.

3. Runtime choice stops being a dead-end decision

LangGraph, DeepAgents, Claude Code, CrewAI, AutoGen, and OpenClaw can all plug into the same workspace abstraction. Teams can standardize governance without forcing every group onto one runtime.

4. Memory is treated like infrastructure

Molecule AI's HMA approach is designed around organizational boundaries, not just “store more context somewhere.” Durable recall, scoped sharing, awareness namespaces, and skill promotion are all part of one coherent system.

5. It comes with a real control plane

Registry, heartbeats, restart, pause/resume, activity logs, approvals, terminal access, files, traces, bundles, templates, and WebSocket fanout are not afterthoughts. They are first-class parts of the platform.

The Category Gap Molecule AI Fills

Category What it does well Where it breaks What Molecule AI adds
Workflow builders Visual task automation Nodes are tasks, not durable organizational roles Role-native workspaces, hierarchy, long-lived teams
Agent frameworks Strong runtime semantics Weak control plane and weak org-level operations Unified lifecycle, canvas, registry, policies, observability
Coding agents Excellent local execution Usually not designed as team infrastructure Workspace abstraction, A2A collaboration, platform ops
Custom multi-agent graphs Full flexibility Brittle topology and governance sprawl Standardized operating model without losing runtime freedom

What Makes Molecule AI Defensible

Advantage Why it matters in practice
Role-native workspace abstraction Your org structure survives model swaps, framework changes, and team expansion
Fractal team expansion A single specialist can become a managed department without breaking upstream integrations
Heterogeneous runtime compatibility Different teams can keep their preferred agent architecture while sharing one control plane
HMA + awareness namespaces Memory sharing follows hierarchy instead of leaking across the whole system
Skill evolution loop Durable successful workflows can graduate from memory into reusable, hot-reloadable skills
WebSocket-first operational UX The canvas reflects task state, structure changes, and A2A responses in near real time
Global secrets with local override Centralize provider access, then override only where a workspace needs specialized credentials

Runtime Compatibility, Compared

Molecule AI is not trying to replace the frameworks below. It is the system that makes them easier to run together.

Runtime / architecture Status in current repo Native strength What Molecule AI adds
LangGraph Shipping on main Graph control, tool use, Python extensibility Canvas orchestration, hierarchy routing, A2A, memory scopes, operational lifecycle
DeepAgents Shipping on main Deeper planning and decomposition Same workspace contract, team topology, activity stream, restart behavior
Claude Code Shipping on main Real coding workflows, CLI-native continuity Secure workspace abstraction, A2A delegation, org boundaries, shared control plane
CrewAI Shipping on main Role-based crews Persistent workspace identity, policy consistency, shared canvas and registry
AutoGen Shipping on main Assistant/tool orchestration Standardized deployment, hierarchy-aware collaboration, shared ops plane
OpenClaw Shipping on main CLI-native runtime with its own session model Workspace lifecycle, templates, activity logs, topology-aware collaboration
NemoClaw WIP on feat/nemoclaw-t4-docker NVIDIA-oriented runtime path Planned to join the same abstraction once merged; not yet part of main

This is the key idea: many agent runtimes, one organizational operating system.

Why The Memory Architecture Compounds

Most projects stop at “we added memory.” Molecule AI pushes further:

Conventional memory setup Molecule AI
Flat store or weak namespaces Hierarchy-aligned LOCAL, TEAM, GLOBAL scopes
Sharing is easy to overexpose Sharing is explicit and structure-aware
Memory and procedure get mixed together Memory stores durable facts; skills store repeatable procedure
Every agent can become over-privileged Workspace awareness namespaces reduce blast radius
UI memory and runtime memory blur together Separate surfaces for scoped agent memory, key/value workspace memory, and recall

The flywheel

Task execution
   -> durable insight captured in memory
   -> repeated success becomes a signal
   -> workflow promoted into a reusable skill
   -> skill hot-reloads into the runtime
   -> future work gets faster and more reliable

This is one of Molecule AI's strongest long-term advantages: the system can get more operationally capable without turning into one giant hidden prompt.

Self-Improving Agent Teams, Built Into Molecule AI

Most agent systems stop at "a smart runtime." Molecule AI pushes further: it gives teams a way to capture what worked, promote repeatable procedure into skills, reload those improvements into live workspaces, and keep the whole loop visible at the platform level.

Positioning lens Conventional self-improving agent pattern Molecule AI
Unit of improvement A single agent session or runtime A workspace, a team, and eventually the whole org graph
Operational surface Mostly hidden inside the agent loop Visible in the platform, Canvas, activity stream, memory surfaces, and runtime controls
Strategic outcome A smarter agent A compounding organization with durable knowledge and governed reusable skills

Where that shows up in Molecule AI

Core mechanism Molecule AI module(s) Why it matters
Durable memory that survives sessions workspace/builtin_tools/memory.py, workspace/builtin_tools/awareness_client.py, workspace-server/internal/handlers/memories.go Memory is not just durable, it is workspace-scoped and can route into awareness namespaces tied to the org structure
Cross-session recall workspace-server/internal/handlers/activity.go (/workspaces/:id/session-search) Recall spans both activity history and memory rows, so the system can search what happened and what was learned without inventing a separate hidden store
Skills built from experience workspace/builtin_tools/memory.py (_maybe_log_skill_promotion) Promotion from memory into a skill candidate is surfaced as an explicit platform activity, not a silent internal side effect
Skill improvement during use workspace/skill_loader/watcher.py, workspace/skill_loader/loader.py, workspace/main.py Skills hot-reload into the live runtime, so improvements become available on the next A2A task without restarting the workspace
Persistent skill lifecycle workspace-server/cmd/cli/cmd_agent_skill.go, workspace/plugins.py Skills are not just generated once; they can be audited, installed, published, shared, mounted by plugins, and governed as reusable operational assets

Why this matters in Molecule AI

  1. The learning loop is org-aware, not just session-aware. Memory can live at LOCAL, TEAM, or GLOBAL scope, and awareness namespaces give each workspace a durable identity boundary.

  2. The learning loop is visible to operators. Promotion events, activity logs, current-task updates, traces, and WebSocket fanout mean self-improvement is part of the control plane, not a hidden black box.

  3. The learning loop compounds across teams, not just one agent. A workflow learned by one workspace can become a governed skill, reload into the runtime, appear in the Agent Card, and become usable inside a larger organizational hierarchy.

The result is not just “an agent that learns.” It is an organization that gets more capable as its workspaces accumulate durable memory and reusable procedure.

What Ships In main

Canvas

  • Next.js 15 + React Flow + Zustand
  • drag-to-nest team building
  • empty-state deployment + onboarding wizard
  • template palette
  • bundle import/export
  • 10-tab side panel for chat, activity, details, skills, terminal, config, files, memory, traces, and events

Platform

  • Go/Gin control plane
  • workspace CRUD and provisioning
  • registry and heartbeats
  • browser-safe A2A proxy
  • team expansion/collapse
  • activity logs and approvals
  • secrets and global secrets
  • files API, terminal, bundles, templates, viewport persistence

Runtime

  • unified workspace/ image
  • adapter-driven execution
  • Agent Card registration
  • awareness-backed memory integration
  • plugin-mounted shared rules/skills
  • hot-reloadable local skills
  • coordinator-only delegation path

Ops

  • Langfuse traces
  • current-task reporting
  • pause/resume/restart flows
  • activity streaming
  • runtime tiers
  • direct workspace inspection through terminal and files

Built For Teams That Need More Than A Demo

Molecule AI is especially strong when you need to run:

  • AI engineering teams with PM / Dev Lead / QA / Research / Ops roles
  • mixed runtime organizations where one team prefers LangGraph and another prefers Claude Code
  • long-lived agent organizations that need memory boundaries and reusable procedures
  • internal platforms that want to expose agent teams as structured infrastructure, not ad hoc scripts

Architecture

Canvas (Next.js :3000)  <--HTTP / WS-->  Platform (Go :8080)  <---> Postgres + Redis
         |                                          |
         |                                          +--> Docker provisioner / bundles / templates / secrets
         |
         +-------------------- shows --------------------> workspaces, teams, tasks, traces, events

Workspace Runtime (Python image with adapters)
  - LangGraph / DeepAgents / Claude Code / CrewAI / AutoGen / OpenClaw
  - Agent Card + A2A server
  - heartbeat + activity + awareness-backed memory
  - skills + plugins + hot reload

Quick Start

git clone https://github.com/Molecule-AI/molecule-monorepo.git
cd molecule-monorepo

cp .env.example .env
# Defaults boot the stack locally out of the box. See .env.example for
# production hardening knobs (ADMIN_TOKEN, SECRETS_ENCRYPTION_KEY, etc.).

./infra/scripts/setup.sh
# Boots Postgres (:5432), Redis (:6379), Langfuse (:3001),
# and Temporal (:7233 gRPC, :8233 UI) on the shared
# `molecule-monorepo-net` Docker network. Temporal runs with
# no auth on localhost — dev-only; production must gate it.
#
# Also populates the template/plugin registry by cloning every repo
# listed in manifest.json into workspace-configs-templates/,
# org-templates/, and plugins/. Requires jq — install via
# `brew install jq` (macOS) or `apt install jq` (Debian). Idempotent:
# re-runs skip any target dir that's already populated.

cd workspace-server
go run ./cmd/server   # applies pending migrations on first boot

cd ../canvas
npm install
npm run dev

Then open http://localhost:3000:

  1. Deploy a template or create a blank workspace from the empty state.
  2. Follow the onboarding guide into Config.
  3. Add a provider key in Secrets & API Keys.
  4. Open Chat and send the first task.

Documentation Map

Current Scope

The current main branch already includes the core platform, canvas, memory model, six production adapters, skill lifecycle, and operational surfaces. Adjacent runtime work such as NemoClaw remains branch-level until merged, and this README keeps that distinction explicit on purpose.

License

Business Source License 1.1 — copyright © 2025 Molecule AI.

Personal, internal, and non-commercial use is permitted without restriction. You may not use the Licensed Work to offer a competing product or service. On January 1, 2029, the license converts to Apache 2.0.