mcpField
B
Bpmn2ai

Bpmn2ai

Local
github.com/kshetra-studioAI & Agents1Updated 14w ago

About Bpmn2ai

Bpmn2ai defines APMN, an open notation for workflows involving people, AI agents, and automated systems. It extends BPMN 2.0 with agent-specific tasks, gates, and observability elements while retaining BPMN XML compatibility.

Key features

  1. 01BPMN 2.0-compatible workflow notation
  2. 02Agent, RAG, and MCP task types
  3. 03Confidence and semantic routing gates
  4. 04Agent handoff and memory nodes
  5. 05Built-in observability events

Use cases

  1. 01Modeling workflows with human and agent collaboration
  2. 02Routing tasks by confidence or semantic match
  3. 03Representing MCP tool calls in process diagrams

MCP support

The project describes the TwinTrack reference compiler's MCP server, which lets compatible clients migrate BPMN XML, compile APMN workflows, review models, and inspect the specification.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"apmn": {
"command": "npx",
"args": [
"-y",
"mcp-remote"
]
}
}
}
Run commandnpx -y mcp-remote

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-remote

Tools

8

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
bpmn_xmlstringYesRaw BPMN 2.0 XML string
api_keystringNoOptional — pass your TwinTrack API key here if not set in MCP config headers. Get one by calling authenticate() first.

Details

From the project README

APMN — AI Process Model and Notation

BPMN for the AI era.

BPMN gave the world a shared language for business processes.
APMN gives the world a shared language for agentic processes.

License Spec Version Status Creator


What is APMN?

AI Process Model and Notation (APMN) is an open, vendor-neutral, visual notation standard for designing workflows where humans, AI agents, and automated systems collaborate.

It is a superset of BPMN 2.0 — every APMN file is a valid BPMN 2.0 XML document. APMN-specific constructs live in the apmn: extension namespace, meaning existing BPMN tools open APMN files without modification.

APMN adds what BPMN was never designed for:

BPMN 2.0APN
Deterministic flow onlyProbabilistic (confidence-based) routing
Human tasks and service callsAgents, RAG, MCP tools, vector stores, memory
Binary gateways (yes/no)Confidence gates, reasoning gates, semantic gates
No observability conceptObservability events baked into the notation
No multi-agent conceptAgent handoff as a first-class flow element

New Node Types

NodeTypeDescription
🤖 agentTaskTaskLLM-driven task. Attrs: model, system_prompt, tools[], temperature
📚 ragTaskTaskRetrieval-augmented generation. Attrs: vector_store, top_k, similarity_threshold
🔌 mcpToolTaskTaskInvoke an MCP server tool. Attrs: server, tool_name, input_schema
👤 humanInLoopTaskTaskAgent proposes, human approves. Attrs: confidence_threshold, timeout
↗ agentHandoffTaskDelegate to a specialist agent. Multi-agent orchestration.
🧠 memoryTaskTaskRead/write agent memory (session or long-term).
⬡ vectorTaskTaskEmbed content into or query a vector store.
📡 observeEventEventEmit a trace/span to an observability platform (LangFuse, Phoenix, OTEL).

New Gate Types

GateDescription
confidenceGateRoutes on agent confidence score (0.0–1.0). Replaces binary exclusiveGateway.
reasoningGateRoutes by parsing LLM chain-of-thought output. No hard-coded condition.
modelVersionGateA/B or canary route between model versions. Safe model upgrade pattern.
semanticGateRoutes by vector similarity — input matched against intent clusters.
mcpGateCalls an MCP tool and routes on result (pass/fail/review).
escapeGateAuto-escalation. If agent fails, times out, or hits confidence floor — route to human.

Quick Example

# APMN v0.1 — Patient Preadmission
# xmlns:apmn="http://apmn.kshetra.studio/ns/1.0"

process:
  id: patient_preadmission
  name: Patient Preadmission
  targets: [orkes, google_adk]

nodes:
  - id: verify_insurance
    type: agentTask
    model: gemini-2.0-flash
    tools: [mcp://insurance-api, mcp://medicare-lookup]
    confidence_threshold: 0.95

  - id: check_policy_docs
    type: ragTask
    vector_store: hospital_policy_kb
    top_k: 5

  - id: gw_confidence
    type: confidenceGate
    source: verify_insurance.confidence
    routes:
      high:   ">= 0.95 → proceed"
      medium: "0.7–0.95 → human_review"
      low:    "< 0.7 → escalate"

  - id: compliance_check
    type: mcpToolTask
    server: mcp://compliance-checker.kshetra.studio
    tool: check_hipaa_consent

  - id: log_trace
    type: observeEvent
    platform: langfuse
    trace_name: insurance_verification

Reference Implementation

TwinTrack is the reference compiler for APMN.

APMN YAML / BPMN 2.0 + apmn: XML
             ↓
         TwinTrack
        /         \
Orkes JSON   Google ADK Python   (LangGraph, AWS Bedrock — coming)

Relationship to BPMN 2.0

APMN is designed as a superset, not a replacement:

  • APMN YAML files are the primary authoring format (human-readable, diff-friendly)
  • APMN also supports BPMN 2.0 XML with apmn: extension elements as an alternative input
  • All existing BPMN 2.0 node types (serviceTask, userTask, parallelGateway, etc.) are valid APMN and pass through unchanged
  • APMN extension elements are ignored by BPMN tools that don't support them — full backward compatibility

Spec


TwinTrack MCP Server

TwinTrack is the reference compiler for APMN. It exposes an MCP server so any MCP-compatible AI client can convert and compile APMN workflows directly.

Tools
ToolDescriptionCost
migrate_bpmnConvert BPMN 2.0 XML → APMN YAML1 credit
compile_apmnCompile APMN YAML → Orkes JSON or Google ADK Python1 credit
suggest_node_upgradeGuidance on upgrading a node to a better APMN typeFree
review_modelBest-practice review of a complete APMN modelFree
get_apmn_specSpec and platform mappings for any APMN node typeFree
list_samplesList bundled demo BPMN filesFree
Connect

Claude Desktop / Cursor — add to claude_desktop_config.json:

"twintrack": {
  "command": "npx",
  "args": ["-y", "mcp-remote", "https://bpmn2ai.kshetra.studio/mcp/", "--header", "X-Api-Key: YOUR_KEY"]
}

Claude Code CLI:

claude mcp add --transport http twintrack https://bpmn2ai.kshetra.studio/mcp/ --header "X-Api-Key: YOUR_KEY"

Get your API key at bpmn2ai.kshetra.studio — free tier available.


Roadmap

VersionTheme
v0.1 (now)Core node types, gates, YAML schema, XSD extension
v0.2Visual shape library, BPMN.io plugin
v0.3VS Code extension, APMN Playground
v1.0Stable spec, multiple reference implementations
v2.0Submit to OMG BPMN 3.0 working group

Contributing

APMN is governed as an open community standard. See CONTRIBUTING.md.

All contributions are welcome — spec clarifications, new node type proposals, example workflows, tooling.


License

Apache License 2.0 — see LICENSE.

The APN specification and all artefacts in this repository are free to use, implement, and extend without restriction.


APMN is an open standards initiative by Kshetra Studio.
Website: apmn.kshetra.studio · GitHub: kshetra-studio/apmn

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.