티스토리 수익 글 보기
The post How to orchestrate agents using mission control appeared first on The GitHub Blog.
]]>We recently shipped Agent HQ’s mission control, a unified interface for managing GitHub Copilot coding agent tasks.
Now, you can now assign tasks to Copilot across repos, pick a custom agent, watch real‑time session logs, steer mid-run (pause, refine, or restart), and jump straight into the resulting pull requests—all in one place. Instead of bouncing between pages to see status, rationale, and changes, mission control centralizes assignment, oversight, and review.
Having the tool is one thing. Knowing how to use it effectively is another. This guide shows you how to orchestrate multiple agents, when to intervene, and how to review their work efficiently. Being great at orchestrating agents means unblocking parallel work in the same timeframe you’d spend on one task, stepping in when logs show drift, tests fail, or scope creeps.
The mental model shift
From sequential to parallel
If you’re already used to working with an agent one at a time, you know it’s inherently sequential. You submit a prompt, wait for a response, review it, make adjustments, and move to the next task.
Mission control changes this. You can kick off multiple tasks in minutes—across one repo or many. Previously, you’d navigate to different repos, open issues in each one, and assign Copilot separately. Now you can enter prompts in one place, and Copilot coding agent goes to work across all of them.
That being said, there is a trade-off to keep in mind: Instead of each task taking30 seconds to a few minutes to complete, your agents might spend a few minutes to an hour on a draft. But you’re no longer just waiting. You’re orchestrating.
When to stay sequential
Not everything belongs in parallel. Use sequential workflows when:
- Tasks have dependencies
- You’re exploring unfamiliar territory
- Complex problems require validating assumptions between steps
When assigning multiple tasks from the same repo, consider overlap. Agents working in parallel can create merge conflicts if they touch the same files. Be thoughtful about partitioning work.
Tasks that typically run well in parallel:
- Research work (finding feature flags, configuration options)
- Analysis (log analysis, performance profiling)
- Documentation generation
- Security reviews
- Work in different modules or components
Tips for getting started
The shift is simple: you move from waiting on a single run to overseeing multiple progressing in parallel, stepping in for failed tests, scope drift, or correcting unclear intent where guidance will save time.
Write clear prompts with context
Specificity matters. Describe the task precisely. Good context remains critical for good results.
Helpful context includes:
- Screenshots showing the problem
- Code snippets illustrating the pattern you want
- Links to relevant documentation or examples
Weak prompt: “Fix the authentication bug.”
Strong prompt: “Users report ‘Invalid token’ errors after 30 minutes of activity. JWT tokens are configured with 1-hour expiration in auth.config.js. Investigate why tokens expire early and fix the validation logic. Create the pull request in the api-gateway repo.”
Use custom agents for consistency
Mission control lets you select custom agents that use agents.md files from your selected repo. These files give your agent a persona and pre-written context, removing the burden of constantly providing the same examples or instructions.
If you manage repos where your team regularly uses agents, consider creating agents.md files tailored to your common workflows. This ensures consistency across tasks and reduces the cognitive load of crafting detailed prompts each time.
Once you’ve written your prompt and selected your custom agent (if applicable), kick off the task. Your agent gets to work immediately.
Tips for active orchestration
You’re now a conductor of agents. Each task might take a minute or an hour, depending on complexity. You have two choices: watch your agents work so you can intervene if needed, or step away and come back when they’re done.
Reading the signals
Below are some common indicators that your agent is not on the right track and needs additional guidance:
- Failing tests, integrations, or fetches: The agent can’t fetch dependencies, authentication fails, or unit tests break repeatedly.
- Unexpected files being created: Files outside the scope appear in the diff, or the agent modifies shared configuration.
- Scope creep beyond what you requested: The agent starts refactoring adjacent code or “improving” things you didn’t ask for.
- Misunderstanding your intent: The session log reveals the agent interpreted your prompt differently than you meant.
- Circular behavior: The agent tries the same failing approach multiple times without adjusting.
When you spot issues, evaluate their severity. Is that failing test critical? Does that integration point matter for this task? The session log typically shows intent before action, giving you a chance to intervene if you’re monitoring.
The art of steering
When you need to redirect an agent, be specific. Explain why you’re redirecting and how you want it to proceed.
Bad steering: “This doesn’t look right.”
Good steering: “Don’t modify database.js—that file is shared across services. Instead, add the connection pool configuration in api/config/db-pool.js. This keeps the change isolated to the API layer.”
Timing matters. Catch a problem five minutes in, and you might save an hour of ineffective work. Don’t wait until the agent finishes to provide feedback.
You can also stop an agent mid-task and give it refined instructions. Restarting with better direction is simple and often faster than letting a misaligned agent continue.
Why session logs matter
Session logs show reasoning, not just actions. They reveal misunderstandings before they become pull requests, and they improve your future prompts and orchestration practices. When Copilot says “I’m going to refactor the entire authentication system,” that’s your cue to steer.
Tips for the review phase
When your agents finish, you’ll have pull requests to review. Here’s how to do it efficiently. Ensure you review:
- Session logs: Understand what the agent did and why. Look for reasoning errors before they become merged code. Did the agent misinterpret your intent? Did it assume something incorrectly?
- Files changed: Review the actual code changes. Focus on:
- Files you didn’t expect to see modified
- Changes that touch shared, risky, or critical code paths
- Patterns that don’t match your team’s standards/practices
- Missing edge case handling
- Checks: Verify that tests pass (your unit tests, Playwright, CI/CD, etc.). When checks fail, don’t just restart the agent. Investigate why. A failing test might reveal the agent misunderstood requirements, not just wrote buggy code.
This pattern gives you the full picture: intent, implementation, and validation.
Ask Copilot to review its own work
After an agent completes a task, ask it:
- “What edge cases am I missing?”
- “What test coverage is incomplete?”
- “How should I fix this failing test?”
Copilot can often identify gaps in its own work, saving you time and improving the final result. Treat it like a junior developer who’s willing to explain their reasoning.
Batch similar reviews
Generating code with agents is straightforward. Reviewing that code—ensuring it meets your standards, does what you want, and that it can be maintained by your team—still requires human judgment.
Improve your review process by grouping similar work together. Review all API changes in one session. Review all documentation changes in another. Your brain context-switches less, and you’ll spot patterns and inconsistencies more easily.
What’s changed for the better
Mission control moves you from babysitting single agent runs to orchestrating a small fleet. You define clear, scoped tasks. You supply just enough context. You launch several agents. The speed gain is not that each task finishes faster; it’s that you unblock more work in the same timeframe.
What makes this possible is discipline: specific prompts, not vague requests. Custom agents in agents.md that carry your patterns so you don’t repeat yourself. Early steering when session logs show drift. Treating logs as reasoning artifacts you mine to write a sharper next prompt. And batching reviews so your brain stays in one mental model long enough to spot subtle inconsistencies. Lead your own team of agents to create something great!
Ready to start? Visit mission control or learn more about GitHub Copilot for your organization.
The post How to orchestrate agents using mission control appeared first on The GitHub Blog.
]]>The post How to write a great agents.md: Lessons from over 2,500 repositories appeared first on The GitHub Blog.
]]>We recently released a new GitHub Copilot feature: custom agents defined in agents.md files. Instead of one general assistant, you can now build a team of specialists: a @docs-agent for technical writing, a @test-agent for quality assurance, and a @security-agent for security analysis. Each agents.md file acts as an agent persona, which you define with frontmatter and custom instructions.
agents.md is where you define all the specifics: the agent’s persona, the exact tech stack it should know, the project’s file structure, workflows, and the explicit commands it can run. It’s also where you provide code style examples and, most importantly, set clear boundaries of what not to do.
The challenge? Most agent files fail because they’re too vague. “You are a helpful coding assistant” doesn’t work. “You are a test engineer who writes tests for React components, follows these examples, and never modifies source code” does.
I analyzed over 2,500 agents.md files across public repos to understand how developers were using agents.md files. The analysis showed a clear pattern of what works: provide your agent a specific job or persona, exact commands to run, well-defined boundaries to follow, and clear examples of good output for the agent to follow.
Here’s what the successful ones do differently.
What works in practice: Lessons from 2,500+ repos
My analysis of over 2,500 agents.md files revealed a clear divide between the ones that fail and the ones that work. The successful agents aren’t just vague helpers; they are specialists. Here’s what the best-performing files do differently:
- Put commands early: Put relevant executable commands in an early section:
npm test,npm run build,pytest -v. Include flags and options, not just tool names. Your agent will reference these often. - Code examples over explanations: One real code snippet showing your style beats three paragraphs describing it. Show what good output looks like.
- Set clear boundaries: Tell AI what it should never touch (e.g., secrets, vendor directories, production configs, or specific folders). “Never commit secrets” was the most common helpful constraint.
- Be specific about your stack: Say “React 18 with TypeScript, Vite, and Tailwind CSS” not “React project.” Include versions and key dependencies.
- Cover six core areas: Hitting these areas puts you in the top tier: commands, testing, project structure, code style, git workflow, and boundaries.
Example of a great agent.md file
Below is an example for adding a documentation agent.md persona in your repo to .github/agents/docs-agent.md:
---
name: docs_agent
description: Expert technical writer for this project
---
You are an expert technical writer for this project.
## Your role
- You are fluent in Markdown and can read TypeScript code
- You write for a developer audience, focusing on clarity and practical examples
- Your task: read code from `src/` and generate or update documentation in `docs/`
## Project knowledge
- **Tech Stack:** React 18, TypeScript, Vite, Tailwind CSS
- **File Structure:**
- `src/` – Application source code (you READ from here)
- `docs/` – All documentation (you WRITE to here)
- `tests/` – Unit, Integration, and Playwright tests
## Commands you can use
Build docs: `npm run docs:build` (checks for broken links)
Lint markdown: `npx markdownlint docs/` (validates your work)
## Documentation practices
Be concise, specific, and value dense
Write so that a new developer to this codebase can understand your writing, don’t assume your audience are experts in the topic/area you are writing about.
## Boundaries
- ✅ **Always do:** Write new files to `docs/`, follow the style examples, run markdownlint
- ⚠️ **Ask first:** Before modifying existing documents in a major way
- 🚫 **Never do:** Modify code in `src/`, edit config files, commit secrets
Why this agent.md file works well
- States a clear role: Defines who the agent is (expert technical writer), what skills it has (Markdown, TypeScript), and what it does (read code, write docs).
- Executable commands: Gives AI tools it can run (
npm run docs:buildandnpx markdownlint docs/). Commands come first. - Project knowledge: Specifies tech stack with versions (React 18, TypeScript, Vite, Tailwind CSS) and exact file locations.
- Real examples: Shows what good output looks like with actual code. No abstract descriptions.
- Three-tier boundaries: Set clear rules using always do, ask first, never do. Prevents destructive mistakes.
How to build your first agent
Pick one simple task. Don’t build a “general helper.” Pick something specific like:
- Writing function documentation
- Adding unit tests
- Fixing linting errors
Start minimal—you only need three things:
- Agent name:
test-agent,docs-agent,lint-agent - Description: “Writes unit tests for TypeScript functions”
- Persona: “You are a quality software engineer who writes comprehensive tests”
Copilot can also help generate one for you. Using your preferred IDE, open a new file at .github/agents/test-agent.md and use this prompt:
Create a test agent for this repository. It should:
- Have the persona of a QA software engineer.
- Write tests for this codebase
- Run tests and analyzes results
- Write to “/tests/” directory only
- Never modify source code or remove failing tests
- Include specific examples of good test structure
Copilot will generate a complete agent.md file with persona, commands, and boundaries based on your codebase. Review it, add in YAML frontmatter, adjust the commands for your project, and you’re ready to use @test-agent.
Six agents worth building
Consider asking Copilot to help generate agent.md files for the below agents. I’ve included examples with each of the agents, which should be changed to match the reality of your project.
@docs-agent
One of your early agents should write documentation. It reads your code and generates API docs, function references, and tutorials. Give it commands like npm run docs:build and markdownlint docs/ so it can validate its own work. Tell it to write to docs/ and never touch src/.
- What it does: Turns code comments and function signatures into Markdown documentation
- Example commands:
npm run docs:build,markdownlint docs/ - Example boundaries: Write to
docs/, never modify source code
@test-agent
This one writes tests. Point it at your test framework (Jest, PyTest, Playwright) and give it the command to run tests. The boundary here is critical: it can write to tests but should never remove a test because it is failing and cannot be fixed by the agent.
- What it does: Writes unit tests, integration tests, and edge case coverage
- Example commands:
npm test,pytest -v,cargo test --coverage - Example boundaries: Write to
tests/, never remove failing tests unless authorized by user
@lint-agent
A fairly safe agent to create early on. It fixes code style and formatting but shouldn’t change logic. Give it commands that let it auto-fix style issues. This one’s low-risk because linters are designed to be safe.
- What it does: Formats code, fixes import order, enforces naming conventions
- Example commands:
npm run lint --fix,prettier --write - Example boundaries: Only fix style, never change code logic
@api-agent
This agent builds API endpoints. It needs to know your framework (Express, FastAPI, Rails) and where routes live. Give it commands to start the dev server and test endpoints. The key boundary: it can modify API routes but must ask before touching database schemas.
- What it does: Creates REST endpoints, GraphQL resolvers, error handlers
- Example commands:
npm run dev,curl localhost:3000/api,pytest tests/api/ - Example boundaries: Modify routes, ask before schema changes
@dev-deploy-agent
Handles builds and deployments to your local dev environment. Keep it locked down: only deploy to dev environments and require explicit approval. Give it build commands and deployment tools but make the boundaries very clear.
- What it does: Runs local or dev builds, creates Docker images
- Example commands:
npm run test - Example boundaries: Only deploy to dev, require user approval for anything with risk
Starter template
---
name: your-agent-name
description: [One-sentence description of what this agent does]
---
You are an expert [technical writer/test engineer/security analyst] for this project.
## Persona
- You specialize in [writing documentation/creating tests/analyzing logs/building APIs]
- You understand [the codebase/test patterns/security risks] and translate that into [clear docs/comprehensive tests/actionable insights]
- Your output: [API documentation/unit tests/security reports] that [developers can understand/catch bugs early/prevent incidents]
## Project knowledge
- **Tech Stack:** [your technologies with versions]
- **File Structure:**
- `src/` – [what's here]
- `tests/` – [what's here]
## Tools you can use
- **Build:** `npm run build` (compiles TypeScript, outputs to dist/)
- **Test:** `npm test` (runs Jest, must pass before commits)
- **Lint:** `npm run lint --fix` (auto-fixes ESLint errors)
## Standards
Follow these rules for all code you write:
**Naming conventions:**
- Functions: camelCase (`getUserData`, `calculateTotal`)
- Classes: PascalCase (`UserService`, `DataController`)
- Constants: UPPER_SNAKE_CASE (`API_KEY`, `MAX_RETRIES`)
**Code style example:**
```typescript
// ✅ Good - descriptive names, proper error handling
async function fetchUserById(id: string): Promise<User> {
if (!id) throw new Error('User ID required');
const response = await api.get(`/users/${id}`);
return response.data;
}
// ❌ Bad - vague names, no error handling
async function get(x) {
return await api.get('/users/' + x).data;
}
Boundaries
- ✅ **Always:** Write to `src/` and `tests/`, run tests before commits, follow naming conventions
- ⚠️ **Ask first:** Database schema changes, adding dependencies, modifying CI/CD config
- 🚫 **Never:** Commit secrets or API keys, edit `node_modules/` or `vendor/`
Key takeaways
Building an effective custom agent isn’t about writing a vague prompt; it’s about providing a specific persona and clear instructions.
My analysis of over 2,500 agents.md files shows that the best agents are given a clear persona and, most importantly, a detailed operating manual. This manual must include executable commands, concrete code examples for styling, explicit boundaries (like files to never touch), and specifics about your tech stack.
When creating your own agents.md cover the six core areas: Commands, testing, project structure, code style, git workflow, and boundaries. Start simple. Test it. Add detail when your agent makes mistakes. The best agent files grow through iteration, not upfront planning.
Now go forth and build your own custom agents to see how they level up your workflow first-hand!
The post How to write a great agents.md: Lessons from over 2,500 repositories appeared first on The GitHub Blog.
]]>The post How Copilot helps build the GitHub platform appeared first on The GitHub Blog.
]]>As engineers at GitHub, “dogfooding” is core to our culture. We build GitHub on GitHub, using the same tools we ship to developers. But as GitHub Copilot has evolved from an autocomplete suggestion to a sophisticated AI assistant, our own use of it has evolved, too.
It’s no longer just a tool in our editors. We’ve integrated Copilot directly into our development lifecycle.
Inside our core repository, the one we use to build github.com, @Copilot isn’t just suggesting code; it’s an active contributor. It gets assigned issues by human engineers, opens pull requests, and does the work assigned.
Copilot is a prolific engineer within GitHub, and it’s taking on some of our most time-consuming and tedious tasks. For this article, we analyzed a month of pull requests created within our core repo by Copilot. Here’s what we found.
Copilot does simple work that saves time
Before we get to the complex, architectural work, it’s worth noting how much of Copilot’s day-to-day work is about accelerating the small tasks that add up. These are the quick fixes that save engineers from constant context-switching.
- UI and copy tweaks: It gets tasked with fixing minor UI bugs, like realigning a misaligned icon, or updating placeholder text in a filter bar to be more accurate.
- Documentation and cleanup: It also handles straightforward cleanup. In one pull request,
@Copilotwas assigned to fix 161 typos in comments and documentation strings across 100 different files. It’s a simple task, but one that no human engineer wants to spend an afternoon doing.
Critical cleanup and maintenance
A healthy codebase requires constant care. This is where @Copilot shines. A significant portion of the pull requests were focused on code maintenance, modernization, and large-scale refactors that would have been time-consuming for human engineers, including:
- Removing feature flags: This is a huge one.
@Copilotis constantly assigned to clean up deprecated feature flags, removing the conditional logic, stale code, and old tests across the entire codebase. - Large-scale refactoring: When we need to rename a class used across the application,
@Copilotcan take it on. It’s even authored massive, repository-wide pull requests to rename core internal classes, a task that would be tedious and time-consuming for any developer. - Performance optimization: It finds and fixes common performance anti-patterns, replacing inefficient code with more optimized alternatives in high-traffic areas.
Fixing bugs and flaky tests
@Copilot also helped us solve a number of bugs. It’s patched production issues and improved the stability of our CI/CD pipeline.
- Production errors: It’s not just fixing simple bugs; it’s resolving tricky
NoMethodErrorissues in core logic and even fixing complex error masking issues in our caching infrastructure. - Performance bottlenecks: One of its most impactful contributions was a pull request that fixed a severe performance issue where git push was taking ~15 minutes for engineers in Codespaces.
- Fixing flaky tests: We all know the pain of a test breaking a build.
@Copilotwas regularly assigned to investigate and fix them.
Building new features
This is where it gets really interesting. @Copilot isn’t just maintaining old code; it’s actively building new functionality. Human engineers spec out the work in an issue, assign it to @Copilot, and it gets to work.
It’s adding:
- New API endpoints: One pull request added a new REST API endpoint to list repository security advisory comments.
- New internal tools: It’s not just adding production features. Copilot has been extensively used to improve our internal tools. Our internal intranet, training sites, onboarding, etc. All of these have been maintained significantly by Copilot.
Migrations and security
Beyond daily tasks, we’re also assigning @Copilot to high-stakes, complex projects that are critical for the platform’s future.
- Security gating:
@Copilothas been tasked with adding security gates to prevent our own internal integrations from performing sensitive actions, such as modifying releases or release assets. - Database migrations: It’s even handling database schema migrations. We’ve assigned it critical, high-precision tasks like migrating column types to support new standards.
- Documentation creation: It’s used to keep documentation in sync with fast-moving code. For example, it has authored numerous pull requests to add comments to our rate-limiting code to ensure developers easily remember to keep it synchronized with another service.
Codebase-wide audits and analysis: Discerning problems, then solving them
In some of its most advanced tasks, @Copilot acts as a researcher. We can assign it an ambiguous task, and it will analyze the codebase and report back with its findings in a pull request.
In one pull request, it was tasked with auditing all our Codespaces feature flags. It returned a pull request with a comprehensive report categorizing all the flags and their references throughout the code.
In another, it performed a “comprehensive analysis of authorization queries” to identify opportunities for performance and safety improvements. This moves Copilot’s role from code generation to systems-level architectural analysis, helping developers to jump straight to solving a complex problem rather than spending days just identifying it.
A new way to collaborate
If you check Copilot’s merged pull request rate in your repo, you’ll notice it’s lower than human contributors. That’s expected—and useful.
Here’s the pattern we discovered:
- You assign
@Copilotan issue - It opens a pull request with a first-pass solution
- You review it like any other pull request
- Then you choose to merge it, iterate on the branch, or close it and take a different approach.
The value isn’t in blindly merging. It’s in not starting from zero. You’ll get a concrete implementation to critique right away. All the boilerplate and the basic scaffolding is already handled.
This shifts our focus away from writing all the code. Instead, you get to jump straight to the most critical parts of engineering: solving the core problem, refining Copilot’s suggestions, working in areas of the codebase not fit for AI, and owning the architecture, security, and user experience. It’s not about automating our jobs; it’s about letting Copilot handle the tedious 80% of the work. This frees us up to dedicate our expertise to the critical 20% that truly matters.
Start using GitHub Copilot >
The post How Copilot helps build the GitHub platform appeared first on The GitHub Blog.
]]>