شعار Multi Agent Workflow Lab

Multi Agent Workflow Lab

المجتمع
christiangrey922

Testing and observability for multi-agent delegation, MCP tools, permissions, sandboxed actions, prompts, and workflow replay.

الناشرchristiangrey922
المستودعmulti-agent-workflow-lab
اللغةTypeScript
التفريعات
72
النجوم
86
الأدوات المتاحة
0
نوع نقل البياناتstdio
الترخيصMIT
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح Multi Agent Workflow Lab إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 86، والنسخ المتفرعة: 72 في المستودع المرتبط.

Multi-Agent Workflow Lab

An open-source testing and observability framework for multi-agent delegation, tool execution, MCP workflows, permissions, sandboxed actions, prompts, and runtime behavior.

Status: Experimental — v0.1.0 release candidate. Suitable for local development, evaluation, and policy testing; not production-hardened infrastructure.

Why this exists

Most model evaluation stops at input → model → output. Multi-agent systems add behavior that a final answer cannot explain:

  • Which agent delegated a task, to whom, and why?
  • What context, permissions, tools, MCP servers, and budget did the child receive?
  • Did an agent attempt privilege escalation, repeat work, or enter a loop?
  • Was the delegation efficient, and was the child result actually integrated?
  • Can the run be inspected, compared, or replayed without repeating side effects?

MAWL makes those decisions explicit, policy-controlled, and traceable. Prompts are versioned assets; delegation is a first-class runtime event; deterministic rules evaluate behavior independently from optional model judges.

Key capabilities

AreaWhat is implemented
Agent runtimeTyped model actions, task limits, cancellation, retries, and deterministic mock execution
DelegationParent/child task graph, target and capability checks, depth/fan-out limits, loop detection, and result integration events
Tool executionRegistry-based invocation with schema validation, allowlists, permissions, policy, optional approval, redaction, timeout, and audit
MCPOfficial stdio and Streamable HTTP client adapters plus an in-memory mock connector; MCP data remains untrusted
SandboxRestricted local-process adapter and optional Docker provider interface with auditable lifecycle events
Identity and permissionsRuntime-issued agent identity, local development auth, deny-by-default permission and contextual policy engines
Prompt systemSemantic versions, SHA-256 hashes, strict variables, trusted/untrusted provenance, and deterministic prompt-injection signals
Input parsingJSON, YAML, Markdown, text, and structured-task normalization
ObservabilityAppend-only events, SQLite/JSONL storage, structured logs, task traces, Mermaid delegation graphs, metrics, budgets, and monitors
EvaluationNine deterministic rules, eight diagnostic dimensions, assertions, YAML specs, run comparison, prompt regression, and optional model judge
ReplayExact reconstruction, dry run, model rerun, and guarded tool rerun
Security testingPrompt injection, escalation, malicious MCP/tool output, secret leakage, traversal, sandbox, recursion, and resource-exhaustion cases

Architecture

Quick Start

Requirements: Node.js 22 or newer and pnpm 11.

From a clone or an extracted release archive:

bash
cd multi-agent-workflow-lab
pnpm install --frozen-lockfile
pnpm demo

The demo requires no API key or paid service. A public clone URL can be added after the maintainer chooses and publishes the repository location.

What the demo shows

pnpm demo runs a deterministic review chain through the CLI:

text
status: completed

orchestrator
  → researcher
    → analyst
      → reviewer
        → evaluator

delegation score: 88.75/100
workflow completed

The actual CLI output is JSON and includes the run ID, every task/agent/status, all eight evaluation dimensions, derived metrics, and the JSONL trace path.

Delegation observability

A trace records behavior rather than only the final answer:

text
orchestrator
  delegation.requested → researcher
  delegation.created   context + permissions + budget + depth

researcher
  tool.requested       → mcp.mock.search
  policy.allowed       explicit decision evidence
  tool.completed       size + redaction metadata

orchestrator
  delegation.result.accepted → child task integrated

Use these commands after a run:

bash
pnpm mawl trace show <run-id>
pnpm mawl evaluate <run-id>
pnpm mawl graph <run-id>
pnpm mawl replay <run-id> dry-run

Evaluation scores are normalized diagnostics, not mathematical truth or a security guarantee.

Example workflows

WorkflowPurposeExpected result
01-basic-delegation.yamlOrchestrator delegates one bounded research taskCompletes
02-parallel-research.yamlTwo research tasks fan out and an analyst joins themCompletes
03-review-chain.yamlResearcher → analyst → reviewer → evaluatorCompletes
04-permission-denied.yamlDirect delegation to a non-allowlisted targetFails safely
05-mcp-untrusted-output.yamlHostile MCP content is treated as data in the test harnessCompletes safely
06-delegation-loop.yamlAgent A → B → A recursionFails safely
07-human-approval.yamlApproval-provider checkpoint behaviorCompletes; approval logic is tested separately
08-budget-exceeded.yamlWorkflow-wide token budget exhaustionFails safely
09-bad-vs-good-orchestrator.yamlGood baseline for comparative evaluationCompletes

Run any positive example with:

bash
pnpm mawl run workflows/02-parallel-research.yaml

The negative examples intentionally return a non-zero exit code when the requested action is blocked.

Good vs. bad orchestrator

The lab compares a bounded, least-privilege orchestration trace with a synthetic bad trace containing duplicate work, leaked context, escalated permission, and an unauthorized tool request. RunComparator and DelegationEvaluator report changes in:

  • agent selection and delegation edges;
  • task decomposition and depth;
  • context and permission minimization;
  • tool use, retries, tokens, runtime, and failures;
  • result integration and overall diagnostic score.

The executable coverage is in tests/lab.test.ts, with scenario inputs under scenarios/.

CLI

In this workspace, prefix CLI arguments with pnpm mawl:

text
pnpm mawl run <workflow.yaml> [json-input]
pnpm mawl agents list
pnpm mawl workflow inspect <run-id>
pnpm mawl task inspect <task-id>
pnpm mawl inspect agent permissions <agent-id>
pnpm mawl inspect mcp server [server-id]
pnpm mawl trace show <run-id>
pnpm mawl evaluate <run-id>
pnpm mawl graph <run-id> [output.mmd]
pnpm mawl replay <run-id> [exact|model-rerun|tool-rerun|dry-run]
pnpm mawl compare <run-a> <run-b>
pnpm mawl test <workflow-test.yaml>
pnpm mawl prompts list
pnpm mawl prompts inspect <prompt-id> [version]
pnpm mawl permissions inspect <agent-id>
pnpm mawl doctor

tool-rerun blocks tool names or manifests classified as external side effects unless the embedding application supplies explicit permission for that exact tool. The CLI supplies no side-effect permissions.

Prompts are first-class assets

This is not a directory of free-form prompt snippets. YAML assets under prompts/ include:

  • stable ID and semantic version;
  • owner, type, purpose, and known risks;
  • declared input schema and expected output;
  • allowed actions and recommended capabilities;
  • content hash verified by PromptRegistry;
  • provenance and trust classification when assembled at runtime.

Runtime and security policy layers remain separate from untrusted user, tool, MCP, and child-agent content. Prompt quality tests detect duplicate IDs, invalid versions, missing metadata, variable/placeholder errors, unexpected hashes, and undeclared references.

Security model

  • Permissions and contextual policies deny unmatched requests by default.
  • Agent execution identities are issued by the runtime and linked to workflow/task/session IDs.
  • Child context, authority, and budget are reduced from the parent.
  • MCP responses and model/tool/child output are untrusted data, not authority.
  • Secret references and output redaction limit accidental exposure.
  • Tool requests pass manifest resolution, validation, permission, policy, optional approval, output checks, and audit.
  • Delegation depth, ancestry, task count, retries, calls, tokens, output, and runtime are bounded.
  • Replay refuses external side effects without an explicit per-tool permission.

The restricted local sandbox is intended for development and policy testing. It is not equivalent to hardened container, VM, microVM, or kernel isolation, and network denial is best-effort. MAWL does not claim to be prompt-injection-proof, sandbox-escape-proof, or fully zero-trust. Read the threat model and security policy.

Using a real model provider

The default path always uses MockModelProvider. An optional OpenAI-compatible chat-completions adapter is available in @mawl/providers:

bash
cp .env.example .env

Populate MODEL_PROVIDER, MODEL_ENDPOINT, and MODEL_API_KEY from a secret manager, then inject OpenAICompatibleProvider into the runtime. The CLI intentionally does not auto-load credentials. See provider integration.

Repository structure

text
multi-agent-workflow-lab/
├── apps/                    CLI and runnable examples
├── packages/
│   ├── core/                Schemas and provider contracts
│   ├── runtime/             Agent loop, tasks, delegation, scheduler, replay
│   ├── evaluation/          Rules, assertions, scores, specs, comparison
│   ├── observability/       Events, traces, graphs, metrics, budgets, monitors
│   ├── tools/ mcp/ sandbox/ Controlled execution surfaces
│   ├── auth/ permissions/ policy/ security/ secrets/
│   └── prompts/ parsers/ providers/ storage/ testing/
├── agents/                  Agent definitions
├── prompts/                 Versioned prompt assets
├── workflows/               Executable workflow examples
├── examples/                Compatibility examples and guide
├── scenarios/ redteam/      Deterministic failure and attack inputs
├── tests/                   Unit, security, lab, and end-to-end tests
├── config/                  Example pricing configuration
└── docs/                    Architecture, operations, security, and release docs

Testing and development

All default tests use local mock providers and require no external API access:

bash
pnpm install --frozen-lockfile
pnpm typecheck
pnpm lint
pnpm build
pnpm test
pnpm test:e2e
pnpm test:security
pnpm demo
pnpm mawl doctor

To extend the framework, add YAML agents under agents/, versioned prompts under prompts/, workflows under workflows/, tool manifests through ToolRegistry, MCP adapters through McpConnection/McpConnector, rules through RuleEvaluator, and scenario coverage under tests/ or scenarios/. See the documentation index and contributing guide.

Roadmap

  • distributed execution and atomic shared budgets;
  • hardened remote container or microVM sandbox providers;
  • OpenTelemetry exporters and remote observability storage;
  • additional model, identity, and MCP adapters;
  • workflow visualization UI and benchmark datasets.

Contributing, security, and license

Contributions to agents, prompts, tools, MCP connectors, workflow scenarios, evaluators, and security tests are welcome. Read CONTRIBUTING.md and CODE_OF_CONDUCT.md.

Report vulnerabilities privately as described in SECURITY.md. Do not place sensitive vulnerability details in public issues.

Licensed under the MIT License.

استخدم MCP الخاص بـ Multi Agent Workflow Lab مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Multi Agent Workflow Lab، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف Multi Agent Workflow Lab كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Multi Agent Workflow Lab.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "multi-agent-workflow-lab": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Multi Agent Workflow Lab، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Multi Agent Workflow Lab.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Multi Agent Workflow Lab لمساعدتي في هذه المهمة؟
Multi Agent Workflow Lab
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Multi Agent Workflow Lab.

الأسئلة الشائعة

ما استخدامات خادم MCP Multi Agent Workflow Lab؟

Multi Agent Workflow Lab هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Multi Agent Workflow Lab مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Multi Agent Workflow Lab مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP Multi Agent Workflow Lab مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Multi Agent Workflow Lab، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Multi Agent Workflow Lab بـ TypingMind؟

يعمل Multi Agent Workflow Lab عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Multi Agent Workflow Lab في TypingMind؟

يتيح Multi Agent Workflow Lab إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Multi Agent Workflow Lab؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان Multi Agent Workflow Lab يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇