Session Breakdown logo

Session Breakdown

Organization
AMD-AGI
session_breakdown

Build a single self-contained `session_breakdown.json` capturing every fact a dashboard needs about one hyperloom optimization session. Use when the user mentions session-breakdown, kernel attribution, a stats/reporting service, capability summary, or wants to surface hyperloom data to an external consumer (a results/stats service, notebook, dashboard).

Overview

PublisherAMD-AGI
RepositoryHyperloom
Skill namesession_breakdown
Stars
250
Forks
74
Bundled files
76
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 76 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AMD-AGI on GitHub. Read the source before you install it.

Installation

Install the Session Breakdown AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AMD-AGI/Hyperloom/tree/main/src/hyperloom/inference_optimizer/breakdown
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AMD-AGI/Hyperloom.git /tmp/Hyperloom
mkdir -p .claude/skills
cp -r /tmp/Hyperloom/src/hyperloom/inference_optimizer/breakdown .claude/skills/session_breakdown
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Session Breakdown in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Session Breakdown on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Session Breakdown is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Session Breakdown Skill

What it produces

A single JSON file: <session_dir>/session_breakdown.json.

  • Schema: hyperloom.session_breakdown.v6.1 (hardcoded; see SCHEMA_VERSION in breakdown/schema.py).
  • Producer: src/hyperloom/inference_optimizer/breakdown/exporter.py
  • Filename: BREAKDOWN_FILENAME (= session_breakdown.json)

Beyond the envelope (schema_version / exported_at_utc / exporter_version), the JSON carries the sections below. This is the subset most consumers use, not the full set — breakdown/exporter.py (the breakdown = {...} literal) and breakdown/schema.py are authoritative.

SectionWhat it carries
schema_versionThe wire contract. Gate features on the major version, not the exact string.
exported_at_utcWhen this export was built.
exporter_versionWhich exporter built it.
metadataSession identity, launch configuration, grading -- the mode marker the session started in, not the axis promotions were decided on (outcome.validation.graded_on) -- component versions, Langfuse receipt, and warnings, how the export itself went, reported once and only here.
outcomeTerminal status, stage reached, stop reason, the baseline and final measured results with the graded axes each reported, the validation that reconciles the stack's parts against its total on one axis, named by graded_on, and variants, the framework phase's bench runs counted by how each ended.
timelineThe run itself: one event per stage, oldest first, each carrying its span, status, and an ext block of what that kind of stage records. Startup source events live under reports/sbd_v6/timeline/.
closeWhat the session settled at close: the steps the sequencer ran and the artifacts it published.
criticThe critic agent's own run, iteration by iteration: what it was asked about, how its rulings fell (verdict_counts), and the four artifacts each pass left behind. Per-proposal verdicts stay with the proposals, on the timeline.

Who reads it

  • A downstream stats/reporting service — primary consumer. Replaces the MAE-synthesized raw_report / fact_sheet. Recommended read order: prefer session_breakdown.json if present, fall back to legacy MAE output otherwise.
  • Offline / notebook analysis — single file, easy to load, no DB needed.

When to refresh (LLM Orchestrator decision tree)

The Coordinator's cli.py finally block writes session_breakdown.json unconditionally at end-of-session — that's the safety net. But you should ALSO refresh it eagerly when downstream dashboards may be watching this session live:

  1. Always at end-of-session (handled by cli.py finally — you do not need to dispatch this).
  2. After every KEEP'd explore, specialist, framework, or kernel result whose benchmark changed the final stack.
  3. After a successful sweep or conc_sweep when a live dashboard is observing this session.
  4. Never mid-action — collectors expect a coherent state snapshot.

Dispatch action session_breakdown — a single 1-minute action, no inputs required.

How to invoke

LLM-driven (Coordinator action)

yaml
# Issue an action intent like any other action
{ "action": "session_breakdown", "params": {} }

Code-driven (Python import)

python
from hyperloom.inference_optimizer.breakdown import build, write_breakdown_json

# Just compute the dict (no side effects)
breakdown = build("/workspace/hyperloom")

# Compute + atomically write to <sd>/session_breakdown.json
out_path = write_breakdown_json("/workspace/hyperloom")

CLI / offline (hyperloom session breakdown)

bash
# Live session in this sandbox
python -m hyperloom session breakdown

# Historical session on a shared filesystem
python -m hyperloom session breakdown \
    --session-dir /shared/hyperloom-sessions/<user>/<sid>

# Override output path (e.g. write to a staging area)
python -m hyperloom session breakdown \
    --session-dir <SD> --output /tmp/breakdown.json

Bulk historical (operator)

bash
for d in /shared/hyperloom-sessions/*/*; do
    [ -d "$d" ] || continue
    python -m hyperloom session breakdown \
        --session-dir "$d" > /dev/null
done

Field reference (what comes from where)

The collector for each section reads only from the listed sources. All collectors are pure functions; failure in one section never poisons another (each becomes a warnings[] entry instead). Like the table above, this reference is partial — breakdown/exporter.py is authoritative.

SectionRead from
metadatamanifest.json + state.json, overlaid by the recorder's own session / task_config / grading / versions fragments. grading is recorded only: the axis is resolved at seed, where the run can still see its own configuration, and re-deriving it here would read the exporting subprocess's environment
outcomeThe recorder's close and stack fragments, plus state.{current_best, cumulative_gain_validated, optimization_stack} for the sessions that predate them
timelineThe event fragments in the spool, closed and assembled per event; orphans left open by a killed phase are closed on first build
closeThe CLOSE sequencer's own close / close_step fragments
criticcritic-workdir/<NNN>/{request,judge_bundle,emit,review}.json, recorded as each pass returns

What is NOT in scope

  • Real-time event streaming — use claw_session_events for that.
  • LLM-based attribution — every collector is deterministic / rule-based. Attribution is delta_pct math, not natural language.
  • Schema migration — consumers MUST check schema_version and gate features on it, comparing the major version (vN) rather than the exact string: the producer emits both …v2 and …v3.0 today (see Versioning policy) and they are wire-compatible.
  • Cross-session aggregation — one file per session. Use a Jupyter notebook or downstream analytics job for fleet views.

Failure modes

SymptomCauseMitigation
warnings: ["state.json missing"]Session was created (manifest written) but Coordinator.save() never ranSections fall back to manifest-only data.
warnings: ["manifest.json missing"]Session was created without the standard cli.py path (rare)session.session_id falls back to state.session_id.
optimizations.available = falseNo operations were recorded, or the projection failedRead unavailable_reason. The empty arrays mean unknown, not none; a warnings entry says whether state.json knew of adopted work the recorder missed.
optimizations.validation.unclaimed_integration_count > 0A change recorded as integrated has no adoption crediting itThe adoption write was lost. unattributed_gain_pct is overstated by whatever those steps earned.
optimizations.entries[].gain_method = local_gain_projectedThe step recorded no finishing throughputIts gain is projected from the executor's own percentage, not measured against the chain.
kernel_lifecycle.detected = []profile action never ran or its benchmark_report.json had no kernel_summaryRe-run profile, or fall back to recommended from state.last_trace_analyze.
Large warnings[]Multiple JSON parse failures on optimization_attempts.jsonlInspect kernel-agent-workspace/.../logs/ for the corresponding kernel-agent CLI logs.

Versioning policy

  • schema_version (in schema.py) carries the major contract version; it is bumped ONLY on breaking changes (renamed/removed fields, changed semantics), apart from the declared 6.1 changes below.
  • New exports carry hyperloom.session_breakdown.v6.1. 6.1 changes three things inside the 6 major, a declared exception to the major-bump rule: it renames one key, removes keys no producer populated (disposition: removed in 6.1, never populated) or that only carried a constant (roofline_measured, the baseline action's convergence; disposition: removed in 6.1, constant), and reports attributed_gain_pct, unattributed_gain_pct and run empty as null when unmeasured or not provided. throughput_tok_s_per_gpu in outcome.baseline, outcome.final and the baseline event measurement is now output_throughput, and the old key is no longer written. Archived 6.0 documents and 1.1.x exports keep the old key, so readers must accept both or migrate. Re-exporting a 6.0 session directory yields a null outcome.baseline.output_throughput, keeps the session's old contract_digest, and overwrites the archived file at the default output path.
  • V6 was a breaking cutover for the timeline: the actions record their own events as they run, so an event's start_time is when the work began rather than when its artefacts were written, and the KERNEL and BASELINE projections are gone. Consumers that sorted around the old collapsed windows need to be rechecked.
  • Inside v6, enablement gained the round ledger: rounds[] and its counters are added to the block, and the three state-sourced fields they replace (stall_streak, inflight_task_id, dispatch_tick) are no longer emitted. The block is runtime observability that is already {} on a session that ran no enablement, so it carries no field a consumer can gate a version on; the disposition of each replaced field is in docs/reference/session-breakdown.md.
  • V5 was the preceding cutover, for optimization results: optimizations is reshaped, and the optimization_stack, attribution, geak_invocations, forge_invocations, and gemm_tuning projections are gone. Consumers MUST match on the vN major prefix, never on exact-string equality, and archived V2/V3/V4/V5 documents need a migration before a V6 reader sees them.
  • optimizations carries its own schema_version (currently 5), independent of the envelope's.
  • Adding optional fields is never a breaking change.
  • exporter_version tracks the exporter implementation independently; consumers can ignore it.

Testing

Each collector has a unit test under src/hyperloom/inference_optimizer/tests/ that runs it against a fixture session_dir tree. An end-to-end test calls build(...) on a fully-populated fixture and JSON-schema-validates the result. Run:

bash
pytest src/hyperloom/inference_optimizer/tests/ -k breakdown -v

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 16 more files.

Frequently asked questions

What does the Session Breakdown AI skill do?

Build a single self-contained `session_breakdown.json` capturing every fact a dashboard needs about one hyperloom optimization session. Use when the user mentions session-breakdown, kernel attribution, a stats/reporting service, capability summary, or wants to surface hyperloom data to an external consumer (a results/stats service, notebook, dashboard).

Why use Session Breakdown on TypingMind?

Because you install it once and use it with any model. Session Breakdown is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Session Breakdown in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AMD-AGI/Hyperloom/tree/main/src/hyperloom/inference_optimizer/breakdown. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Session Breakdown?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Session Breakdown?

As many as you like. As long as a model supports skills, you can use Session Breakdown with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Session Breakdown AI skill free?

It is published on GitHub by AMD-AGI. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇