Логотип Agent Context Budget

Agent Context Budget

Спільнота
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.

Огляд

ВидавецьWenyuChiou
Репозиторійagent-collab-skills
Назва навичкиagent-context-budget
Зірки
33
Форки
7
Файли в пакеті
2
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 2

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: WenyuChiou. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Agent Context Budget у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/WenyuChiou/agent-collab-skills/tree/main/skills/agent-context-budget
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Agent Context Budget в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Agent Context Budget, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Agent Context Budget не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ 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.

Навіщо використовувати Agent Context Budget у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Agent Context Budget — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Agent Context Budget у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/WenyuChiou/agent-collab-skills/tree/main/skills/agent-context-budget. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Agent Context Budget?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Agent Context Budget?

Зі скількома забажаєте. У TypingMind ви можете використовувати Agent Context Budget із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Agent Context Budget?

Так. На GitHub цю навичку публікує WenyuChiou за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇