Open source coding agents can inspect a repository, edit files, and run commands to complete development tasks. The right choice depends on how you work: an editor for interactive changes, a CLI for repeatable jobs, or an SDK for building your own service. Vercel AI Gateway connects these agents to hosted models with shared usage tracking and routing.
Start with the task you want to hand over. Fixing a failing test has a clear acceptance check; migrating an application requires broader context and review. The same agent may handle both with different instructions and checks.
The eight agents below offer different starting points, organized by workflow. fx is a Vercel Labs project and is currently experimental.
Copy link to headingCompare agents by the work you need done
The licenses below apply to the named open source repositories. Hosted services, model access, and separately distributed components can have their own terms.
These are starting points for evaluation, not exclusive capabilities. Several agents support the same tasks. Their interaction model and integration effort can decide which one your team uses consistently.
Copy link to headingFind an agent that fits your workflow
Copy link to heading1. OpenCode for development across model providers
OpenCode is an MIT-licensed agent with a terminal interface and desktop app. Its built-in Plan agent supports code exploration before you switch to Build for implementation. Connect Vercel AI Gateway to select models within OpenCode.
Consider adding a webhook endpoint to a Next.js application. Start by asking OpenCode to locate the existing authentication and request-validation patterns.
Review the proposed approach, then ask it to implement signature verification and tests for invalid signatures or duplicate events. The useful handoff is a diff with passing tests and an explanation of how retries behave.
OpenCode also has opencode run for scripts. In version 2, local clients normally share a background server; --standalone gives a run its own server. Pin the version in automation and use the matching configuration reference, because version 1 and version 2 have different settings.
For larger features, combine OpenCode, AI Gateway, and agent-browser to implement changes and inspect the running application.
Copy link to heading2. fx for scripts and embedded agents
fx is an Apache-2.0 coding agent from Vercel Labs, distributed as a native binary. Its conversation stays in terminal scrollback, and fx ask runs a single request without opening an interactive session. For application developers, libfx exposes the agent core as a JavaScript library.
Start with a documentation review of an API change. Give fx the relevant diff and ask it to identify stale examples before authorizing edits. You can add this bounded review to an existing development script.
Install fx and connect a provider, then run this in a Git repo with local changes:
fx ask --json \ "Inspect the current git diff and compare it with the repository's API docs.List outdated examples and affected files. Do not edit files." \ > docs-review.jsonfx ask --json returns a JSON object with fields such as final_output, exit_code, and tool_calls. Check the process exit status before consuming the result. The instruction to avoid edits expresses the task's scope; use permission rules when you need to enforce it.
fx is experimental, with releases that can change commands and saved-data formats. Pin a tested release for automation. Its default auto mode permits routine development actions and uses model review for other actions, so choose permissions deliberately before running it unattended.
Copy link to heading3. Cline for interactive changes in your editor
Cline provides a VS Code extension, CLI, and SDK backed by a shared agent engine. Plan mode lets you inspect an approach before Act mode changes files. In the editor, you can review diffs and use checkpoints to revisit earlier work.
This fits frontend work with several visible states. Ask Cline to add empty, loading, and error states to a dashboard using existing application components.
Review the proposed component changes, let it implement them, and inspect the result at narrow and wide viewport sizes. Include a failing API response in the acceptance criteria so the error state gets exercised.
The CLI and SDK provide a path to automate work after you've established useful project instructions. Review each interface's approval settings as you move a task out of the editor; an interactive approval habit doesn't configure an unattended job.
Cline has a native AI Gateway provider. Select it in the extension's settings, add a Gateway key, and choose a model from the catalog. Its open source repository excludes the separately distributed JetBrains plugin.
Copy link to heading4. Codex CLI for automated jobs with inspectable output
Codex CLI is OpenAI's Apache-2.0 terminal coding agent. Its codex exec interface supports noninteractive runs, JSON Lines events, and a separate file for the final response. Workers can retain the execution history alongside the task summary.
Use Codex to repair a reproducible regression. Check out the failing commit in an isolated worker, install dependencies, and supply the exact test command. This npm example targets a test named pagination:
codex exec --sandbox workspace-write \ --json --output-last-message repair-summary.md \ "Run npm test -- --runInBand pagination.Fix the regression without weakening the tests.Rerun the same test and summarize the change." \ > repair-events.jsonlReplace the test command with one your repository supports. Run an independent verification step after Codex finishes and collect the patch for review. Successful agent execution alone doesn't establish that the application is correct.
codex exec defaults to a read-only sandbox; the example explicitly enables workspace writes. For AI Gateway integration, use the Codex compatibility endpoint and Responses API configuration. The generic Chat Completions URL isn't interchangeable with that setup.
Copy link to heading5. OpenHands for a self-hosted agent service
OpenHands combines Agent Canvas, a control interface for agent sessions, with an Agent Server and Software Agent SDK. Both the Canvas and SDK repositories use MIT licenses. You can run agents against local or remote workspaces and build your own application around the SDK.
Consider OpenHands for a platform team's coding-agent service. The service would manage repository access, scheduling, and review.
For a dependency migration, that service could accept a repository and target version, create an isolated workspace, and ask the agent to update affected imports. It would return a patch with test results.
Choose the execution backend explicitly. Agent Canvas can run directly on the host or use Docker and remote backends. Set OH_CONVERSATION_RUNTIME=docker to create a container for each new conversation.
Conversations that mount the same host workspace still share its files. Give concurrent tasks separate directories or Git worktrees to keep their changes apart.
For occasional edits, start with a local CLI instead of a shared service.
Copy link to heading6. goose for repeatable development recipes
goose is an Apache-2.0 agent with desktop, CLI, and API interfaces. It connects to multiple model providers and uses the Model Context Protocol, or MCP, to access additional tools. Its recipes bundle prompts, extensions, and settings for reuse.
For release preparation, a recipe could accept a previous release tag, inspect subsequent changes, and draft release notes grouped by user-visible behavior. With an appropriate issue-tracker MCP server, it could also compare the notes with linked issues and identify undocumented changes.
Keep publishing as a separate action. The recipe's deliverable can be a Markdown draft and a list of unresolved questions for the release owner. This gives the team a repeatable starting point while preserving review of claims about shipped behavior.
Choose goose for workflows you need to package and share. Audit each recipe's extensions because they determine which systems it can reach. Reading Git history requires less access than creating releases or updating tickets.
Copy link to heading7. Kilo Code for teams using different editors
Kilo Code provides MIT-licensed clients for VS Code, JetBrains, and the terminal. Its built-in Code, Plan, Ask, and Debug agents support implementation, investigation, and planning. Teams can also define custom agents for other roles.
Consider a team changing an API response used by a React frontend and a Java service. Developers can use Kilo in their preferred environments to inspect the contract, update the affected code, and add tests on each side.
Give the team a shared task brief with the new response shape and compatibility requirements so both changes target the same behavior.
Kilo also supports kilo run for scripts. Its --auto flag approves permission prompts unless a rule explicitly denies the action, so treat that flag as an execution choice when moving a workflow into CI.
Evaluate the particular clients your team will use. Being part of the same project doesn't establish identical behavior across every interface. Keep hosted cloud features separate from your review of the open source clients, and test the agent configuration you intend to deploy.
Copy link to heading8. Qwen Code for Qwen and alternative model setups
Qwen Code is an Apache-2.0 coding agent with a terminal interface, editor integrations, and SDKs. It supports interactive development as well as qwen -p for noninteractive tasks. Configure authentication for your chosen provider.
Evaluate Qwen Code by adding regression tests to an existing parser. Ask the agent to inspect the test conventions, identify an uncovered boundary case, and add a test before changing the implementation.
Run that task with your intended Qwen model and another configured model. Check whether both produce valid tool calls and follow the repository's conventions. Benchmark results alone don't establish whether either configuration will preserve your public API or use the test runner correctly.
Use Qwen Code when its development workflow fits a model setup you want to operate. Treat the agent license and the selected model's terms as separate decisions, particularly when evaluating models you host yourself.
Copy link to headingConnect your coding agents to AI Gateway
AI Gateway routes hosted inference through one service while developers keep their preferred agents. Teams can inspect usage in a shared dashboard and configure routing without distributing separate keys for each model provider.
The Vercel CLI supports all eight agents in this comparison. After installing the agents you want to use, preview configuration changes for a subset:
pnpm dlx vercel@latest ai-gateway setup \ --agent opencode --agent fx --agent codex --dry-runThen apply that setup:
pnpm dlx vercel@latest ai-gateway setup \ --agent opencode --agent fx --agent codexThe setup command provisions or reuses a key, updates agent configuration, and backs up changed files. Open a new terminal after setup so the agents can read the credentials from your shell environment.
To configure another client, pass its name after --agent: cline, openhands, goose, kilo, or qwen. Without that flag, setup detects supported installations.
For Cline, --agent cline configures the CLI. Connect its VS Code extension through the extension's AI Gateway provider settings.
For an interactive fx session, you can also sign in directly with a Vercel account:
fx login vercelfxUse /model to choose a model and /status to check the active provider and credential source. Run a small repository task, then confirm its requests appear in the intended team's AI Gateway dashboard. Check this before comparing costs across agents, especially on machines with existing subscription credentials.
Copy link to headingShare routing through a virtual model
Give your team's coding agents a shared model ID such as vmc/code-review. Virtual models associate that ID with a model and routing configuration, so you can update the selection without editing every developer's agent settings.
For example, create a virtual model for code review, choose its underlying model, and select it in agents connected to Gateway. Configure fallback models only after testing that they handle the agent's tools and expected output.
Provider Order and Provider Only have different effects. Order expresses a preference and permits other providers as fallbacks. Provider Only restricts the eligible providers; requests fail when none of them can serve the request. Use the restriction when the provider itself is a requirement.
Gateway handles inference requests. Each agent owns its tools and execution loop, while the runtime controls file and network access. Gateway routing doesn't sandbox commands or establish a model's suitability for the task.
Copy link to headingRun and review agent work on Vercel
Production coding workflows need a clear handoff between generating a change and accepting it. For a dependency update, provide the patch, the selected dependency version, test output, and a working preview for reviewers to inspect.
Copy link to headingGive each job an isolated workspace
Vercel Sandbox runs code in Firecracker microVMs. Use a separate sandbox for each concurrent job, check out the intended commit, and install the dependencies required by that repository. Keep production credentials out of a task that only needs source code and tests.
Define the acceptance check before invoking the agent. For a dependency update, require the lockfile change, the relevant tests, and a build.
Set a maximum job duration and a retry limit in the worker that launches the agent. Permission settings decide which actions the agent may attempt; the execution environment limits the resources those actions can reach.
Copy link to headingReview the application in a preview deployment
Once independent checks pass, open a pull request with the agent's change. For an existing Vercel project with its Git integration and deployment settings configured, a branch can produce a preview deployment. Use Preview environment variables and test accounts for review.
For UI changes, add a browser check. agent-browser is a Vercel Labs tool that a coding agent can call through the shell to inspect a page and interact with elements from an accessibility snapshot. After installing agent-browser and providing access to the preview:
# Set PREVIEW_URL to the deployment URL for this change.agent-browser open "$PREVIEW_URL"agent-browser snapshot -iagent-browser screenshot preview.pngagent-browser closeThese commands capture an initial view. To check behavior, the agent also needs to complete the relevant interaction and inspect its result.
For the dashboard example, verify that a failed request displays the intended error message and that retrying loads the data. Keep automated assertions for behavior that must pass with each change.
When a preview fails to build, Vercel MCP can give a connected agent deployment details and logs. Ask it to identify the cause and propose a correction. Available tools depend on the OAuth grant and team permissions.
Copy link to headingPersist progress for longer jobs
If you're building a coding-agent service, decide which workspace files, task state, and completed checks must survive a worker restart. Saving the agent's final message won't preserve that state.
Vercel's custom generation-and-test loop combines Workflows, Sandbox, and AI Gateway. To use this approach with an existing CLI, integrate that agent's session and execution interfaces. Establish one reproducible task before adding concurrent workers or retrying long-running migrations.
Copy link to headingWhat should you verify before choosing an agent?
Compare agents on the same repository tasks with the same acceptance criteria. Use a bug with a reproducer, a change that crosses several files, and a task that requires inspecting the running application.
Record independent check results, review effort, elapsed time, and total inference cost across retries. Track the model and agent version separately so you can see which configuration produced each result.
An open source license covers the code distributed under it. Hosted inference, compute, and commercial features can have separate terms and costs. Check each repository's terms and the work needed to operate its components.
For unattended jobs, pin the agent version and retain a small set of representative tasks to rerun before upgrading. Review changes to permissions, configuration, and output formats alongside the release notes. That gives you evidence that an update preserves the workflow you've already tested.
Local inference needs a separate assessment. Using a local model can remove the hosted model request, but the agent may still use web search, MCP servers, package registries, or telemetry. For an offline environment, audit those connections and prepare the required dependencies before running the task.
Choose an interface that fits how the work arrives. Interactive editor tasks need controls that let developers inspect and steer changes.
Scheduled jobs need exit handling and saved artifacts, while a shared service also needs workspace isolation and recovery. Expand access after reviewers can assess the changes produced by that first workflow.
Copy link to headingFrequently asked questions
Copy link to headingWhat is the best open source coding agent?
There is no single best agent for every development workflow. OpenCode and Cline are candidates for interactive development, fx and Codex CLI expose scripting interfaces, and OpenHands provides components for a self-hosted service. Evaluate a shortlist on your own repositories with the same tests and review criteria.
Copy link to headingAre open source coding agents free to use?
An open source agent's license permits use under its terms, but running it can still incur costs. Hosted model requests, execution infrastructure, and optional commercial services are separate from the agent's source license. Compare the cost of a completed, reviewed task, including retries.
Copy link to headingCan these agents use Vercel AI Gateway?
Yes. The Vercel CLI includes setup integrations for all eight agents in this comparison. Select the intended agent and model, verify that requests reach the correct Gateway team, and test the tool-calling behavior your workflow requires.
Copy link to headingDoes AI Gateway isolate the code an agent runs?
No. AI Gateway routes model requests and provides inference observability and configuration. Run agent commands in an appropriately restricted environment, such as Vercel Sandbox, and configure permissions and credentials for the task.
Copy link to headingCan an open source coding agent run entirely offline?
Some configurations can use local models, but local inference alone doesn't establish offline operation. The agent's tools and dependencies must also work without external services. Test the full workflow with network access disabled before relying on it in an offline environment.