Replicating Cursor's Agent Mode with E2B and AgentKit
e2b.devThis is helpful, some clarity now how Cursor's Agent mode works under the hood. Also big plus for "LLM empathy". Going to try your approach for our own project.
Have you noticed the agent getting stuck in any particular spots when building more complex projects?
Yup, I definitely faced multiple loops or "blocked" scenarios when iterating on the prompt and tools. The most obvious one is when the Agent generates a terminal command that requires some interactivity (ex: "confirm to ..."). This causes the Agent to build all files from scratch adding a 5x more steps than necessary.
I'm planning to try to make terminal STDIO work as a "human in the loop" pattern or even better as an "Agent in the loop" one.
The local Cursor? Great move avay from monopoly!
Can it also do a search through documentation? Cursor agent can do that.
Not the version featured in the blog post, but adding a MCP server like Stagehand could enable it to search on the web!
How does it compare to Claude Code?
Claude Code is a complete tool that is ready to be used locally, focusing on Anthropic API features, while this coding agent is for educational purposes (like OpenAI's Swarm) and works with any LLM provider. Thought this Coding Agent could also be used in a real setting as a Pull Request or GitHub Coding Agent!
Can I also do it in Python?
E2B does support Python, AgentKit is only available in TypeScript for now
Can't wait to test in python if possible at some point !
Super dopeee!!!