-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathcontext-tier.yaml
More file actions
105 lines (95 loc) · 3.65 KB
/
Copy pathcontext-tier.yaml
File metadata and controls
105 lines (95 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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 %}"