Report context telemetry
context.report tells Vectadyne what your context window actually contained. It is the only way to
get an honest answer to is the retrieved memory earning its place, because only your side knows
what you finally sent to the model.
The segments
Section titled “The segments”| Label | What |
|---|---|
system_prompt | Your system prompt |
personality | Persona or style |
resolved_guides | Topic guides from Vectadyne |
retrieved_memory | Memory from Vectadyne |
working_state | Scratchpad, plan, intermediate results |
tool_defs | Tool definitions |
Absent is not zero
Section titled “Absent is not zero”An unreported label is stored absent, never zero. “Not measured” and “measured zero” stay distinguishable, and that distinction is the difference between a gap in your instrumentation and a real finding.
So: omit a label you did not measure. Do not send 0 to fill the shape — that claims a
measurement you did not make, and it will look like a finding to whoever reads the dashboard.
Go and Python: the meter
Section titled “Go and Python: the meter”meter := client.NewMeter("release-bot", 128_000). ObserveAssemble(assembled). // fills in what Vectadyne contributed Set(wire.SegmentLabelSystemPrompt, 1_200). Set(wire.SegmentLabelWorkingState, 3_400)
if _, submitted, err := meter.Submit(ctx); err != nil { log.Printf("telemetry: %v", err)} else if !submitted { log.Print("nothing to report") // no segments set — not an error}from vectadyne import ContextMeter
meter = ContextMeter(agent="release-bot", window_total=128_000)meter.observe_assemble(assembled)meter.set("system_prompt", 1_200)meter.submit(vd.client)ObserveAssemble / observe_assemble fills in what Vectadyne contributed, so you only measure your
own segments.
Submit returns a submitted flag: with no segments set there is nothing to report, and that is
not an error. Check it rather than assuming a call happened.
TypeScript: build it yourself
Section titled “TypeScript: build it yourself”There is no meter in the TypeScript SDK. Use callTool with the same validated shape:
await client.callTool("context.report", { agent: "release-bot", window_total: 128_000, segments: { system_prompt: 1_200, resolved_guides: 2_100, retrieved_memory: 4_800, },});Omit labels you did not measure. See SDK parity.
What it is for
Section titled “What it is for”Three questions you cannot answer otherwise:
- Is retrieved memory earning its tokens? If
retrieved_memoryis 30% of the window and the citations rarely appear in the output, tunetop_kor your filters. - What is actually filling the window? Usually not what people guess. Tool definitions and working state are the common surprises.
- Is context growing? A slow creep is invisible per run and expensive per month.
What is never sent
Section titled “What is never sent”Counts, not content. No memory text, no prompt content, no prompt_block — the report is token
accounting.
Where in the loop
Section titled “Where in the loop”After the model call, once you know what you actually sent:
assembled = vd.assemble(...)prompt = build_prompt(assembled)response = model.generate(prompt)
meter = ContextMeter(agent="release-bot", window_total=MODEL_WINDOW)meter.observe_assemble(assembled)meter.set("system_prompt", count(SYSTEM_PROMPT))meter.set("working_state", count(state))meter.submit(vd.client)Reporting before the model call measures your intent rather than your spend.