Best Practices

This document includes a mix of cultural and technical best practices and guidelines for introducing AI agents into your organization.

Identify Use Cases

To successfully implement AI coding agents, identify 3-5 practical use cases where AI tools can deliver real value. Additionally, find a target group of developers and projects that are the best candidates for each specific use case.

Below are common scenarios where AI coding agents provide the most impact, along with the right tools for each use case:

ScenarioDescriptionExamplesTools
Automating actions in the IDESupplement tedious development with agentsSmall refactors, generating unit tests, writing inline documentation, code search and navigationIDE Agents in Workspaces
Developer-led investigation and setupDevelopers delegate research and initial implementation to AI, then take over in their preferred IDE to complete the workBug triage and analysis, exploring technical approaches, understanding legacy code, creating starter implementationsTasks, to a full IDE with Workspaces
Prototyping & Business ApplicationsUser-friendly interface for engineers and non-technical users to build and prototype within new or existing codebasesCreating dashboards, building simple web apps, data analysis workflows, proof-of-concept developmentTasks
Full background jobs & long-running agentsAgents that run independently without user interaction for extended periods of timeAutomated code reviews, scheduled data processing, continuous integration tasks, monitoring and alertingTasks API (in development)
External agents and chat clientsExternal AI agents and chat clients that need access to Coder workspaces for development environments and code sandboxingChatGPT, Claude Desktop, custom enterprise agents running tests, performing development tasks, code analysisMCP Server

Provide Agents with Proper Context

While LLMs are trained on general knowledge, it's important to provide additional context to help agents understand your codebase and organization.

Memory

Coding Agents like Claude Code often refer to a memory file in order to gain context about your repository or organization.

Look up the docs for the specific agent you're using to learn more about how to provide context to your agents.

Tools (Model Context Protocol)

Agents can also use tools, often via Model Context Protocol to look up information or perform actions. A common example would be fetching style guidelines from an internal wiki, or looking up the documentation for a service within your catalog.

Look up the docs for the specific agent you're using to learn more about how to provide tools to your agents.

Our Favorite MCP Servers

In internal testing, we have seen significant improvements in agent performance when these tools are added via MCP.

  • Playwright: Instruct your agent to open a browser, and check its work by viewing output and taking screenshots.
  • desktop-commander: Instruct your agent to run long-running tasks (e.g. npm run dev) in the background instead of blocking the main thread.

Security & Permissions

LLMs and agents can be dangerous if not run with proper boundaries. Be sure not to give agents full permissions on behalf of a user, and instead use separate identities with limited scope whenever interacting autonomously.

Learn more about securing agents with Coder Tasks

Keep it Simple

Today's LLMs and AI agents are not going to refactor entire codebases with production-grade code on their own! Using coding agents can be extremely fun and productive, but it is important to keep the scope of your use cases small and simple, and grow them over time.