EVIDENCE AND EVALUATION / Undominated.ai
Undominated · Agent trajectory cost audit
Audit multi-turn agent execution loops for quadratic token accumulation, retry loops, tool call overhead, and cumulative trajectory dollar costs.
“Audit multi-turn agent execution loops for quadratic token accumulation, retry loops, tool call overhead, and cumulative trajectory dollar costs.”
01 / THE REASONING
Why this made the selection.
- Pairs a bounded workflow with an offline Python checker and explicitly synthetic example inputs.
- Created for recurring evidence and comparison failures: missing facts remain unknown and every conclusion keeps its scope.
- It names a concrete failure mode: Apply provider pricing ladder to compute total dollar cost of the entire agent execution trajectory.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- skills/undominated-agent-trajectory-cost-audit/SKILL.md
- skills/undominated-agent-trajectory-cost-audit/scripts/check.py
- skills/undominated-agent-trajectory-cost-audit/examples/synthetic.json
Our findings
- First-party resource authored by Undominated.ai; this is our own verification record, not an independent endorsement.
- The download preserves the complete source and supporting files. Its manifest hashes identify the exact bytes.
- One input rule the file states is: `promptPerMillion`: non-negative decimal string.
- One condition that blocks a pass is: Turn count ({len(parsed_turns)}) exceeds maxTurns ({max_turns}).
Not established by this review
- Model compliance with these instructions on arbitrary tasks
- Native integration in every agent host
- Public GitHub source identity
- Remote installation through the standard Skills CLI
- The new npm resource CLI installation
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Add a skill to your workflow.
- Download the complete bundle from https://undominated.ai/resources/skills/undominated-agent-trajectory-cost-audit/bundle.zip and extract it into a new directory.
- Place the extracted directory at .agents/skills/undominated-agent-trajectory-cost-audit/ or your host's documented skills directory. Preserve SKILL.md, scripts, examples and licence files together.
- Run the documented synthetic example from the skill directory with Python 3.10 or later before using your own evidence.
Before you start
- An Agent Skills compatible host
- Python 3.10 or later for the optional checker
THE COMPLETE REVIEWED DEFINITION
Read it before you reuse it.
Original source bytes, with attribution.
Review the host-specific setup notes above.
# Agent Trajectory Cost Audit
Audit multi-turn agent execution loops for quadratic token accumulation, retry loops, tool call overhead, and cumulative trajectory dollar costs.
## Workflow
1. Ingest turn-by-turn trajectory metrics:
- Turn index ($k = 1 \dots N$)
- Prompt tokens per turn ($P_k$)
- Completion tokens per turn ($C_k$)
- Cache read hit tokens ($H_k$)
- Tool execution indicator (was a tool invoked?)
2. Calculate trajectory cumulative metrics:
- Total un-cached prompt tokens: $\sum (P_k - H_k)$
- Total cached prompt tokens: $\sum H_k$
- Total completion tokens: $\sum C_k$
- Context growth factor: $\frac{P_N}{P_1}$
3. Apply provider pricing ladder to compute total dollar cost of the entire agent execution trajectory.
4. Verify trajectory cost remains within declared budget ceilings.
## Synthetic Input Format
JSON object with:
- `schemaVersion`: 1
- `agentName`: string
- `model`: string
- `rates`:
- `promptPerMillion`: non-negative decimal string
- `cacheReadPerMillion`: non-negative decimal string
- `outputPerMillion`: non-negative decimal string
- `turns`: list of objects, each containing:
- `turnIndex`: positive integer
- `promptTokens`: positive integer
- `cachedTokens`: non-negative integer
- `completionTokens`: positive integer
- `assertions`:
- `maxTrajectoryCostUSD`: optional decimal string (e.g. "0.5000")
- `maxTurns`: optional integer
## Exit Codes
- `0`: Valid trajectory within budget limits.
- `1`: Budget or turn ceiling breached.
- `2`: Malformed input or safety violation.
## Verification
```sh
python3 scripts/check.py examples/synthetic.json
```
The download contains SKILL.md. Extract the whole bundle; the supporting files are required. Inspect the included MANIFEST.json for file hashes.
By Undominated.ai. Exact upstream source ↗ · Licence · Attribution
SHA-256 56b247f3ceb0876fbedeba5f4c941fc39b9c0de0a7fce8c54fe6a8b904da9d60
Read the applicable licence
MIT License Copyright (c) 2026 Undominated.ai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
https://undominated.ai/resources/skills/undominated-agent-trajectory-cost-audit/definition.md
Supports: Workflow and input requirements, Stated limitations
- MIT licence ↗Checked
https://undominated.ai/resources/skills/undominated-agent-trajectory-cost-audit/LICENSE.txt
Supports: Redistribution terms and attribution
- Complete source bundle ↗Checked
https://undominated.ai/resources/skills/undominated-agent-trajectory-cost-audit/bundle.zip
Supports: Full local source, supporting files and integrity manifest