kayba-agent-instructions

kayba-agent-instructions is a command for Claude Code from kayba-ai/agentic-context-engine. It costs 0 tokens per session (603 once invoked), scanned A, original, Apache-2.0.

A command-line client for Kayba, a hosted service that stores traces and generates insights from them. Traces are recorded examples of an agent or pipeline's activity.

In plain words
What is it for?
Use it to upload and inspect trace files, run insight-generation pipelines, list generated insights, and accept or reject them with notes.
Why use it?
It provides one interface for uploading, reviewing, processing, and triaging those records instead of managing them manually through separate requests.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

About the project

Agentic Context Engine is an open-source engine that gives AI agents a persistent learning loop, helping them remember successful strategies and learn from failures across sessions. It is used to improve production agents, and also powers Kayba’s hosted service. Catalogue add-ons support workflows for operating and configuring the engine.

kayba-ai/agentic-context-engine · 2,564 stars · on GitHub · kayba.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kayba-ai/agentic-context-engine/kayba-agent-instructions
Clone the repo
git clone --depth 1 https://github.com/kayba-ai/agentic-context-engine

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kayba-agent-instructions

README.md
[![agentmods](https://agentmods.dev/badge/commands/kayba-ai/agentic-context-engine/kayba-agent-instructions.svg)](https://agentmods.dev/commands/kayba-ai/agentic-context-engine/kayba-agent-instructions)
Your own site
<a href="https://agentmods.dev/commands/kayba-ai/agentic-context-engine/kayba-agent-instructions"><img src="https://agentmods.dev/badge/commands/kayba-ai/agentic-context-engine/kayba-agent-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 603 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00603
Opus 5 $0.00000 $0.00302
Sonnet 5 $0.00000 $0.00121
Haiku 4.5 $0.00000 $0.00060

Measured 6d ago against content hash 4bf8f961dd7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

kayba-agent-instructions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ace/cli/commands/kayba-agent-instructions.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kayba CLI

The kayba CLI interacts with the Kayba hosted API (https://use.kayba.ai). Auth: set KAYBA_API_KEY env var or pass --api-key to every command.

Commands

kayba traces list [--json]               List uploaded traces
kayba traces show <id> [--meta] [--json] View a trace
kayba traces upload <paths...>           Upload trace files/dirs (or - for stdin)
  --type [md|json|txt]                   Force file type (auto-detected by default)
kayba traces delete <ids...> [--force]   Delete traces

kayba run                                Run pipeline (interactive trace selector)
  --traces ID  --all  --model MODEL  --epochs N
  --reflector-mode [recursive|standard]  --anthropic-key KEY
  --wait  --json

kayba insights generate                  Trigger insight generation
  --traces ID  --model MODEL  --epochs N  --reflector-mode [recursive|standard]
  --anthropic-key KEY  --wait

kayba insights list                      List insights
  --status [pending|new|accepted|rejected]  --section NAME  --json

kayba insights triage                    Accept/reject insights
  --accept ID  --reject ID  --accept-all  --note TEXT

kayba prompts generate                   Generate prompt from accepted insights
  --insights ID  --label NAME  -o FILE

kayba prompts list                       List prompt versions

kayba prompts pull                       Download a prompt
  --id ID  -o FILE  --pretty
kayba prompts install                   Install a generated prompt into an agent file
  --target TARGET  --file PATH  --id ID  --input FILE

kayba status <job-id>                    Check job status
  --wait  --interval N

kayba materialize <job-id>               Materialize results into skillbook

kayba integrations list [--json]         Show configured integrations
kayba integrations configure <name>      Configure mlflow or langsmith
kayba integrations test <name>           Test integration connection

kayba batch <paths...>                   Pre-batch traces for Recursive Reflector
  --apply FILE  --upload  --min-batch-size N  --max-batch-size N

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 71 lines · 0 tokens per session scan A 4bf8f961dd7e

Subscribe to this mod's changes

kayba-agent-instructions is a command published in the GitHub repository kayba-ai/agentic-context-engine (2,564 stars, last pushed 8d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 603 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.