Skip to content

[New Skill]: Token Cost Hard-Limit Dashboard / Task Killer #23

@rosspeili

Description

@rosspeili

Skill Name

monitoring/token_hard_limit

What should this skill do?

The Problem: With agents operating semi-autonomously in iterative loops, companies are seeing "runaway" agent costs where an agent burns thousands of tokens on a low-value task without succeeding. Token shortages mean every token must have ROI.
The Solution: An active observability skill that essentially acts as a "Task Killer". If an agent exceeds a predefined maximum threshold of tokens/cost for a specific task without arriving at a final payload, this skill intercepts the context window and gracefully hard-kills the agent loop, returning a standardized error payload to the user dashboard.

Documentation Requirement:
When submitting a Pull Request for this skill, the contributor must provide:

  1. A reference card at docs/skills/token_hard_limit.md detailing how the cost metrics are calculated per-model.
  2. Updates to docs/skills/README.md introducing the monitoring category.
  3. Example usage in examples/ showing how to inject this monitoring skill into a high-risk autonomous loop.

Ideal Inputs & Outputs

Input:
{
"task_id": "scrape_amazon_listings_101",
"current_token_count": 125000,
"max_allowed_tokens": 100000,
"roi_value_usd": 2.50
}

Output:
{
"action": "FORCE_TERMINATE",
"reason": "Token budget exceeded by 25k (ROI mismatch).",
"cost_incurred_usd": 3.75,
"timestamp": "2026-03-22T08:00:00Z"
}

Targeted Models (if applicable)

Model Agnostic (All)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestskill requestRequest for a new capability to be added.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions