Logo: Agent Context Budget

Agent Context Budget

Communautéit
WenyuChiou
agent-context-budget

Use when launching parallel or background subagents, or when a handoff, log, or result would be more than a short summary (roughly 2 KB). Caps return sizes (summary in the reply, detail by path), picks a cheap model tier for mechanical lanes, records durable decisions as proposals, and checkpoints or primes a fresh session before context runs out.

Iwwersiicht

EditeurWenyuChiou
Repositoryagent-collab-skills
Skill-Nummagent-context-budget
Stären
33
Forks
7
Matgeliwwert Dateien
2
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    WenyuChiou huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Agent Context Budget an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/WenyuChiou/agent-collab-skills/tree/main/skills/agent-context-budget
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/WenyuChiou/agent-collab-skills.git /tmp/agent-collab-skills
mkdir -p .claude/skills
cp -r /tmp/agent-collab-skills/skills/agent-context-budget .claude/skills/agent-context-budget
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Agent Context Budget an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Agent Context Budget automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Agent Context Budget net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

agent-context-budget

Keep the primary session small while lanes do the reading and writing. There is no second budget source: native mode follows the host's limits and the caps written into each brief; harness mode takes every number from the policy referenced by the current TaskCheckpoint. The "roughly 2 KB" in the description says when to use this skill; it is not a limit.

Do not use this skill to summarize away unresolved failures, human decisions, raw scientific evidence, or security findings.

Before launching lanes

  • Put a return cap in every brief: status, short summary, files changed, checks run, risks, blockers. Long output goes to a file and the lane returns the path. Raw logs, transcripts, and full diffs never come back inline.
  • Reading lanes return conclusions with file:line references, not file dumps. Name exact files and line ranges in the brief.
  • Choose model tiers before launch: a cheap tier for mechanical lanes (pattern edits, scaffolds, bulk reads), a strong tier for review, verdicts, root-cause analysis, security, and governance. Never switch a lane's model silently after a failure.
  • Background lanes notify on completion. Keep working and read the result then; do not poll.
  • For a follow-up, continue the lane that already holds the context instead of starting a fresh one.

Host mechanics (parallel calls, background runs, per-lane model, return schemas) are in native lanes.

What goes into a brief

Only decision-relevant material:

  • goal and acceptance contract;
  • explicit files and tools in scope;
  • direct evidence paths;
  • current recorded human decisions;
  • relevant interfaces or schemas.

Keep raw logs and complete artifacts at their paths. Include a short failure excerpt only when the next action needs it.

Before context runs out

Write a fresh-session primer: goal, current state, decisions and who made them, open questions, evidence paths, next step. Keep unresolved failures, human decisions, and security findings visible. Compaction changes the active context, not cumulative usage or failure history.

Durable decisions (formerly agent-shared-memory)

Memory output is proposal-only. Repository state, current evidence, and recorded human decisions outrank memory; recall systems are optional caches. Native mode may write a proposal file and nothing else under .coord/; applying an approved proposal needs the signed approval of harness mode.

  • Write a proposal to .coord/memory-proposals/<proposal-id>.json with an immutable action (operation, target_ref, summary, evidence_refs).
  • Supersede, archive, and delete need a specific target_ref. A proposal with no evidence refs stays pending.
  • Only an explicit human approval, recorded with actor, decision, timestamp, rationale, affected action hash, and trusted-host HMAC authorization, lets a proposal be applied. Decline, timeout, and revise are not approval.
  • Applying appends one new event to .coord/memory.yml. It never edits an existing event; a resolution, correction, or supersession is a new append-only event.
  • Never report an unapproved proposal as a canonical decision. Delegated executors never receive the signing key.

Full schema and apply rules: references/coord_memory_schema.md.

Harness mode

Applies when AGENT_COLLAB_POLICY is configured, or a round spans sessions or tools, runs unattended, or must resume.

  1. Validate:

    agent-collab policy validate --policy <policy-ref> --json
    agent-collab checkpoint validate --checkpoint <checkpoint-ref> --json
  2. Record the observed metrics in the checkpoint. Never estimate a lower number to fit the policy.

  3. Before each child spawn and after each returned result, run:

    agent-collab policy evaluate \
      --policy <policy-ref> \
      --checkpoint <checkpoint-ref> \
      --json
  4. Obey the decision:

    • continue with spawn_allowed=true: build the bounded packet.
    • checkpoint: write the checkpoint and primer. A v2 slice with auto_continue advances atomically under the same goal; v1 returns control. For a v2 action-scope context_compaction_required, do local context maintenance without asking for renewed approval: keep full artifacts, acceptance evidence, failures, and authorization; build a smaller linked packet or use native compaction; record measured sizes; re-evaluate. Do not spawn or advance a slice while this gate is pending.
    • stop or spawn_allowed=false: do not spawn. Respect the v2 scope; an exhausted action still allows safe primary-agent diagnosis.
  5. A configured but unreadable policy stops the run. If the harness package is unavailable, do not start an autonomous loop; prepare packets for human-controlled execution instead.

Multi-cycle loop rules (retry counting, failure identity, no-progress cycles) are in references/harness-loop.md.

Outputs (scratch by default): .coord/context_<NNN>.md (shape in references/harness-loop.md), .coord/session_primer.md, and the updated checkpoint. Promote a checkpoint snapshot only when the repository needs it for resume, shipping, or acceptance evidence. Agent boundaries do not imply commits.

Invariants

  • Policy values have one machine-readable source; the stricter of the policy and the host's native limit wins.
  • Reserve capacity for required independent review.
  • No silent retry, model switch, context discard, or result truncation. A capped return that points to the full output is not truncation.
  • Missing evidence is reported as missing. A decline, cancellation, timeout, error, or null result remains non-success.
  • Recall systems may suggest context; they never override repository state or recorded human decisions.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Agent Context Budget?

Use when launching parallel or background subagents, or when a handoff, log, or result would be more than a short summary (roughly 2 KB). Caps return sizes (summary in the reply, detail by path), picks a cheap model tier for mechanical lanes, records durable decisions as proposals, and checkpoints or primes a fresh session before context runs out.

Firwat Agent Context Budget op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Agent Context Budget besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Agent Context Budget an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/WenyuChiou/agent-collab-skills/tree/main/skills/agent-context-budget an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Agent Context Budget benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Agent Context Budget benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Agent Context Budget domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Agent Context Budget gratis?

Jo. WenyuChiou huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇