@ssheleg/agent-stack 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +91 -0
- package/package.json +1 -1
- package/plugins/agent-stack/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-stack/skills/agent-evals/SKILL.md +5 -0
- package/plugins/agent-stack/skills/agent-evals/references/otel-genai.md +177 -0
- package/plugins/agent-stack/skills/agent-orchestrator/references/governance.md +39 -0
- package/plugins/agent-stack/skills/agent-orchestrator/references/graph-engineering.md +27 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,94 @@
|
|
|
1
|
+
## v0.23.0 — the wire format for §7, and the three things it will not carry
|
|
2
|
+
|
|
3
|
+
`agent-evals` §7 said *what* to instrument in four bullets and named no format.
|
|
4
|
+
`references/otel-genai.md` is the format — and the reason it is worth its own file is not
|
|
5
|
+
the field list but the three places the standard refuses to carry what this skill requires.
|
|
6
|
+
|
|
7
|
+
**Read the status before encoding any of it.** The conventions have moved out of the main
|
|
8
|
+
`semantic-conventions` repository into their own, whose README lists **Schema URL: `TODO`**,
|
|
9
|
+
and every document is `Status: Development`. On the inference span the only `Stable`
|
|
10
|
+
attributes are the ones borrowed from core semconv; **every `gen_ai.*` attribute is
|
|
11
|
+
Development**. Adopt it anyway — a moving standard beats a private vocabulary nobody else's
|
|
12
|
+
tooling reads — but pin the version and treat any branch on a `gen_ai.*` name as code with
|
|
13
|
+
an expiry date.
|
|
14
|
+
|
|
15
|
+
**The evaluation event has no field for who produced the score.** `gen_ai.evaluation.result`
|
|
16
|
+
carries a name, a value, a low-cardinality label and an explanation, and nothing about the
|
|
17
|
+
scorer — while §7 requires exactly that (`human` | `llm_judge` | `code_check`), because a
|
|
18
|
+
score with no source cannot be calibrated or audited. OpenInference has the field under
|
|
19
|
+
another name, `annotation.annotator_kind`, with our three values. The reference says to carry
|
|
20
|
+
it as a documented extension rather than drop the requirement: a judge score and a human
|
|
21
|
+
label that are indistinguishable on the wire get averaged by somebody downstream, which is
|
|
22
|
+
what §5's calibration exists to prevent.
|
|
23
|
+
|
|
24
|
+
**There is no cost attribute at all**, and usage is eleven numbers rather than one —
|
|
25
|
+
`input_tokens`, `output_tokens`, `reasoning.output_tokens`, `cache_read.input_tokens`,
|
|
26
|
+
`cache_write.input_tokens`, plus per-modality splits. **A cost from `input + output` alone is
|
|
27
|
+
wrong in both directions**: it bills cache reads at full price and misses reasoning tokens
|
|
28
|
+
and cache writes entirely. `gen_ai.client.token.usage` carries a hard **MUST NOT report**
|
|
29
|
+
when counts are unobtainable — absence over a fabricated zero, the rule `audit.md` already
|
|
30
|
+
states for attribution.
|
|
31
|
+
|
|
32
|
+
**And two seams that decide a design rather than a field.** The content-upload hook *"SHOULD
|
|
33
|
+
operate independently of the opt-in flags"* and *"SHOULD be invoked regardless of the span
|
|
34
|
+
sampling decision"* — so it is the last scrubbing point and it fires on spans nobody will
|
|
35
|
+
read; a masking hook meanwhile **cannot change the span name**, which is built from tool and
|
|
36
|
+
MCP target names, so redaction and naming are one decision. Verified against a shipping
|
|
37
|
+
implementation rather than assumed: OpenLLMetry's `is_content_tracing_enabled()` returns
|
|
38
|
+
**true when its environment variable is unset**, the opposite of the spec's default, so
|
|
39
|
+
prompts are captured unless you turn them off (`traceloop-sdk/traceloop/sdk/config/__init__.py`,
|
|
40
|
+
read 2026-08-31).
|
|
41
|
+
|
|
42
|
+
**Finally, two words that mean three things each.** *"OpenTelemetry-based"* answers a
|
|
43
|
+
transport question and no semantic one: Phoenix emits OpenInference, OpenLLMetry emits
|
|
44
|
+
`gen_ai.*` plus `traceloop.*`, neither is a subset of the other, and a trace assembled from
|
|
45
|
+
both is two disconnected halves under one trace id. And *"replay"* is durable execution
|
|
46
|
+
(recorded results, nothing re-runs), a trace playground (the call re-runs against the live
|
|
47
|
+
provider), or this skill's fixture replay (an assertion over a stored run) — `audit.md` asks
|
|
48
|
+
whether a run can be replayed without saying which, and the reference names the three.
|
|
49
|
+
|
|
50
|
+
## v0.22.0 — the failures named from outside, and the control that is absence
|
|
51
|
+
|
|
52
|
+
**`graph-engineering.md` was argued entirely from what breaks, with no citation behind it.**
|
|
53
|
+
*Why Do Multi-Agent LLM Systems Fail?* (2025) measured the same ground: traces from seven
|
|
54
|
+
mainstream frameworks — MetaGPT, ChatDev, AG2, Magentic-One — with human annotators
|
|
55
|
+
independently analysing ~**150 traces** at **Cohen's kappa = 0.88**, yielding **14 failure
|
|
56
|
+
modes in three groups**.
|
|
57
|
+
|
|
58
|
+
The reason to carry it is that the three groups land on this file's own five-field node
|
|
59
|
+
contract without being bent to fit: *system design flaws* on the interface and the `owner`,
|
|
60
|
+
*inter-agent alignment failures* on the edge payload — §3's **Carries** column — and
|
|
61
|
+
*missing task verification* on `check` and the checker node. An outside measurement arriving
|
|
62
|
+
at the same joints is worth more than another argument from failure.
|
|
63
|
+
|
|
64
|
+
**And its load-bearing result is the negative one.** Better prompts, more explicit roles and
|
|
65
|
+
retries bought ChatDev **15.6%**, and the authors conclude the modes are **architectural
|
|
66
|
+
rather than bugs** — the same claim §1 makes about the two fields nobody draws. The section
|
|
67
|
+
is written as a review checklist, not a taxonomy to admire: per node, is the interface
|
|
68
|
+
stated, is there exactly one owner, and does the check run on something other than the
|
|
69
|
+
node's own claim of success.
|
|
70
|
+
|
|
71
|
+
**`governance.md` put per-tool authorisation at the moment of invocation, and there is a
|
|
72
|
+
strictly stronger control one layer earlier.** *The model cannot reason about capabilities
|
|
73
|
+
it does not know exist.* A tool absent from the schema cannot be invoked, argued for, or
|
|
74
|
+
probed for a bypass; a tool present and refused at call time is a negotiation, and
|
|
75
|
+
negotiations are won sometimes. Sub-agent isolation needs both halves — schema filtering at
|
|
76
|
+
construction **and** `message_history = None` at execution, because a sub-agent handed its
|
|
77
|
+
parent's transcript has been told about every capability you removed from its schema.
|
|
78
|
+
|
|
79
|
+
**Two numbers that point in opposite directions on purpose.** Eagerly loading every MCP tool
|
|
80
|
+
schema at startup consumed **40% of the context budget before the first user message**; a
|
|
81
|
+
metadata index with schemas fetched on selection takes it **under 5%**. Yet the same system
|
|
82
|
+
builds *its own* prompt and tool schemas **eagerly**, in the constructor. The rule is not
|
|
83
|
+
*lazy is better*: it is **eager for what you own and always need, lazy for what is foreign
|
|
84
|
+
and might not be used.**
|
|
85
|
+
|
|
86
|
+
**Approval fatigue is filed as a safety failure, not a UX complaint.** An approval system
|
|
87
|
+
with no persistence makes users re-approve the same operations every session, which produces
|
|
88
|
+
blanket auto-approval and defeats the safety system entirely — through the user rather than
|
|
89
|
+
through a bug, so nothing in the logs looks wrong. **A control that is asked too often is a
|
|
90
|
+
control on its way to being switched off.**
|
|
91
|
+
|
|
1
92
|
## v0.21.0 — the risk one tool cannot show you, and the money an iteration refund does not cover
|
|
2
93
|
|
|
3
94
|
Two findings, both of them about a rule that is right on one axis and silently assumed to
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "agent-stack",
|
|
4
4
|
"displayName": "Agent Stack",
|
|
5
5
|
"description": "Four skills: agent-orchestrator — tool-calling loops, pipelines with checkpoints, provider routing with fallback, memory architecture, plus the wallet side of reselling LLM access; agent-evals — run/trace/thread evals, LLM judges, and fixtures grown from production; agent-interop — MCP servers and clients, A2A agent cards, the MCP Registry, and gateways; agent-harness — system prompts, tool shaping, workflow-vs-agent, and auditing an agent system.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.23.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "ssheleg",
|
|
9
9
|
"url": "https://x.com/sshlg93"
|
|
@@ -288,6 +288,10 @@ predictive.
|
|
|
288
288
|
|
|
289
289
|
## 7. What to instrument first
|
|
290
290
|
|
|
291
|
+
**The wire format for all of this is `references/otel-genai.md`** — and it is worth
|
|
292
|
+
reading before the first span, because two of the things this section requires (a score's
|
|
293
|
+
source, a trustworthy cost) are the two the standard does not carry.
|
|
294
|
+
|
|
291
295
|
None of the above runs without these, and they are the part people skip:
|
|
292
296
|
|
|
293
297
|
- **A durable trace store, queryable by id, filterable by score and time.** The live
|
|
@@ -330,6 +334,7 @@ None of the above runs without these, and they are the part people skip:
|
|
|
330
334
|
| Load | When |
|
|
331
335
|
|---|---|
|
|
332
336
|
| [`references/statistics.md`](references/statistics.md) | a number is about to change a decision — how many runs before a difference is real, `pass@k` vs `pass^k` and why trials are not independent, paired comparison, the harness as a variable, and what a given piece of evidence authorises next |
|
|
337
|
+
| [`references/otel-genai.md`](references/otel-genai.md) | you are **instrumenting an agent for someone else to read** — span-name formulas and the closed operation enum, the evaluation event that has no field for who scored, the three content tiers and the upload hook that runs even on dropped spans, the eleven token attributes and why cost is a join you can get wrong in both directions, and why "OpenTelemetry-based" is not one vocabulary |
|
|
333
338
|
|
|
334
339
|
---
|
|
335
340
|
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# OpenTelemetry GenAI — the wire format for §7, and what it does not carry
|
|
2
|
+
|
|
3
|
+
**Load this when instrumenting an agent for someone else to read**: choosing span names and
|
|
4
|
+
attributes, deciding what of a prompt reaches a backend, wiring token usage into a bill, or
|
|
5
|
+
judging what an "OpenTelemetry-based" tool actually gives you.
|
|
6
|
+
|
|
7
|
+
§7 says *what* to instrument in four bullets. This is the format that carries it — and the
|
|
8
|
+
three places it will not carry what this skill requires.
|
|
9
|
+
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [Read this before encoding any of it](#read-this-before-encoding-any-of-it)
|
|
13
|
+
- [Span names are formulas, and the operation list is closed](#span-names-are-formulas-and-the-operation-list-is-closed)
|
|
14
|
+
- [The evaluation event, missing the field §7 requires](#the-evaluation-event-missing-the-field-7-requires)
|
|
15
|
+
- [Content: three tiers, and a hook that runs when nothing else does](#content-three-tiers-and-a-hook-that-runs-when-nothing-else-does)
|
|
16
|
+
- [Tokens are eleven numbers and money is none of them](#tokens-are-eleven-numbers-and-money-is-none-of-them)
|
|
17
|
+
- ["OpenTelemetry-based" is not one vocabulary](#opentelemetry-based-is-not-one-vocabulary)
|
|
18
|
+
- [Replay is three different guarantees](#replay-is-three-different-guarantees)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Read this before encoding any of it
|
|
23
|
+
|
|
24
|
+
**The conventions moved.** They no longer live in the main `semantic-conventions` repository
|
|
25
|
+
— that page now says only that they have moved and is no longer maintained. They have their
|
|
26
|
+
own repository, whose README lists **Schema URL: `TODO`**.
|
|
27
|
+
|
|
28
|
+
**Nothing in them is stable.** Every document is marked `Status: Development`. On the
|
|
29
|
+
inference span the only attributes marked `Stable` are the ones borrowed from core semconv —
|
|
30
|
+
`error.type`, `server.address`, `server.port`, `exception.*`. **Every single `gen_ai.*`
|
|
31
|
+
attribute is `Development`.**
|
|
32
|
+
|
|
33
|
+
So: adopt it, because a moving standard beats a private vocabulary that will never be read
|
|
34
|
+
by anyone else's tooling — and **pin the version you adopted and expect to migrate**. Treat
|
|
35
|
+
any code that branches on a `gen_ai.*` attribute as code with an expiry date, and re-read
|
|
36
|
+
the spec before quoting a field name from this file.
|
|
37
|
+
|
|
38
|
+
## Span names are formulas, and the operation list is closed
|
|
39
|
+
|
|
40
|
+
Span names are computed, not free text:
|
|
41
|
+
|
|
42
|
+
| Span | Name | Kind |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| inference | `{gen_ai.operation.name} {gen_ai.request.model}` | `CLIENT` |
|
|
45
|
+
| tool call | `execute_tool {gen_ai.tool.name}` | `INTERNAL` |
|
|
46
|
+
| agent invocation | `invoke_agent {gen_ai.agent.name}` | `CLIENT` |
|
|
47
|
+
| planning | `plan {gen_ai.agent.name}` | `INTERNAL` |
|
|
48
|
+
| agent creation | `create_agent {gen_ai.agent.name}` | — |
|
|
49
|
+
| MCP | `{mcp.method.name} {target}`, target being the tool or prompt name | — |
|
|
50
|
+
|
|
51
|
+
`gen_ai.operation.name` is a **closed 17-value enum** — `chat`, `text_completion`,
|
|
52
|
+
`generate_content`, `embeddings`, `retrieval`, `fetch_response`, `execute_tool`,
|
|
53
|
+
`create_agent`, `invoke_agent`, `plan` and the rest. A value outside it is not an extension,
|
|
54
|
+
it is a name a backend cannot group by.
|
|
55
|
+
|
|
56
|
+
**Only two attributes are Required on an inference span.** Everything else that matters —
|
|
57
|
+
the model that actually answered, token counts, finish reasons — is Recommended or
|
|
58
|
+
Conditionally Required. A conformant instrumentation can therefore be almost empty, which is
|
|
59
|
+
the reason to specify what *you* need rather than to trust conformance as a floor.
|
|
60
|
+
|
|
61
|
+
One behaviour worth knowing before you count spans: **automatic retries collapse into one
|
|
62
|
+
span.** A span is one logical operation, not one HTTP request, so a retry storm is invisible
|
|
63
|
+
at this layer and has to be measured somewhere else.
|
|
64
|
+
|
|
65
|
+
## The evaluation event, missing the field §7 requires
|
|
66
|
+
|
|
67
|
+
The spec defines `gen_ai.evaluation.result`, parented to the span being evaluated — or
|
|
68
|
+
carrying `gen_ai.response.id` when the span id is not available — with:
|
|
69
|
+
|
|
70
|
+
- `gen_ai.evaluation.name` (**Required**)
|
|
71
|
+
- `gen_ai.evaluation.score.value`
|
|
72
|
+
- `gen_ai.evaluation.score.label` — low-cardinality: `pass`, `fail`, `relevant`, …
|
|
73
|
+
- `gen_ai.evaluation.explanation`
|
|
74
|
+
|
|
75
|
+
**There is no attribute for who or what produced the score.**
|
|
76
|
+
|
|
77
|
+
That is precisely the field this skill requires: §7 says a score binds to a run with a
|
|
78
|
+
`source` of `human` | `llm_judge` | `code_check`, *because a score with no source cannot be
|
|
79
|
+
calibrated, audited, or trusted differently from its neighbours*. The standard omits it.
|
|
80
|
+
|
|
81
|
+
OpenInference has it, under a different name: **`annotation.annotator_kind`** — `HUMAN`,
|
|
82
|
+
`LLM`, `CODE`, or custom — with `evaluation.annotator_kind` beside it. The three values are
|
|
83
|
+
our three values.
|
|
84
|
+
|
|
85
|
+
**So carry it yourself.** Add the attribute under your own namespace and document that it is
|
|
86
|
+
an extension; do not drop the requirement because the schema has no slot for it. A judge
|
|
87
|
+
score and a human label that are indistinguishable on the wire will be averaged by somebody
|
|
88
|
+
downstream, and that average is the thing §5's calibration exists to prevent.
|
|
89
|
+
|
|
90
|
+
## Content: three tiers, and a hook that runs when nothing else does
|
|
91
|
+
|
|
92
|
+
Prompt and completion content is governed by three named patterns, chosen by environment:
|
|
93
|
+
|
|
94
|
+
1. **Record nothing** — the default.
|
|
95
|
+
2. **Record on span attributes** — *"best suited for … pre-production environments"*.
|
|
96
|
+
3. **Store externally, record a reference on the span** — *"recommended in production
|
|
97
|
+
environments where telemetry volume is a concern or sensitive data needs to be handled
|
|
98
|
+
securely. Using external storage enables separate access controls."*
|
|
99
|
+
|
|
100
|
+
**The spec's own default is to capture nothing**, and it says instrumentations SHOULD NOT
|
|
101
|
+
capture content by default. Verify that in your stack rather than assuming it: the most
|
|
102
|
+
widely used `gen_ai.*` implementation ships the opposite. OpenLLMetry's
|
|
103
|
+
`is_content_tracing_enabled()` reads
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
return (os.getenv("TRACELOOP_TRACE_CONTENT") or "true").lower() == "true"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
— an unset variable is **true**, so prompts are captured unless you turn them off. Measured
|
|
110
|
+
2026-08-31 against `traceloop-sdk/traceloop/sdk/config/__init__.py`. An agent's trace carries
|
|
111
|
+
prompts, prompts carry secrets, and the default here works against you.
|
|
112
|
+
|
|
113
|
+
**The upload hook is the last scrubbing point, and it runs where nothing else does.** Two
|
|
114
|
+
properties make it the mechanism rather than a convenience: it *"SHOULD operate independently
|
|
115
|
+
of the opt-in flags"*, and instrumentations *"SHOULD invoke it regardless of the span sampling
|
|
116
|
+
decision"*. It therefore fires on spans nobody will ever look at — which is right, because
|
|
117
|
+
the content has already left the process by then, and wrong to reason about as *"we only keep
|
|
118
|
+
sampled traces"*.
|
|
119
|
+
|
|
120
|
+
**A masking hook cannot change the span name.** Span names are built from tool names and MCP
|
|
121
|
+
targets, so a redaction design that scrubs attributes and leaves the name is a design that
|
|
122
|
+
leaks through the one field it never inspected. Decide naming and redaction together.
|
|
123
|
+
|
|
124
|
+
## Tokens are eleven numbers and money is none of them
|
|
125
|
+
|
|
126
|
+
**There is no cost attribute anywhere in the GenAI semantic conventions.** The spec
|
|
127
|
+
standardises tokens and never money, so cost is always a join against a price table living
|
|
128
|
+
outside the trace — and that join is where the number goes wrong.
|
|
129
|
+
|
|
130
|
+
Because usage is not one number. It is eleven: `gen_ai.usage.input_tokens`, `output_tokens`,
|
|
131
|
+
`reasoning.output_tokens`, `cache_read.input_tokens`, `cache_write.input_tokens`, and
|
|
132
|
+
per-modality `text.*` / `image.*` / `audio.*` splits including
|
|
133
|
+
`image.cache_read.input_tokens`.
|
|
134
|
+
|
|
135
|
+
**A cost computed from `input_tokens + output_tokens` alone is wrong in both directions.** It
|
|
136
|
+
bills cache reads at full price — they are the cheap ones — and it misses reasoning tokens and
|
|
137
|
+
cache writes entirely. `references/kv-cache.md` in `agent-orchestrator` is the other half of
|
|
138
|
+
this: the cache read is the case worth getting right, because at scale it is most of the
|
|
139
|
+
traffic.
|
|
140
|
+
|
|
141
|
+
And `gen_ai.client.token.usage` carries a hard **MUST NOT report** when the counts are not
|
|
142
|
+
obtainable. A zero is a claim; absence is the honest value. That is the same rule
|
|
143
|
+
`agent-harness/references/audit.md` states for cost attribution — *missing attribution beats
|
|
144
|
+
wrong attribution, and absence is a named state rather than a fabricated zero*.
|
|
145
|
+
|
|
146
|
+
## "OpenTelemetry-based" is not one vocabulary
|
|
147
|
+
|
|
148
|
+
Two widely used tools both describe themselves as OpenTelemetry-based and emit **disjoint**
|
|
149
|
+
attribute sets:
|
|
150
|
+
|
|
151
|
+
| | Emits |
|
|
152
|
+
|---|---|
|
|
153
|
+
| **Phoenix** | OpenInference — `openinference.span.kind` (required; `LLM`, `CHAIN`, `RETRIEVER`, `RERANKER`, `TOOL`, `AGENT`, `GUARDRAIL`, `EVALUATOR`, `PROMPT`, `EMBEDDING`), plus `llm.*`, `input.value`, `input.mime_type`, `document.*`, `annotation.*` |
|
|
154
|
+
| **OpenLLMetry** | `gen_ai.*` plus `traceloop.*` |
|
|
155
|
+
|
|
156
|
+
**Neither set is a subset of the other, and neither is a superset of the GenAI
|
|
157
|
+
conventions.** A backend query written against one returns nothing against the other, and a
|
|
158
|
+
trace assembled from two services using each is **two disconnected halves under one trace
|
|
159
|
+
id** — which reads as a gap in the system rather than a gap in the vocabulary.
|
|
160
|
+
|
|
161
|
+
So *"we use OpenTelemetry"* answers a transport question and no semantic one. Ask which
|
|
162
|
+
attribute set, and pick one per system rather than per service.
|
|
163
|
+
|
|
164
|
+
## Replay is three different guarantees
|
|
165
|
+
|
|
166
|
+
The word appears in three products in this space and means three incompatible things. Our
|
|
167
|
+
own `agent-harness/references/audit.md` asks *"can a past run be replayed"* without saying
|
|
168
|
+
which:
|
|
169
|
+
|
|
170
|
+
| Sense | What re-runs | Cost | Answers |
|
|
171
|
+
|---|---|---|---|
|
|
172
|
+
| **Durable execution** (Temporal) | nothing — recorded results are replayed and only the failed step retries | free, deterministic | can I resume without redoing 20 web searches |
|
|
173
|
+
| **Trace playground** (Phoenix) | the model call, against the live provider, with an edited prompt | a real call | would a different prompt have done better |
|
|
174
|
+
| **Fixture replay** (this skill, §2 single-step) | an assertion over a stored run | free | did the decision at this point change |
|
|
175
|
+
|
|
176
|
+
They are not interchangeable, and a runbook that says *"replay the run"* has not said what it
|
|
177
|
+
means. Name the sense.
|
|
@@ -36,6 +36,45 @@ guardrails" so often means only the first.
|
|
|
36
36
|
The last one is the one most designs miss: a sub-agent that inherits its caller's
|
|
37
37
|
authority silently widens every permission the caller had.
|
|
38
38
|
|
|
39
|
+
## The cheapest control is absence
|
|
40
|
+
|
|
41
|
+
The **Tool call** row above puts per-tool authorisation at the moment of invocation. There
|
|
42
|
+
is a control one layer earlier and it is strictly stronger:
|
|
43
|
+
|
|
44
|
+
> **The model cannot reason about capabilities it does not know exist.**
|
|
45
|
+
|
|
46
|
+
A tool absent from the schema cannot be invoked, cannot be argued for, and cannot be probed
|
|
47
|
+
for a bypass — there is nothing to jailbreak toward. A tool present in the schema and
|
|
48
|
+
refused at call time is a negotiation, and negotiations are won sometimes.
|
|
49
|
+
|
|
50
|
+
So **filter the schema at build time**, and treat runtime authorisation as the second line
|
|
51
|
+
rather than the first. Sub-agent isolation comes from exactly two mechanisms used together:
|
|
52
|
+
schema filtering when the agent is constructed, and no inherited conversation
|
|
53
|
+
(`message_history = None`) when it runs. The second matters as much as the first — a
|
|
54
|
+
sub-agent handed its parent's transcript has been told about every capability you carefully
|
|
55
|
+
removed from its schema.
|
|
56
|
+
|
|
57
|
+
**Two numbers, and they point in opposite directions on purpose.** Eagerly loading every
|
|
58
|
+
MCP tool schema at startup consumed **40% of the context budget before the first user
|
|
59
|
+
message**; a metadata index at startup with the full schema fetched on selection takes it
|
|
60
|
+
**under 5%**. But the same system builds *its own* prompt and tool schemas **eagerly**, in
|
|
61
|
+
the constructor. The rule underneath is not *lazy is better*: it is **eager for what you
|
|
62
|
+
own and always need, lazy for what is foreign and might not be used** — the first removes
|
|
63
|
+
latency and race conditions from the hot path, the second removes a cost you cannot predict.
|
|
64
|
+
|
|
65
|
+
### Approval fatigue is a safety failure, not a UX complaint
|
|
66
|
+
|
|
67
|
+
> Without persistence, users must re-approve the same operations every session, causing
|
|
68
|
+
> approval fatigue that leads to **blanket auto-approval, defeating the safety system
|
|
69
|
+
> entirely**.
|
|
70
|
+
|
|
71
|
+
An approval system with no memory converts itself into no approval system, and it does so
|
|
72
|
+
through the user rather than through a bug — so nothing in the logs looks wrong. The
|
|
73
|
+
remedy is on the same axis as the section above: **decide once what does not need asking,
|
|
74
|
+
remove it from the question, and spend the prompts on what genuinely changes.** A control
|
|
75
|
+
that is asked too often is a control on its way to being switched off.
|
|
76
|
+
|
|
77
|
+
|
|
39
78
|
## Guardrails, and their honest limit
|
|
40
79
|
|
|
41
80
|
The content-layer checks worth having, roughly in order of reliability:
|
|
@@ -28,6 +28,7 @@ well-measured answer to the wrong question.
|
|
|
28
28
|
- [9. What Claude Code actually executes](#9-what-claude-code-actually-executes)
|
|
29
29
|
- [10. Barrier or no barrier](#10-barrier-or-no-barrier)
|
|
30
30
|
- [11. Project defaults, written once](#11-project-defaults-written-once)
|
|
31
|
+
- [11a. MAST — the failures, named from outside](#11a-mast--the-failures-named-from-outside)
|
|
31
32
|
- [12. The source's four diagrams, and what each one is for](#12-the-sources-four-diagrams-and-what-each-one-is-for)
|
|
32
33
|
- [Where this file disagrees with its source](#where-this-file-disagrees-with-its-source)
|
|
33
34
|
|
|
@@ -375,6 +376,32 @@ The last line is `context-engineering.md`'s *filesystem as context* stated as a
|
|
|
375
376
|
rule: an edge that carries a path costs a few tokens, and an edge that carries a
|
|
376
377
|
transcript costs the window.
|
|
377
378
|
|
|
379
|
+
## 11a. MAST — the failures, named from outside
|
|
380
|
+
|
|
381
|
+
Everything above is argued from what breaks. *Why Do Multi-Agent LLM Systems Fail?* (2025)
|
|
382
|
+
measured it: execution traces from seven mainstream frameworks — MetaGPT, ChatDev, AG2 and
|
|
383
|
+
Magentic-One among them — with human annotators independently analysing roughly **150
|
|
384
|
+
traces** at **Cohen's kappa = 0.88**, producing **14 failure modes in three groups**.
|
|
385
|
+
|
|
386
|
+
The three groups land on this file's own node contract, which is the reason to carry them:
|
|
387
|
+
|
|
388
|
+
| MAST group | Modes include | The field it lands on |
|
|
389
|
+
|---|---|---|
|
|
390
|
+
| **System design flaws** | unclear interfaces between agents, overlapping roles, wrong tool configuration | `input` / `output` (the interface), and `owner` (overlapping roles) |
|
|
391
|
+
| **Inter-agent alignment failures** | inconsistent understanding of the objective, downstream misinterpretation, logically contradictory operations | the **edge payload** — what actually crosses, §3's *Carries* column |
|
|
392
|
+
| **Missing task verification** | an agent reports *completed* and the result does not meet the requirement | `check`, and §6's checker node |
|
|
393
|
+
|
|
394
|
+
**The load-bearing result is the negative one.** Straightforward fixes — better prompts,
|
|
395
|
+
more explicit role descriptions, retries — bought ChatDev only **15.6%**. The authors
|
|
396
|
+
conclude the modes are **architectural rather than bugs**, which is the same claim §1 makes
|
|
397
|
+
about the two fields nobody draws: an owner and a completion test are not documentation of
|
|
398
|
+
a graph, they are the parts that make it a graph.
|
|
399
|
+
|
|
400
|
+
Read the mapping as a review checklist rather than a taxonomy to admire: for each node, is
|
|
401
|
+
the interface stated, is there exactly one owner, and does the *check* run on something
|
|
402
|
+
other than the node's own claim of success.
|
|
403
|
+
|
|
404
|
+
|
|
378
405
|
## 12. The source's four diagrams, and what each one is for
|
|
379
406
|
|
|
380
407
|
The article carries four hand-drawn figures. They are not decoration — each one is doing
|