-
Notifications
You must be signed in to change notification settings - Fork 75
Multi-Language Code Execution Support for Coder Agent #26
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
Open
AryanGurav106
wants to merge
24
commits into
main
Choose a base branch
from
fix/code_agent
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ **Implemented MCP integration in Cortexon using `pydantic-ai-mcp`** - The **Orchestrator Agent** now acts as the **MCP client**, while the other agents function as **MCP servers**. - This enables seamless coordination and communication between distributed agents.⚠️ **Current Blocker:** Encountering a `ModuleNotFoundError` for `pydantic_ai.mcp`, which seems to be a dependency issue. > cc @AryanGurav106 — need help resolving this import issue.
- Updated `anthropic`, `groq`, and `openai` dependencies to their latest versions. - Refactored agent initialization to use `provider` instead of `anthropic_client` for better clarity.
…alization - Updated pydantic-ai dependencies to version 0.1.2. - Initialized AnthropicProvider with API key in code, planner, and orchestrator agents as per new updates - Added MCP server initialization and proper client call to server
1. Changed MCP Server initialisation using MCPServerHTTP 2. Updated cortex_on Dockerfile to run server on 3001 port
- Updated `anthropic`, `groq`, and `openai` dependencies to their latest versions. - Refactored agent initialization to use `provider` instead of `anthropic_client` for better clarity.
…alization - Updated pydantic-ai dependencies to version 0.1.2. - Initialized AnthropicProvider with API key in code, planner, and orchestrator agents as per new updates - Added MCP server initialization and proper client call to server
1. Changed MCP Server initialisation using MCPServerHTTP 2. Updated cortex_on Dockerfile to run server on 3001 port
- Updated Dockerfile to run only the main API, with the MCP server started programmatically in a separate thread. - Refactored instructor.py to dynamically register MCP server tools and manage their execution, improving modularity and reducing direct dependencies in the MCP server. - Added threading support for MCP server initialization to enhance responsiveness.
- Moved the ask_human function from instructor.py to orchestrator_agent.py, attached to client directly to avoid future event loops
…-docker execution - Updated docker-compose.yaml to mount Docker socket and enable privileged mode for container access. - Modified Dockerfile to install Docker CLI and necessary build tools for executing code within Docker environments. - Added cleanup functionality for Docker environments in instructor.py to ensure proper resource management. - Implemented file reading and execution capabilities in the code agent, allowing interaction with files in the Docker environment. - Enhanced stream response format to include source code and metadata for better tracking of execution results. - Removed deprecated local code executor and related utilities to streamline the codebase.
…environments - Updated docker-compose.yaml to define separate services for Python, Java, C++, JavaScript, TypeScript, Ruby, Go, Rust, and PHP environments. - Each environment includes setup scripts for necessary dependencies and health checks. - Refactored Docker execution logic to utilize language-specific containers, enhancing isolation and resource management. - Removed deprecated cleanup functionality from instructor.py, streamlining the orchestration process. - Improved code execution handling in the code agent to support the new environment structure.
- Modified the TypeScript environment in docker-compose.yaml to install TypeScript quietly and check its availability as part of the health check. - Removed the previous environment setup script in favor of a more streamlined command execution. - Cleaned up unnecessary environment variables for better clarity and maintainability.
… container - Refactored docker-compose.yaml to remove individual language environment services and replace them with a single multi-language environment service. - Updated the Docker executor to support the new multi-language structure, allowing for dynamic language handling and execution. - Enhanced the code agent to activate the appropriate language environment within the container, improving execution context management. - Adjusted resource limits and health check configurations for the new multi-language environment. - Added guidelines for file naming conventions in the code agent documentation.
- Expanded the LANGUAGE_EXTENSIONS dictionary in code_agent.py to include JavaScript, TypeScript, Ruby, Go, Rust, and PHP. - This enhancement allows the code agent to recognize and handle a broader range of programming languages, improving its versatility.
Karbelekedar
approved these changes
May 6, 2025
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.
Looks good. Ready to merge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Key Features
Technical Details
Testing
Future Improvements