Agentic Foundations

Everything in the six skill areas assumes this mental model. Learn how an agent differs from an assistant, why GitHub is where agent work is both recorded and controlled, which Copilot surfaces run where, and which configuration layer is guidance versus enforcement.

Foundations · Prerequisite Skills measured: study guide revision of May 4, 2026
What this page covers:

Assistant versus agent

Most developers first meet AI in the assistant pattern: it responds to a prompt, produces output, and hands control back. An agent goes further. It holds a goal across multiple steps, decides the intermediate steps itself, uses tools, and changes durable artifacts — branches, commits, pull requests — iterating on feedback until the task is done. That shift turns AI from something that helps with development into something that participates in it, and participation is what has to be governed.

BehaviourAssistantAgent
Who decides the next stepThe user, every timeThe agent, within its boundaries
Goal persistenceOne prompt, one answerMaintains a goal across many steps
Tool useNone, or read-only lookupsUses tools: shell, file edits, GitHub API, MCP servers
OutputSuggestions and explanations the user appliesDurable artifacts: branch, commits, pull request
FeedbackThe user re-promptsIterates on checks, scans and review comments
Example"How do I safely bump this dependency?" → a checklistSecurity alert → branch, dependency bump, PR with plan, revision after CI

In GitHub, agent behaviour shows up in exactly the places developers already look: branches and commits (what changed), pull requests (what is proposed and why), workflows and checks (what evidence exists) and reviews (what humans accepted). An agent does not replace the workflow — it enters the workflow as a participant.

The distinction the exam tests

A question that describes a tool that suggests code and waits for the developer is describing an assistant; one that describes something that creates a branch, pushes commits and opens a pull request is describing an agent. Governance questions are only about the second kind: an assistant never needs a ruleset bypass, a firewall allowlist or an escalation path.

The plan → act → evaluate lifecycle

Agents do not make one decision and stop; they run a loop until the task meets its success criteria or is handed to a person. Each phase has a GitHub-native home, and a well-designed system makes all three phases visible.

flowchart TB
  GOAL["Goal<br/>issue · prompt · alert"] --> PLAN["Plan<br/>scope · steps · success criteria"]
  PLAN --> ACT["Act<br/>branch · commits · pull request"]
  ACT --> EVAL["Evaluate<br/>checks · scans · reviews"]
  EVAL -->|"criteria met"| DONE["Accept<br/>merge or hand off"]
  EVAL -.->|"same failure twice"| HUMAN["Escalate<br/>to a human"]
  EVAL -->|"checks fail"| PLAN
The agent loop. Evaluation either accepts the work, feeds another planning round, or escalates to a human after repeated failure.
Plan
The agent interprets the goal and decides the steps. In a good system the plan is a reviewable artifact — a plan section in the pull request, a checklist in the issue, a plan.md — not a hidden internal state. Plans become reviewable when they state scope, success criteria, and a rollback or escalation path.
Act
The agent executes in the repository: creates a branch, changes files, pushes commits, opens or updates a pull request, responds to review feedback. Execution stays bounded: one repository, one branch, through pull requests — never uncontrolled writes to the default branch.
Evaluate
The agent and its supervisors judge the result with system signals: workflow runs and status checks, review outcomes, code scanning, secret scanning, dependency alerts. With rulesets or branch protection, required checks turn evaluation into an enforceable gate rather than a suggestion.

Evaluation is grounded in signals, not in the agent's confidence

"The agent says it fixed the vulnerability" is not evidence. "The dependency alert closed, CodeQL is clean and the required checks passed" is. If checks fail or risk remains, the loop continues: revise the plan, adjust the change, re-evaluate — or escalate.

GitHub as system of record and control plane

The course's central idea is that GitHub plays two roles at once. As the system of record it stores every artifact through which work is proposed and judged — repositories, branches, commits, pull requests, issues, discussions, workflow runs, uploaded artifacts and review history — so agent behaviour can be inspected after the fact. As the control plane it provides the enforcement points that decide what an agent's contribution can and cannot do.

GitHub controlWhat it enforcesWhy it matters for agents
Pull requestsChanges are proposed before mergingMakes agent work reviewable and discussable
Required reviewsAn approval gatePrevents unreviewed merges and anchors accountability to a person
Required status checksCI evidence before mergeTurns evaluation into enforceable policy
CODEOWNERSReview routing by pathThe right experts see high-impact changes — enforced only with "require review from Code Owners"
Rulesets / branch protectionCentral branch policyBlocks direct pushes, force pushes and merges that skip gates
EnvironmentsRequired reviewers, wait timers, scoped secretsDeployments and secret access pause for a human
Workflow permissionsWhat GITHUB_TOKEN can do"What the agent can do" often reduces to "what its token can do"
Audit logWho did what, whenAgentic events carry actor:Copilot and an agent session ID

Supervision works everywhere; enforcement needs configuration

Reviewing an agent's pull request is always possible. Blocking an unsafe merge only happens when someone with admin rights has turned the control on: a ruleset that requires the check, a CODEOWNERS rule that is actually required, an environment with required reviewers. A control that exists only in a document is not a control.

A typical agent pull request moves through the control plane like this:

  1. The agent opens a pull request with its change and plan, making the work visible.
  2. CODEOWNERS requests review from the owners of every sensitive path it touched.
  3. Required workflows and scans run and report status checks.
  4. The ruleset blocks merge until checks pass and approvals are in.
  5. If the change deploys, an environment with required reviewers pauses the deploy job — and its secrets — until someone approves.
PR template
# .github/pull_request_template.md — gives every agent PR the same reviewable shape
## Plan (required)
- **Goal:**
- **Scope (paths):**
- **Steps:**
- **Success criteria:**
- **Rollback / escalation:**

## Evidence
- Workflow run:
- Scan results:

Accountability and the contributor model

Responsibility does not move with execution

An agent can create a pull request, revise code and answer feedback, but it does not own the outcome. The people and teams who defined the task, set the permissions, chose the controls and approved the change remain accountable. GitHub encodes this: Copilot cloud agent's commits are authored by Copilot with the person who assigned the task as co-author, and that person cannot approve the resulting pull request.

Anti-patternWhat it looks likeGitHub mitigation
Planless executionA diff with no plan or rationalePR template with a required plan section; review before merge; plan-first workflow for risky work
Over-permissioned agentWorkflows can write everywhere and read every secretLeast-privilege GITHUB_TOKEN; environment-scoped secrets; tool allowlists
Hidden reasoningOnly the output diff, no assumptions or decisionsPlan artifact, linked workflow runs, decisions recorded in the PR
Blind trust in automation"CI passed, ship it"Checks plus CODEOWNERS plus risk-based approvals — checks only validate what they were written to detect

The minimum audit trail

For every agent contribution you should be able to reconstruct:

  • A stated goal — the issue link or PR description.
  • An inspectable plan — plan section or file.
  • A bounded changeset — one branch, scoped commits.
  • Automated evidence — workflow runs and uploaded artifacts.
  • Human judgement — reviews and approvals.
  • A clear outcome — merge, revert, or escalation.

The contributor model

The most reliable way to judge agent output is to stop treating it as categorically different: treat it as a contribution. A pull request answers the same questions whoever wrote it. The model avoids two opposite errors — excessive suspicion (rejecting work because an AI wrote it) and excessive trust (accepting it because automation produced it).

Rubric itemQuestion for an agent pull request
IntentIs there a clear goal and a visible plan?
ScopeDo the changed files match the plan?
EvidenceDo required checks pass? Are logs and artifacts available?
OwnershipDid the code owners of sensitive paths review it?
PolicyDoes it comply with rulesets, branch rules and environments?
FallbackIs rollback or escalation clear for a high-risk change?

A well-supervised agent contribution is understandable, bounded, reviewable, policy-compliant and reconstructable. That is not a special standard for AI — it is the standard of a healthy engineering workflow, applied consistently.

Where Copilot agents run

"The agent" in an exam question can mean several different products, and each has a different execution context, trigger and governance boundary. Placing the scenario on the right surface is often half the answer.

flowchart TB
  subgraph GH["Runs on GitHub"]
    direction LR
    CCA["Copilot cloud agent<br/>Actions-powered sandbox"]
    AUTO["Automations<br/>scheduled or event-triggered cloud agent"]
    GHAW["GitHub Agentic Workflows<br/>markdown compiled to Actions"]
    TPA["Third-party agents<br/>Claude · Codex"]
  end
  subgraph LOCAL["Runs on your machine"]
    direction LR
    CLI["Copilot CLI<br/>interactive · -p · autopilot"]
    IDE["Agent mode in the IDE<br/>VS Code · JetBrains · Visual Studio"]
    SDK["Copilot SDK<br/>your app embeds the agent runtime"]
  end
Agent surfaces split by where they execute. The ones on GitHub are governed by repository and organization policy; the local ones by the developer's permissions and enterprise-managed settings.
SurfaceWhere it runsHow it is triggeredKey boundaries
Copilot cloud agent Ephemeral GitHub Actions environment Agents tab or panel, assigning an issue to Copilot, @copilot on a PR, Copilot Chat, CLI /delegate, the REST API, Slack, Teams, Jira, Linear, Azure Boards One repository, one copilot/ branch, draft PR, firewall, 59-minute session, workflows need approval to run
Automations Cloud agent sessions Schedule, issue created, PR opened or synchronized Private or internal repositories only; tools chosen per automation; ignores untrusted users by default
GitHub Agentic Workflows GitHub Actions, containerized and firewalled Any Actions trigger; gh aw run Markdown compiled to .lock.yml; read-only token by default; writes only through safe-outputs
Third-party agents Same infrastructure as cloud agent Agents tab, issue assignment, @AGENT_NAME on a PR Same protections as cloud agent; policies managed separately; no steering
Copilot CLI Your terminal — or a runner, when used in a workflow Interactive, -p programmatic, autopilot, /fleet Your user's permissions; tool approval prompts; --allow-tool / --deny-tool; local hooks and managed settings
Agent mode in the IDE Your local workspace Chat in agent mode Edits your working tree directly; governed by IDE settings, not by GitHub agent policies
Copilot SDK Inside your own application Your code creates sessions You define custom agents, tool lists, permission handlers and hooks programmatically
Copilot code review Ephemeral Actions environment Reviewer request on a PR, or automatically Comments only; uses repository instructions and read-only MCP tools

Cloud agent is not agent mode

Copilot cloud agent works autonomously in a GitHub Actions-powered environment and delivers its work on a branch and (optionally) a pull request. Agent mode edits files directly in your local IDE workspace. A question about repository rulesets, the agent firewall or "Approve and run workflows" is about cloud agent; a question about edits appearing in your open editor is about agent mode.

The customization stack

Copilot's behaviour is shaped by several layers, each stored in a predictable place. The layers differ in one way that matters more than any other on this exam: whether they guide the model or enforce a boundary.

flowchart TB
  subgraph ENF["Enforcement — the platform blocks"]
    subgraph SHAPE["Capability — what it can attempt"]
      subgraph GUIDE["Guidance — what the agent is told"]
        INS["Custom instructions<br/>copilot-instructions.md · AGENTS.md"]
        AGP["Custom agent prompt<br/>.github/agents/*.agent.md"]
        SKL["Skills<br/>.github/skills/*/SKILL.md"]
      end
      TL["Tool allowlists<br/>tools: · --allow-tool · MCP tools"]
      ENV["Environment<br/>setup steps · firewall · Agents secrets"]
    end
    HK["Hooks<br/>preToolUse can deny"]
    RS["Rulesets · CODEOWNERS<br/>required checks · environments"]
  end
  INS ~~~ TL
  SKL ~~~ ENV
  TL ~~~ HK
  ENV ~~~ RS
Guidance is wrapped by capability limits, which are wrapped by enforcement. The further out a control sits, the less it depends on the model choosing to comply.
LayerWhere it livesTriggeredGuidance or enforcement
Repository instructions.github/copilot-instructions.mdAutomatic, every requestGuidance
Path-specific instructions.github/instructions/**/*.instructions.md with applyToAutomatic, for matching filesGuidance
Agent instructionsAGENTS.md (nearest wins), or root CLAUDE.md / GEMINI.mdAutomaticGuidance
Prompt files.github/prompts/*.prompt.mdManual (IDE)Guidance
Custom agents.github/agents/NAME.agent.md; org or enterprise agents/Selected, or inferredPrompt is guidance; tools list is a capability limit
Agent skills.github/skills/NAME/SKILL.md (+ scripts)Loaded when relevantGuidance (plus bundled scripts)
MCP serversRepository settings JSON, mcp-servers in a profile, mcp.jsonTool callsCapability — the tools field allowlists
Setup steps.github/workflows/copilot-setup-steps.ymlBefore each cloud agent sessionEnvironment
Hooks.github/hooks/*.jsonLifecycle eventsEnforcement — preToolUse can deny
Copilot MemoryStored by GitHub, per repository and per userAutomatic, validated before useGuidance

Rule of thumb

"Tell the agent not to do X" belongs in instructions. "Make it impossible for the agent to do X" belongs in a tool allowlist, a hook, the firewall, a token permission or a ruleset. When a question asks how to prevent something, the answer is almost never an instruction file. The Configuration reference has the syntax of every file above.

Renames and naming traps

The GitHub agent platform moved fast during 2025–2026. The exam and the live documentation use the current names, but Learn modules, blog posts and third-party material still carry older ones.

You may readCurrent nameNote
Copilot coding agentCopilot cloud agentRenamed April 2026, when it gained research and planning before a PR. Some REST endpoints and metrics fields still say "coding agent".
copilot environment secrets (Actions)Agents secrets and variablesDedicated secret type at organization and repository level; existing values were migrated automatically.
infer: false in an agent profiledisable-model-invocation: trueinfer is retired; user-invocable controls manual selection separately.
Premium requestsAI creditsCloud agent, CLI and agentic workflows consume AI credits (and Actions minutes where they run on runners).
Copilot Extensions (GitHub App based)MCP serversSunset on November 10, 2025 in favour of MCP; integrations are now built as MCP servers, custom agents and skills.
gh copilot CLI extensionGitHub Copilot CLI (copilot)The old gh extension was deprecated; the agentic CLI is installed from the @github/copilot npm package.
Copilot cloud agent "firewall" in Actions variablesSettings → Copilot → Internet accessEarlier configuration saved as Actions variables is preserved on the new page.
MCP settings under cloud agentSettings → Copilot → MCP serversShared by cloud agent and Copilot code review.

When the question and the docs disagree on a name

Answer with the product behaviour, not the label. "Coding agent" and "cloud agent" describe the same asynchronous agent that works on a branch in GitHub Actions; the rename changed capabilities (branch-first work before a PR), not the security model.

Glossary

Agent profile
A Markdown file with YAML frontmatter (name, description, tools, mcp-servers…) that defines a custom agent.
Agent session
One interaction with an agent on a task — the unit you monitor, steer, stop, archive and audit.
Control plane
The set of GitHub enforcement points — rulesets, checks, CODEOWNERS, environments, permissions — that decide what agent work is accepted.
Execution context
Repository, branch, workflow and permissions an agent runs under. It determines both what it can see and what it can do.
MCP (Model Context Protocol)
An open standard for connecting AI clients to tools through MCP servers. Registries catalogue servers; allowlists decide which may run.
Safe outputs
In GitHub Agentic Workflows, the declared set of write operations (create issue, add comment, open PR) that a separate, gated job may perform on the agent's behalf.
Subagent
An agent spawned by a main agent to handle a subtask in its own context window, optionally in parallel.
System of record
The durable store of intent, action and evidence — for agent work, GitHub issues, PRs, commits, runs and reviews.