AI Model Wiki

    Skip to main content
    6 min read
    Lesson 5 of 6

    Copilot Workspace & Agent Mode

    From the course GitHub Copilot Mastery

    Copilot Workspace and Agent Mode represent the future of AI-assisted development — autonomous coding agents that can handle complex, multi-file tasks.

    Copilot Workspace

    Copilot Workspace is a cloud-based development environment that tackles entire tasks:

    1. Start from an issue — Link a GitHub issue or describe a task
    2. AI creates a plan — Copilot analyzes your repo and proposes which files to create/modify
    3. Review the plan — Edit the plan before Copilot starts coding
    4. AI implements — Copilot writes the code across multiple files
    5. Review and iterate — Check the changes, ask for modifications
    6. Create a PR — Push the changes as a pull request

    Agent Mode (VS Code)

    Agent Mode in VS Code Copilot Chat can autonomously:

    • Edit multiple files in your project
    • Run terminal commands
    • Read and analyze terminal output
    • Install dependencies
    • Run tests and fix failures
    • Iterate until the task is complete

    Example: "@workspace Create a REST API endpoint for user registration with email validation, password hashing, and a corresponding unit test"

    Agent Mode will:

    1. Create the route handler
    2. Add validation logic
    3. Implement password hashing
    4. Write unit tests
    5. Run the tests
    6. Fix any failures

    Copilot CLI

    Use Copilot in the terminal:

    # Explain a command
    gh copilot explain "find . -name '*.ts' -exec grep -l 'useState' {} \;"
    
    # Suggest a command
    gh copilot suggest "find all large files over 100MB in this repo"
    

    Best Practices for Agent Mode

    • Start with clear, specific task descriptions
    • Review the plan before letting it execute
    • Use for well-defined tasks with clear success criteria
    • Keep your project well-organized with clear file structure

    Key Takeaways

    • •Copilot Workspace handles entire tasks from issue to pull request
    • •Agent Mode autonomously edits files, runs commands, and iterates on failures
    • •Copilot CLI explains and suggests terminal commands
    • •Start with clear task descriptions and review plans before execution
    0 of 6 lessons marked complete

    Progress is kept in this browser only.