{"id":26566672,"url":"https://github.com/mkrl/e0","last_synced_at":"2026-05-11T02:25:52.990Z","repository":{"id":281828729,"uuid":"946321697","full_name":"mkrl/e0","owner":"mkrl","description":"A simple Next.js app for generating more apps. Powered by Vercel AI SDK and E2B.","archived":false,"fork":false,"pushed_at":"2025-03-11T11:26:44.000Z","size":964,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T11:32:10.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://e0-bay.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-11T00:42:38.000Z","updated_at":"2025-03-11T11:26:48.000Z","dependencies_parsed_at":"2025-03-11T11:43:04.258Z","dependency_job_id":null,"html_url":"https://github.com/mkrl/e0","commit_stats":null,"previous_names":["mkrl/e0"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrl%2Fe0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrl%2Fe0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrl%2Fe0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrl%2Fe0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkrl","download_url":"https://codeload.github.com/mkrl/e0/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245005641,"owners_count":20546042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-22T18:38:45.196Z","updated_at":"2026-05-11T02:25:52.926Z","avatar_url":"https://github.com/mkrl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ee0\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eA simple open-source AI agent that can generate and deploy an app in seconds.\n\u003c/p\u003e\n\n![A chat screenshot showcasing an agent building a card flipping game](./preview.png)\n\n## Featuring\n\n- Next.js 15\n- Vercel AI SDK 4.1.54:\n  - OpenAI `gpt-4o-mini` for code generation ([add your own model](#customize-the-model))\n  - Code streaming (based on the latest `toolCallStreaming`)\n- Fast and secure code interpretation via [E2B SDK](https://github.com/e2b-dev/code-interpreter) by [E2B](https://e2b.dev)\n- A set of pre-built tools for your agent to use ([add your own](#add-your-own-tools))\n- Monaco editor for multi-file code preview\n\n## Install locally\n\n### Prerequisites\n\ngit, Node.js 16+, pnpm\n\n### Getting started\n\nClone the repository:\n\n```bash\ngit clone git@github.com:mkrl/e0.git\n```\n\nObtain API keys from OpenAI and E2B Dashboard.\n\nSet the required environment variables as shown in the `.env.example` file, but in a new file called `.env`.\n\nInstall dependencies:\n\n```bash\npnpm install\n```\n\nLaunch the development server:\n\n```bash\npnpm run dev\n```\n\n## Customize the model\n\nThanks to the Vercel AI SDK, you can hot-swap the [underlying model](https://sdk.vercel.ai/docs/foundations/providers-and-models) for code generation.\n\nYou can pick just about anything that is capable of \"Tool Usage\" [here](https://sdk.vercel.ai/docs/foundations/providers-and-models#model-capabilities).\n\n1. Obtain an API key (if that's something different from the default OpenAI provider)\n2. Set an environment variable for your new model in the `.env` file\n3. Go to `app/api/chat/route.ts` and change the `model` variable to your new model\n\n## Tool Calling\n\nThe chatbot follows an agentic approach: an LLM is given a set of tools and instructions on how to operate on a remote server.\n\nThe following tools are available:\n\n- Create a sandbox server\n- Generate and deploy a file at a particular path\n- Install a package\n\nYou can find the tools in the `tools` directory, connected to the `streamText` call in `app/api/chat/route.ts`\n\nAll the tool calls are streamed in to the client in order to deliver fast intermediate results.\n\n### Add your own tools\n\n1. Think of a good idea! Generate an image and deploy it to the sandbox? Check weather in NY to make sure it's not raining when generating code?\n2. Create a new file in the `tools` directory by copying the contents of any other tool file\n3. Give your tool a good description and a set of arguments. If you want to execute something in a sandbox be sure to include the `sandboxId` parameter\n4. Add your tool to the `tools` object in `app/api/chat/route.ts`\n5. Add your tool name to `types/tools.ts`\n6. Give it some visual appearance in the chat by extending `components/ui/ToolCall.tsx`. You can add a custom icon and messages for all the possible states of the tool call.\n\n### Tweaking the prompt\n\nYou can find a full system prompt in `app/api/chat/route.ts`. \n\nWhen adding new tools sometimes it is a good idea to give some instructions to the LLM on when to use it. For example, if you only want to generate code when it is not raining in NY, you may want to specify this in a system prompt.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrl%2Fe0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkrl%2Fe0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrl%2Fe0/lists"}