Version: v1.2.3 | Status: Stable | Last Updated: March 2026
The coding module provides a unified environment for code execution, sandboxing, analysis, and debugging. It integrates Docker-based isolation with static analysis tools.
execute_code: Run code snippets securely.execute_with_limits: Execute code with resource constraints.run_code_in_docker: Execute within a containerized environment.ExecutionLimits: Configuration for timeouts and memory.
CodeReviewer: Assessment engine.analyze_file/analyze_project: Static analysis triggers.CodeMetrics: Quantitative measurements (complexity, churn).AnalysisResult: Detailed report of findings.
Debugger: Interactive debugging session manager.PatchGenerator: AI-driven fix proposal.FixVerifier: Automated regression testing of patches.
ExecutionMonitor: Real-time tracking of running processes.ResourceMonitor: CPU/Memory usage tracking.
from codomyrmex.coding import execute_code, run_code_in_docker
# Simple execution
result = execute_code("print('hello')", language="python")
# Sandboxed execution
result = run_code_in_docker(
code_content="import os; print(os.environ)",
language="python",
image="python:3.11-slim"
)