-
Notifications
You must be signed in to change notification settings - Fork 0
Mcp agent os optimization v2 16156909190644574428 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
070aa47
25fd91a
6922e0b
2fbd7a6
40ba3a5
0198cf7
95f2a79
5c44afb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Route.X Technical Architecture | ||
|
|
||
| This document outlines the unified architecture of the **Activepieces Route.X**, integrating research-backed protocols for adaptive execution, logic-based governance, and decentralized discovery. | ||
|
|
||
| ## 📐 Unified Framework Overview | ||
|
|
||
| The Route.X acts as a high-reliability middleware stack between Route.Xs and the Activepieces piece ecosystem. | ||
|
|
||
| ```mermaid | ||
| graph TD | ||
| subgraph "Phase 1: Discovery (NANDA)" | ||
| UserAgent([Route.X]) -->|Negotiate| Manifest[/.well-known/agent.json] | ||
| Manifest -->|Broadcasting| Index[NANDA Global Index] | ||
| end | ||
|
|
||
| subgraph "Phase 2: Governance (Guido)" | ||
| Manifest -->|Validated Request| RuleEngine{Guido Rule Engine} | ||
| RuleEngine -->|SET/NOT/CONTAINS| Policy[Business Policy] | ||
| end | ||
|
|
||
| subgraph "Phase 3: Adaptive Execution (Cactus)" | ||
| Policy -->|Optimized Payload| CactusPipeline{Cactus Adaptive Pipeline} | ||
| CactusPipeline --> L1[Difficulty Estimation] | ||
| CactusPipeline --> L3[Adaptive Repair] | ||
| CactusPipeline --> L4[Semantic Guardrails] | ||
| CactusPipeline --> L7[Deterministic Extraction] | ||
| end | ||
|
|
||
| subgraph "Phase 4: Execution & Feedback" | ||
| L7 -->|Verified Params| Sandbox[[Action Sandbox]] | ||
| Sandbox -->|Result| Answer[Generate Answer] | ||
| Answer -->|Mistral Judge| Eval{RAG Evaluation} | ||
| Eval -->|Groundedness| Feedback[Strategic Agent Feedback] | ||
| end | ||
|
|
||
| style L1 fill:#f9f,stroke:#333 | ||
| style L3 fill:#bbf,stroke:#333 | ||
| style L4 fill:#bfb,stroke:#333 | ||
| style L7 fill:#fbb,stroke:#333 | ||
| style Eval fill:#fffbba,stroke:#333 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 The Four Research Pillars | ||
|
|
||
| ### 1. CactusRoute (Adaptive Routing) | ||
| **Goal**: 99.9% tool-calling reliability. | ||
| - **Layer 1 (Difficulty)**: Routes "easy" queries to fast SLMs and "hard" queries to reasoning-heavy models. | ||
| - **Layer 3 (Repair)**: Neuro-symbolic layer that auto-corrects LLM formatting errors (JSON, dates, units). | ||
| - **Layer 4 (Guardrails)**: Semantic cross-verification to prevent hallucinations. | ||
| - **Layer 7 (Fallback)**: High-precision regex extraction to rescue tool calls when the model fails. | ||
|
|
||
| ### 2. Guido (Rule Engine) | ||
| **Goal**: Deterministic governance of autonomous tools. | ||
| - **Nested Pathing**: Support for validating deeply nested JSON objects. | ||
| - **State Logic**: Enforces `SET`, `SET_TO_VALUE`, `CONTAINS`, and `NOT` conditions. | ||
| - **Virtual Tooling**: Allows "blending" multiple piece actions into a single safe interface. | ||
|
|
||
| ### 3. NANDA Protocol (Discovery) | ||
| **Goal**: Decentralized, trillion-scale agent interoperability. | ||
| - **AgentFacts (JSON-LD)**: Standardized capability manifests. | ||
| - **Verified Trust Anchors**: Secure tool-sharing via cryptographic anchors. | ||
| - **Federated Indexing**: Peer-to-peer discovery via standardized `/.well-known/` paths. | ||
|
|
||
| ### 4. Mistral Evaluation (Observability) | ||
| **Goal**: Real-time quality control for RAG systems. | ||
| - **LLM as a Judge**: Uses Mistral Large to score outputs for context relevance and answer relevance. | ||
| - **Hallucination Detection**: Specific check for factual groundedness against source-of-truth contexts. | ||
| - **Structured Feedback**: Returns machine-readable evaluation reports to the calling agent. | ||
|
|
||
| --- | ||
|
|
||
| ## 🛠️ System Components | ||
|
|
||
| | Component | Responsibility | Technical Stack | | ||
| |-----------|----------------|-----------------| | ||
| | `mcp-server.ts` | Entry point for MCP/Agent requests | Model Context Protocol SDK | | ||
| | `cactus-utils.ts` | Adaptive repair and extraction logic | Regex, Neuro-symbolic heuristics | | ||
| | `virtual-tool-service.ts` | Tool blending and Guido rule execution | TypeORM, JSONPath logic | | ||
| | `nanda-manifest-service.ts` | Capability negotiation and manifest gen | JSON-LD, NANDA v1.0 | | ||
| | `evaluate-rag.ts` | Automated quality scoring | Mistral AI, Structured Outputs | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,26 +46,27 @@ src="https://github.com/activepieces/activepieces/assets/1812998/76c97441-c285-4 | |
| <br> | ||
| <br> | ||
|
|
||
| # 🤯 Welcome to MCP.My.ID | ||
| # 🤯 Welcome to Route.X | ||
|
|
||
| [](AGENT_FRAMEWORK.md) | ||
| [](AGENT_FRAMEWORK.md) | ||
|
|
||
| All-in-one AI automation designed to be **extensible** through a **type-safe** pieces framework written in **TypeScript**. | ||
| When you contribute pieces to Activepieces they become automatically available as MCP servers that you can use with LLMs through Claude Desktop, Cursor or Windsurf! | ||
|
|
||
| <br> | ||
| <br> | ||
|
|
||
| ## 🔥 Why MCP.My.Id is Different: | ||
| ## 🔥 Why Route.X is Different: | ||
|
|
||
| - **💖 Loved by Everyone**: Intuitive interface and great experience for both technical and non-technical users with a quick learning curve. | ||
|
|
||
|  | ||
|
|
||
| - **🌐 Open Ecosystem:** All pieces are open source and available on npmjs.com, **60% of the pieces are contributed by the community**. | ||
|
|
||
| - **🤖 Agent OS Pillar**: Built on research-backed adaptive routing (CactusRoute) and decentralized discovery (NANDA). | ||
| - **🤖 Route.X Pillar**: Built on research-backed adaptive routing (**CactusRoute**), logic-based validation (**Guido**), and decentralized discovery (**NANDA**). | ||
| - **🛠️ Largest open source MCP toolkit**: All our pieces (280+) are available as MCP that you can use with LLMs on Claude Desktop, Cursor or Windsurf. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a hyphenated compound adjective ( Line 68 should use 🧰 Tools🪛 LanguageTool[grammar] ~68-~68: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI Agents |
||
| - **🌬️ Deep Mistral Integration**: Native support for Mistral AI agents with optimized tool-calling performance. | ||
|
|
||
| - **🛠️ Pieces are written in Typescript**: Pieces are npm packages in TypeScript, offering full customization with the best developer experience, including **hot reloading** for **local** piece development on your machine. 😎 | ||
|
|
||
|
|
@@ -94,10 +95,125 @@ When you contribute pieces to Activepieces they become automatically available a | |
| - [x] Flows are fully versioned. | ||
| - [x] Languages Translations | ||
| - [x] Customizable Templates | ||
| - [X] 200+ Pieces, check https://www.activepieces.com/pieces | ||
| - [X] 280+ Pieces, check https://www.activepieces.com/pieces | ||
| - [x] **Route.X Core**: Powered by **CactusRoute** (Adaptive Routing) & **Guido** (Rule Engine). | ||
| - [x] **Decentralized Discovery**: Native **NANDA Protocol** support via `/.well-known/agent.json`. | ||
| - [x] **OpenAPI Import**: Automatically generate MCP tools from OpenAPI specs (inspired by `mcp-generator-2.0`). | ||
| - [x] **Mistral AI**: Deep, native integration for high-performance agentic workflows and **LLM-as-a-Judge** evaluation. | ||
|
|
||
| **We release updates frequently. Check the product changelog for the latest features.** | ||
|
|
||
| <br> | ||
|
|
||
| ## 🏗️ Route.X System Architecture | ||
|
|
||
| Activepieces Route.X is the world's first unified "Agentic Operating System" that bridges the gap between raw LLM capabilities and reliable enterprise automation. | ||
|
|
||
| ### 🧩 The Multi-Layer Execution Stack | ||
| Every request processed by Route.X flows through a research-backed pipeline designed for 99.9% tool-calling reliability. | ||
|
|
||
| ```mermaid | ||
| graph TD | ||
| subgraph "External World" | ||
| User([Human/Agent]) -- "Natural Language Task" --> OS | ||
| end | ||
|
|
||
| subgraph "Activepieces Route.X Core" | ||
| OS{Request Router} | ||
|
|
||
| subgraph "1. NANDA Discovery" | ||
| Discovery[Capability Negotiation] | ||
| Manifest[/.well-known/agent.json] | ||
| end | ||
|
|
||
| subgraph "2. Cactus Adaptive Layer" | ||
| Cactus{Adaptive Engine} | ||
| L1[Layer 1: Difficulty] | ||
| L3[Layer 3: Repair] | ||
| L4[Layer 4: Guardrails] | ||
| L7[Layer 7: Extraction] | ||
| end | ||
|
|
||
| subgraph "3. Guido Governance" | ||
| Guido[Rule Engine] | ||
| Blended[Virtual Tools] | ||
| end | ||
| end | ||
|
|
||
| subgraph "Execution" | ||
| Exec[[Piece Action Sandbox]] | ||
| Mistral{{Mistral/OpenAI Optimized}} | ||
| end | ||
|
|
||
| User --> Manifest | ||
| Manifest --> OS | ||
| OS --> Cactus | ||
| Cactus --> L1 --> L3 --> L4 | ||
| L4 -- Fail --> L7 | ||
| L4 -- Pass --> Guido | ||
| L7 --> Guido | ||
| Guido --> Blended --> Exec | ||
| Exec --> Mistral | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 📖 Branded Route.X User Guide | ||
|
|
||
| ### 🛡️ Step 1: Secure Your Data with Virtual Tools (Guido) | ||
| Don't let agents hallucinate with raw APIs. Use **Virtual Tools** to create high-level, safe capabilities. | ||
|
|
||
| - **Blend**: Combine multiple actions into one logical tool (e.g., `CreateLead`). | ||
| - **Enforce**: Use the **Guido Rule Engine** to define mandatory conditions. | ||
| - *Example*: `IF recipient NOT CONTAINS '@company.com' THEN BLOCK.` | ||
|
|
||
| ### 🔍 Step 2: Peer-to-Peer Discovery (NANDA) | ||
| Your Activepieces project is now a self-describing node on the Agentic Web. | ||
| - **Manifest**: Your project automatically broadcasts its capabilities via `/.well-known/agent.json`. | ||
| - **Global Index**: Register your project with the **NANDA Index** to allow billions of autonomous agents to find and use your tools securely. | ||
|
|
||
| ### 🌬️ Step 3: High-Performance Execution (Mistral Native) | ||
| Experience the lowest latency in the industry with our **Mistral Deep Integration**. | ||
| - **Optimized Prompting**: We use Mistral's native tool-calling schemas for maximum precision. | ||
| - **Self-Correction**: Every call is protected by the **Cactus Adaptive Layer**, which automatically repairs model errors in real-time. | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant Agent as Strategic Agent | ||
| participant AP as Activepieces Route.X | ||
| participant Piece as Secure Piece | ||
|
|
||
| Agent->>AP: Request Tool Discovery | ||
| AP-->>Agent: JSON-LD AgentFacts | ||
| Agent->>AP: Execute 'NotifyUser' (NLP) | ||
| AP->>AP: Cactus Layer: Repairing format... | ||
| AP->>AP: Guido Engine: Validating rules... | ||
| AP->>Piece: Executing Sandbox Action | ||
| Piece-->>Agent: Verified Result | ||
| ``` | ||
|
|
||
| ### 🌬️ Mistral & OpenAI Optimization | ||
| Route.X comes with native optimization for the world's best models. | ||
| - **Mistral Native Tooling**: Optimized mappings for `mistral-large-latest`. | ||
| - **LLM as a Judge**: Built-in evaluation actions for RAG outputs (Mistral-powered). | ||
| - **OpenAPI Auto-Generator**: Import any `.json` or `.yaml` OpenAPI spec and instantly generate optimized MCP tools (powered by our `mcp-generator-2.0` logic). | ||
|
|
||
| [Read the full Route.X Documentation Hub](docs/route-x/about.md) | ||
|
|
||
| <br> | ||
|
|
||
| ## 🔬 Research & Framework Integration | ||
|
|
||
| Route.X is the result of deep integration between several state-of-the-art agentic frameworks: | ||
|
|
||
| | Framework | Role in Route.X | Key Benefit | | ||
| |-----------|------------------|-------------| | ||
| | **[CactusRoute](https://github.com/quotentiroler/CactusRoute)** | Adaptive Execution | 99% success rate via 7-layer repair and fallback. | | ||
| | **[Guido](https://github.com/quotentiroler/Guido)** | Governance & Rules | Deterministic safety for autonomous tool use. | | ||
| | **[NANDA](https://projectnanda.org)** | Discovery Protocol | Decentralized, federated agent interoperability. | | ||
| | **[MCP Generator](https://github.com/quotentiroler/mcp-generator-2.0)** | Tool Ingestion | Instant conversion of OpenAPI specs to optimized tools. | | ||
|
|
||
| --- | ||
|
|
||
| ## 🔌 Create Your Own Piece | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| title: "AI Agent" | ||
| title: "Route.X" | ||
| icon: "robot" | ||
| --- | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: AGI-Corporation/Route.X
Length of output: 142
🏁 Script executed:
Repository: AGI-Corporation/Route.X
Length of output: 85
🏁 Script executed:
Repository: AGI-Corporation/Route.X
Length of output: 832
Fix the broken documentation link to examples directory.
The referenced path
examples/route-x/does not exist in the repository. The actual examples are located inexamples/agent-os/. Update the reference fromexamples/route-x/toexamples/agent-os/to point to the correct directory containing example workflows.Note: This same broken reference also appears in
docs/route-x/quickstart.mdand should be corrected there as well.🤖 Prompt for AI Agents