-
Notifications
You must be signed in to change notification settings - Fork 46
feat(context): add per-agent context_tier (long_context / 1M) for Cop… #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jason Robert (jrob5756)
merged 3 commits into
microsoft:main
from
brrusino:feat/agent-context-tier
Jun 16, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # Context Tier Workflow | ||
| # | ||
| # This example demonstrates selecting a model's long-context (e.g. 1M-token) | ||
| # window for heavy-reasoning agents. It shows: | ||
| # - A workflow-wide default via `runtime.default_context_tier` | ||
| # - A per-agent override via `context_tier` (wins over the default) | ||
| # - Composition with `reasoning.effort` — the two are independent and | ||
| # map to two separate `create_session` kwargs | ||
| # | ||
| # Context tier is a Copilot-provider capability: | ||
| # - Copilot SDK: passes `context_tier` ("default" | "long_context") to | ||
| # `create_session` to select the model's context-window tier. | ||
| # - Other providers ignore the value. | ||
| # | ||
| # Use `long_context` for agents that ingest large evidence (multi-MB logs, | ||
| # many candidate source files) and would otherwise truncate at the default | ||
| # (~200K) tier. | ||
| # | ||
| # Usage: | ||
| # conductor run examples/context-tier.yaml \ | ||
| # --input topic="root-causing a multi-service latency regression" | ||
|
|
||
| workflow: | ||
| name: context-tier | ||
| description: Demonstrates workflow-wide and per-agent context-tier configuration | ||
| version: "1.0.0" | ||
| entry_point: triage | ||
|
|
||
| runtime: | ||
| provider: copilot | ||
| # Workflow-wide default applied to every provider-backed agent | ||
| # unless the agent declares its own `context_tier`. | ||
| default_context_tier: default | ||
|
|
||
| input: | ||
| topic: | ||
| type: string | ||
| required: true | ||
| description: An investigation topic that may require ingesting large evidence | ||
|
|
||
| agents: | ||
| - name: triage | ||
| description: Lightweight triage that inherits the runtime default tier | ||
| model: claude-opus-4.8 | ||
| # No `context_tier` here — inherits `runtime.default_context_tier: default`. | ||
| prompt: | | ||
| Briefly triage the following investigation. Decide whether a deep, | ||
| evidence-heavy analysis pass is warranted (true when it implies sifting | ||
| large logs or many source files). | ||
|
|
||
| Topic: {{ workflow.input.topic }} | ||
| output: | ||
| summary: | ||
| type: string | ||
| description: A short triage summary | ||
| needs_deep_analysis: | ||
| type: boolean | ||
| description: Whether a long-context analysis pass is warranted | ||
| routes: | ||
| - to: analyze | ||
| when: "{{ output.needs_deep_analysis }}" | ||
| - to: $end | ||
|
|
||
| - name: analyze | ||
| description: Deep analysis over large evidence (pinned to the long-context tier) | ||
| model: claude-opus-4.8 | ||
| # Per-agent override: this agent always runs on the long-context tier, | ||
| # regardless of the workflow-wide default. Composes with reasoning. | ||
| context_tier: long_context | ||
| reasoning: | ||
| effort: high | ||
| input: | ||
| - workflow.input.topic | ||
| - triage.output.summary | ||
| prompt: | | ||
| Perform a thorough analysis of the investigation below. Assume you may | ||
| need to reason over a large body of evidence. | ||
|
|
||
| **Topic:** {{ workflow.input.topic }} | ||
|
|
||
| **Triage summary:** | ||
| {{ triage.output.summary }} | ||
|
|
||
| Produce a root-cause hypothesis, the evidence that supports it, and the | ||
| next concrete step to confirm it. | ||
| output: | ||
| hypothesis: | ||
| type: string | ||
| description: Root-cause hypothesis | ||
| evidence: | ||
| type: string | ||
| description: Evidence supporting the hypothesis | ||
| next_step: | ||
| type: string | ||
| description: The next concrete step to confirm the hypothesis | ||
| routes: | ||
| - to: $end | ||
|
|
||
| output: | ||
| topic: "{{ workflow.input.topic }}" | ||
| summary: "{{ triage.output.summary }}" | ||
| needs_deep_analysis: "{{ triage.output.needs_deep_analysis }}" | ||
| hypothesis: "{% if analyze is defined %}{{ analyze.output.hypothesis }}{% else %}(skipped — no deep analysis needed){% endif %}" | ||
| evidence: "{% if analyze is defined %}{{ analyze.output.evidence }}{% endif %}" | ||
| next_step: "{% if analyze is defined %}{{ analyze.output.next_step }}{% endif %}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.