{"id":"613b3ab5-5a0e-4dff-933f-fbd66d00a4c5","entityType":"agent","slug":"crewai-sanjai-s0-crewai-code-debugger","name":"crewai-code-debugger","canonicalUrl":"https://www.xpersona.co/agent/crewai-sanjai-s0-crewai-code-debugger","canonicalPath":"/agent/crewai-sanjai-s0-crewai-code-debugger","generatedAt":"2026-10-09T04:08:28.888Z","source":"GITHUB_OPENCLEW","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-05-18T06:45:14.413Z","emptyReason":null},"description":"A multi-agent CrewAI system that automatically detects and fixes Python code errors using a sequential pipeline of Code Analyzer, Code Corrector, and Manager agents — powered by GPT-4o and CodeInterpreterTool. 🐛 CrewAI Code Debugger <p align=\"center\"> <img src=\"https://img.shields.io/badge/Python-3.10%2B-blue?style=for-the-badge&logo=python&logoColor=white\" /> <img src=\"https://img.shields.io/badge/CrewAI-1.12%2B-orange?style=for-the-badge&logo=robot&logoColor=white\" /> <img src=\"https://img.shields.io/badge/OpenAI-GPT--4o-412991?style=for-the-badge&logo=openai&logoColor=white\" /> <img src=\"https://img.shields.io/badge/Li","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. Last updated 5/18/2026.","installCommand":"git clone https://github.com/SANJAI-s0/crewai-code-debugger.git","sourceUrl":"https://github.com/SANJAI-s0/crewai-code-debugger","homepage":null,"primaryLinks":[{"label":"View Source","url":"https://github.com/SANJAI-s0/crewai-code-debugger","kind":"source"}],"safetyScore":66,"overallRank":24.4,"popularityScore":0,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"A multi-agent CrewAI system that automatically detects and fixes Python code errors using a sequential pipeline of Code Analyzer, Code Corrector, and Manager ag"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-05-18T06:45:14.413Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"crewai","status":"self-declared"},{"label":"multi-agent","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":3,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"crewai","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"multi-agent","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:crewai|supported|profile capability:multi-agent|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-05-18T06:45:14.413Z","emptyReason":"No source adoption metrics were available."},"stars":0,"forks":0,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-05-18T06:45:14.412Z","emptyReason":null},"lastUpdatedAt":"2026-05-18T06:45:14.413Z","lastCrawledAt":"2026-05-18T06:45:14.412Z","lastIndexedAt":null,"nextCrawlAt":"2026-05-25T06:45:14.412Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"GITHUB OPENCLEW","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"git clone https://github.com/SANJAI-s0/crewai-code-debugger.git","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"GITHUB_OPENCLEW","generatedAt":"2026-10-09T04:08:28.887Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/crewai-sanjai-s0-crewai-code-debugger/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"GITHUB OPENCLEW","verified":false,"confidence":"high","updatedAt":"2026-05-18T06:45:14.413Z","emptyReason":null},"readme":"# 🐛 CrewAI Code Debugger\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/Python-3.10%2B-blue?style=for-the-badge&logo=python&logoColor=white\" />\n  <img src=\"https://img.shields.io/badge/CrewAI-1.12%2B-orange?style=for-the-badge&logo=robot&logoColor=white\" />\n  <img src=\"https://img.shields.io/badge/OpenAI-GPT--4o-412991?style=for-the-badge&logo=openai&logoColor=white\" />\n  <img src=\"https://img.shields.io/badge/License-MIT-green?style=for-the-badge\" />\n  <img src=\"https://img.shields.io/badge/Process-Sequential-purple?style=for-the-badge\" />\n  <img src=\"https://img.shields.io/badge/Planning-Enabled-red?style=for-the-badge\" />\n</p>\n\nA multi-agent system built with **CrewAI** that automatically detects and fixes errors in Python code. Two specialized agents — a Code Analyzer and a Code Corrector — work sequentially under a Manager agent to deliver clean, corrected code.\n\n---\n\n## 📚 Table of Contents\n\n- [Overview](#-overview)\n- [Workflow Diagram](#-workflow-diagram)\n- [Project Structure](#-project-structure)\n- [Agents](#-agents)\n- [Tasks](#-tasks)\n- [Example](#-example)\n- [Setup & Installation](#-setup--installation)\n- [Usage](#-usage)\n- [Configuration](#-configuration)\n- [License](#-license)\n\n---\n\n## 🧠 Overview\n\nThis project demonstrates a **sequential CrewAI pipeline** with planning enabled. Given a snippet of buggy Python code, the system:\n\n1. Runs the code through a **Code Analyzer** agent (powered by `CodeInterpreterTool`) to detect all syntax and logical errors.\n2. Passes the error report to a **Code Corrector** agent that returns a fully fixed, PEP-8 compliant version.\n3. A **Manager** agent oversees the entire workflow, coordinating delegation and ensuring quality output.\n\n---\n\n## 🔀 Workflow Diagram\n\n```mermaid\nflowchart TD\n    A([🚀 Start]) --> B[📥 Input: Buggy Python Code]\n    B --> C{🧠 Manager Agent\\nOversees Workflow}\n\n    C --> D[🔍 Code Analyzer Agent\\nCodeInterpreterTool]\n    D --> E[📋 Analysis Task\\nIdentify Syntax & Logic Errors]\n    E --> F[📄 Error Report\\nList of Issues Found]\n\n    F --> G[🔧 Code Corrector Agent]\n    G --> H[✏️ Correction Task\\nFix Identified Errors]\n    H --> I[✅ Corrected Python Code]\n\n    I --> J([🏁 End: Output Delivered])\n\n    style A fill:#4CAF50,color:#fff\n    style J fill:#4CAF50,color:#fff\n    style C fill:#FF9800,color:#fff\n    style D fill:#2196F3,color:#fff\n    style G fill:#9C27B0,color:#fff\n    style F fill:#f5f5f5,stroke:#999\n    style I fill:#E8F5E9,stroke:#4CAF50\n```\n\n> The `.mmd` source file is located at [`Flow/workflow.mmd`](Flow/workflow.mmd).\n\n---\n\n## 📁 Project Structure\n\n```\ncrewai-code-debugger/\n├── Flow/\n│   └── workflow.mmd            # Mermaid workflow diagram source\n├── crewai_debugger.ipynb       # Main notebook — agents, tasks, and crew\n├── requirements.txt            # Python dependencies\n├── .env.example                # Environment variable template\n├── .gitignore\n├── LICENSE\n└── README.md\n```\n\n---\n\n## 🤖 Agents\n\n| Agent | Role | Tool | Delegation |\n|---|---|---|---|\n| Code Analyzer | Identifies syntax & logical errors | `CodeInterpreterTool` | ❌ |\n| Code Corrector | Fixes all identified errors | — | ❌ |\n| Manager | Oversees and coordinates the pipeline | — | ✅ |\n\n---\n\n## 📋 Tasks\n\n### 1. Analysis Task\n- **Agent:** Code Analyzer\n- **Tool:** `CodeInterpreterTool` — executes the code inside a Docker container to surface runtime and syntax errors\n- **Output:** A numbered list of all errors with type, location, and description\n\n### 2. Correction Task\n- **Agent:** Code Corrector\n- **Context:** Receives the error list from the Analysis Task via `context=[analysis_task]`\n- **Output:** Complete, corrected Python code ready to run\n\n---\n\n## 💡 Example\n\n### Input (Buggy Code)\n\n```python\ndef fibonacci_iterative(n):\nif n < 0:\nreturn []\nelif n == 1:\nreturn [0]\nelif n == 2:\nreturn [0, 1]\nfib_sequence = [0, 1]\nfor i in range(2, n):\nnext_fib = fib_sequence[-1] + fib_sequence[-2]\nfib_sequence.append(next_fib)\nreturn fib_sequence\n```\n\n### Expected Output (Corrected Code)\n\n```python\ndef fibonacci_iterative(n):\n    if n < 0:\n        return []\n    elif n == 1:\n        return [0]\n    elif n == 2:\n        return [0, 1]\n    fib_sequence = [0, 1]\n    for i in range(2, n):\n        next_fib = fib_sequence[-1] + fib_sequence[-2]\n        fib_sequence.append(next_fib)\n    return fib_sequence\n```\n\n---\n\n## ⚙️ Setup & Installation\n\n### Prerequisites\n\n- Python 3.10+\n- Docker Desktop (required by `CodeInterpreterTool` to execute code safely)\n- An [OpenAI API key](https://platform.openai.com/account/api-keys) with an active billing plan\n\n### Steps\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/SANJAI-s0/crewai-code-debugger.git\ncd crewai-code-debugger\n\n# 2. Create and activate a virtual environment\npython -m venv .venv\nsource .venv/bin/activate        # Windows: .venv\\Scripts\\activate\n\n# 3. Install dependencies\npip install -r requirements.txt\n\n# 4. Configure environment variables\ncp .env.example .env\n# Edit .env and add your OPENAI_API_KEY\n```\n\n---\n\n## 🚀 Usage\n\nOpen and run the notebook:\n\n```bash\njupyter notebook crewai_debugger.ipynb\n```\n\nRun all cells top to bottom. The crew will execute sequentially:\n\n1. Code Analyzer evaluates the buggy code and lists all errors.\n2. Code Corrector applies fixes based on the error report.\n3. The final corrected code is displayed in the Run the Pipeline cell.\n\nTo debug different code, update the `BUGGY_CODE` variable in **Cell 3**.\n\n---\n\n## 🔧 Configuration\n\n| Variable | Description | Required |\n|---|---|---|\n| `OPENAI_API_KEY` | Your OpenAI API key (paid plan required) | ✅ |\n| `OPENAI_MODEL_NAME` | Model to use (default: `gpt-4o`) | ❌ |\n\nSet these in your `.env` file (use `.env.example` as a template).\n\n> `CodeInterpreterTool` requires **Docker Desktop** to be running. Start it before executing the pipeline cell.\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n","readmeExcerpt":"🐛 CrewAI Code Debugger <p align=\"center\"> <img src=\"https://img.shields.io/badge/Python-3.10%2B-blue?style=for-the-badge&logo=python&logoColor=white\" /> <img src=\"https://img.shields.io/badge/CrewAI-1.12%2B-orange?style=for-the-badge&logo=robot&logoColor=white\" /> <img src=\"https://img.shields.io/badge/OpenAI-GPT--4o-412991?style=for-the-badge&logo=openai&logoColor=white\" /> <img src=\"https://img.shields.io/badge/Li","codeSnippets":[],"executableExamples":[{"language":"mermaid","snippet":"flowchart TD\n    A([🚀 Start]) --> B[📥 Input: Buggy Python Code]\n    B --> C{🧠 Manager Agent\\nOversees Workflow}\n\n    C --> D[🔍 Code Analyzer Agent\\nCodeInterpreterTool]\n    D --> E[📋 Analysis Task\\nIdentify Syntax & Logic Errors]\n    E --> F[📄 Error Report\\nList of Issues Found]\n\n    F --> G[🔧 Code Corrector Agent]\n    G --> H[✏️ Correction Task\\nFix Identified Errors]\n    H --> I[✅ Corrected Python Code]\n\n    I --> J([🏁 End: Output Delivered])\n\n    style A fill:#4CAF50,color:#fff\n    style J fill:#4CAF50,color:#fff\n    style C fill:#FF9800,color:#fff\n    style D fill:#2196F3,color:#fff\n    style G fill:#9C27B0,color:#fff\n    style F fill:#f5f5f5,stroke:#999\n    style I fill:#E8F5E9,stroke:#4CAF50"},{"language":"text","snippet":"crewai-code-debugger/\n├── Flow/\n│   └── workflow.mmd            # Mermaid workflow diagram source\n├── crewai_debugger.ipynb       # Main notebook — agents, tasks, and crew\n├── requirements.txt            # Python dependencies\n├── .env.example                # Environment variable template\n├── .gitignore\n├── LICENSE\n└── README.md"},{"language":"python","snippet":"def fibonacci_iterative(n):\nif n < 0:\nreturn []\nelif n == 1:\nreturn [0]\nelif n == 2:\nreturn [0, 1]\nfib_sequence = [0, 1]\nfor i in range(2, n):\nnext_fib = fib_sequence[-1] + fib_sequence[-2]\nfib_sequence.append(next_fib)\nreturn fib_sequence"},{"language":"python","snippet":"def fibonacci_iterative(n):\n    if n < 0:\n        return []\n    elif n == 1:\n        return [0]\n    elif n == 2:\n        return [0, 1]\n    fib_sequence = [0, 1]\n    for i in range(2, n):\n        next_fib = fib_sequence[-1] + fib_sequence[-2]\n        fib_sequence.append(next_fib)\n    return fib_sequence"},{"language":"bash","snippet":"# 1. Clone the repository\ngit clone https://github.com/SANJAI-s0/crewai-code-debugger.git\ncd crewai-code-debugger\n\n# 2. Create and activate a virtual environment\npython -m venv .venv\nsource .venv/bin/activate        # Windows: .venv\\Scripts\\activate\n\n# 3. Install dependencies\npip install -r requirements.txt\n\n# 4. Configure environment variables\ncp .env.example .env\n# Edit .env and add your OPENAI_API_KEY"},{"language":"bash","snippet":"jupyter notebook crewai_debugger.ipynb"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["python"],"docsSourceLabel":"GITHUB OPENCLEW","editorialOverview":"A multi-agent CrewAI system that automatically detects and fixes Python code errors using a sequential pipeline of Code Analyzer, Code Corrector, and Manager agents — powered by GPT-4o and CodeInterpreterTool. 🐛 CrewAI Code Debugger <p align=\"center\"> <img src=\"https://img.shields.io/badge/Python-3.10%2B-blue?style=for-the-badge&logo=python&logoColor=white\" /> <img src=\"https://img.shields.io/badge/CrewAI-1.12%2B-orange?style=for-the-badge&logo=robot&logoColor=white\" /> <img src=\"https://img.shields.io/badge/OpenAI-GPT--4o-412991?style=for-the-badge&logo=openai&logoColor=white\" /> <img src=\"https://img.shields.io/badge/Li","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":413,"uniquenessScore":61,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-05-18T06:45:14.413Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-05-18T06:45:14.413Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T04:08:28.888Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/github_openclew","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}