{"slug": "docmake-my-experience-with-sandboxed-ai-code-execution", "title": "DocMake: My experience with sandboxed AI code execution", "summary": "DocMake founder implemented a sandboxed AI code execution system for its AI Data Scientist feature, using forked subprocesses with hard memory limits and timeouts to prevent server crashes. The system also employs an \"Analyst Swarm\" logic with multiple AI personas analyzing data independently to reduce hallucinations, and integrates via MCP (Model Context Protocol) for LLM agent connectivity. The deployment is available at docmake.online.", "body_md": "# DocMake: My experience with sandboxed AI code execution\n\nThe core of the system is the AI Data Scientist feature. Instead of the LLM just guessing the answer from a text snippet, it analyzes the data structure, writes the necessary processing code, and executes it. To keep the server from melting down, I implemented a strict sandboxing architecture: DataFrames never live in the main process. Every single analysis is kicked off in a forked subprocess with hard memory limits and timeouts. If a query is inefficient or hangs, it doesn't take the whole app down with it.\n\nI also implemented an \"Analyst Swarm\" logic. Rather than relying on one prompt, the system assigns multiple AI personas to analyze the data independently. They each write their own code and run it; if they reach a consensus, the insight is delivered. It's a primitive but effective way to reduce hallucinations in data analysis.\n\nOn the integration side, I went with MCP (Model Context Protocol). This turns the assistant into a tool that other LLM agents—like [Claude](/en/tags/claude/) or Cursor—can actually trigger. It moves the workflow from \"talking about a file conversion\" to \"actually executing the conversion\" via an API call.\n\nA few technical takeaways from this deployment:\n\n**Isolation:** Subprocess isolation isn't optional; it's the only way to safely run dynamic code.**Model Performance:** For standard data manipulation, free-tier models are surprisingly capable.**Connectivity:**[MCP](/en/tags/mcp/)is quickly becoming the standard for how LLM agents interact with external tools.\n\nYou can check it out at\n\n`https://docmake.online`\n\n[Next Python Web Scraping: What Actually Works →](/en/threads/3234/)", "url": "https://wpnews.pro/news/docmake-my-experience-with-sandboxed-ai-code-execution", "canonical_source": "https://promptcube3.com/en/threads/3242/", "published_at": "2026-07-25 15:01:38+00:00", "updated_at": "2026-07-25 15:39:02.325002+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "ai-infrastructure", "ai-agents", "developer-tools"], "entities": ["DocMake", "MCP", "Claude", "Cursor"], "alternates": {"html": "https://wpnews.pro/news/docmake-my-experience-with-sandboxed-ai-code-execution", "markdown": "https://wpnews.pro/news/docmake-my-experience-with-sandboxed-ai-code-execution.md", "text": "https://wpnews.pro/news/docmake-my-experience-with-sandboxed-ai-code-execution.txt", "jsonld": "https://wpnews.pro/news/docmake-my-experience-with-sandboxed-ai-code-execution.jsonld"}}