
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
cap-shield
Advanced tools
Context selection for AI agents. Measured, not estimated.
pip install cap-shield
from cap_shield import CapShield
cap = CapShield(api_key="cap_live_...")
cap.remember("support", "Customer reports a delayed parcel, order 4471")
ctx = cap.context("support", "what did the customer complain about?")
print(ctx.text) # send this to your model
print(ctx.saving_pct, "%") # how much you did not send
print(ctx.left_behind) # ...and how many entries were left behind
Your agent's history grows every turn, and the whole thing is billed on every call. This selects what answers the question and leaves the rest.
Measured on our corpus with cl100k_base: 80.5 % of context not sent
at a 1000-token budget. Measured on LongMemEval-S, 500 questions:
93.8 % retrieval recall against 51.9 % for word matching.
That second number is the one that matters. A saving is worthless if what was dropped is what your agent needed — so we publish both.
It does not call your model. ctx.text goes to Claude, GPT or whatever
you use. This library never sees your model provider's keys.
It is not a proxy. Your uptime does not depend on ours for the model call itself.
No account, no key:
from cap_shield import measure, print_measurement
print_measurement(measure(
texts=["...your actual messages..."],
query="what your agent would search for"))
Runs on your own traffic and stores nothing — the text is compressed in memory, the numbers computed, and everything discarded. No dictionary is trained on it.
Rate limited to 20 measurements per hour per IP. Enough to evaluate, not enough to use the service for free.
context() saves tokens — what your model is billed for.
pack() saves bytes — bandwidth and storage. The packet is
decompressed before the model sees it, so it saves no tokens.
Conflating them is the most common misunderstanding about this product.
https://cap-shield-robin.fly.dev/docs/quickstart
The package also contains an MCP server. Five tools, no extra dependencies, and two of them work without an account.
pip install cap-shield
{
"mcpServers": {
"cap-shield": {
"command": "python",
"args": ["-m", "cap_mcp"],
"env": {
"CAP_SHIELD_API_KEY": "cap_live_..."
}
}
}
}
The env block is only needed for remember and assemble_context.
Leave it out and measure_traffic and list_packages still work.
Source and docs: https://github.com/robinlidberg-dot/cap-shield-mcp
The server can also be fetched as a single file, for anyone who would rather not install a package:
curl -O https://cap-shield-robin.fly.dev/cap_mcp.py
FAQs
Context selection and compression for AI agents — measured, not estimated
We found that cap-shield demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.