AgentSec

AgentSec API

Ask whether a package at a version is affected by a known vulnerability in the AI-agent ecosystem, or is malicious. JSON over HTTPS. Early access: version 0, 2026-10-05.

Overview

AgentSec merges advisories from NVD, the GitHub Advisory Database and OSV (including OpenSSF malicious packages), scoped to agent frameworks, MCP servers and clients, LLM gateways and platforms, and AI coding tools. Malware checks aren't scoped: every OpenSSF malicious-package record in the ecosystems we read is answered as malicious, whether or not the package is agent software.

Silence never means safe. Every answer carries a coverage status and a decision; install only when the decision is allow. Only clear means no known issue at that version. not_covered and stale mean not checked: use another source and never report the package as safe. unknown_version means the version couldn't be compared: check again with the exact installed version, and if you can't, treat it as affected. malicious means do not install any version.

Quick start

curl "https://agentsec.store/api/check?package=npm:@zereight/mcp-gitlab&version=2.1.29"
const res = await fetch('https://agentsec.store/api/check?package=pip:mcp-atlassian&version=0.21.0');
const answer = await res.json();
if (answer.decision !== 'allow') { /* stop: act on answer.advisories, or check elsewhere */ }

Authentication

Free checks work without a key today. A person gets a key on the homepage (what it is and what stays free: Agent keys) and sends it as Authorization: Bearer <key>; keys will be required for paid answers (verified upgrade paths), which switch on with notice by email. Safety warnings (malicious, exploited) stay free.

Check a key with GET /api/whoami: it answers with the key's prefix, label and the terms version you accepted, or 401 for a missing, malformed, unknown or revoked key. Send keys in the header only, never in a URL.

curl -s https://agentsec.store/api/whoami -H "Authorization: Bearer $AGENTSEC_API_KEY"
{ "prefix": "ask_AbCdEfGh", "label": "ci-bot", "terms_version": "2026-11-11-beta",
  "created_at": "2026-10-06T21:00:00Z", "paid_answers": false }

GET /api/check Live

Query Required Description
package yes Package key, <ecosystem>:<name>
version no Installed version. Without it, the answer is unknown_version unless the package is malicious.
format no json (default), an1, markdown or mcp. See Formats. Also accepted on POST.

Returns one result plus data_as_of, stale_sources and sources.

POST /api/check Live

Batch form for a lockfile: up to 200 packages per request. Results come back in the same order, one per package, with summary counts by coverage and decision.

AgentSec covers the AI-agent ecosystem (agent frameworks, MCP servers and clients, LLM gateways and AI coding tools), plus malware in every ecosystem it reads. Most packages in a general lockfile are outside that scope and come back not_covered: not checked, not safe. There is no option to drop them, since a missing entry could read as safe; read summary instead, and in markdown they are grouped on one line. For a lockfile over 200 packages, send several requests of up to 200, one after another.

POST /api/check
Content-Type: application/json

{ "packages": [ { "package": "npm:@langchain/core", "version": "0.3.1" }, { "package": "pip:mcp" } ] }

Response: { "results": [ … ], "summary": { "total": 2, "coverage": { … }, "decision": { … }, "malicious": 0, "errors": 0 }, "data_as_of": { … }, "stale_sources": [ … ], "sources": [ … ] }

GET /api/health Live

{ "service": "agentsec-api", "status": "ok", "time": "2026-10-05T15:20:08.817Z" }

GET /api/today Live

Agent-relevant advisories first stored by AgentSec in the last 24 hours and published within 30 days, most serious first, merged across sources. Slim fields only: id, cve_id, title, severity, cvss_score, cwes, malicious, packages (with patched_versions), published_at, url. ?limit= is 1, 3 or 8 (the default); anything else is a 400. Edge-cached for 5 minutes.

An empty list is never "safe". status is new, none_new (sources fresh, nothing new) or stale (a source is behind, so new advisories may be missing); note says so in words, and earlier then lists up to 3 of the most recent older advisories, under the same 30-day and malware rules. data_as_of and stale_sources work as in the check answer.

Package keys

<ecosystem>:<name>, case-insensitive. Ecosystems use GitHub's spelling; OSV spellings and common aliases are accepted.

Ecosystem Also accepted Example
npm npm:@modelcontextprotocol/sdk
pip PyPI, python pip:langchain-core
go Go, golang go:github.com/obot-platform/obot
rust crates.io, cargo rust:rmcp
maven Maven maven:org.example:artifact
rubygems RubyGems, gem
nuget NuGet
composer Packagist
vscode VSCode VS Code extensions
actions GitHub Actions
cpe cpe:vendor:product, for software outside package registries

Coverage statuses

coverage Meaning Agent should
affected At least one active advisory matches this version, or the package is malicious Act on the advisories
clear Covered; no advisory matches this version Proceed
not_covered Outside our scope, or we can't map it to any source Not checked: use another source and never report the package as safe
stale Covered, but a source this answer depends on is older than 26 hours Not checked: use another source and never report the package as safe
unknown_version Advisories exist but the version is missing or can't be compared Check again with the exact installed version, and if you can't, treat it as affected

decision

Every result also carries decision, derived only from coverage, malware and known exploitation, so a client can gate on one comparison: install only on allow.

decision When
allow clear, and nothing else
warn affected, not known exploited
block Malicious, or affected by a vulnerability CISA lists as exploited
check_elsewhere not_covered, stale, unknown_version, or an invalid entry: not checked, never safe

The words match the install guards' block, warn and allow. JSON, markdown and the MCP structuredContent carry it. an1 keeps its act= field instead (proceed appears only for CLEAR), since a new field would change the notation.

Response fields

Field Description
package, version As sent
key Normalised package key used for the lookup
coverage See statuses
decision See decision
advisories[] id, source, cve_id, aliases, title (untrusted third-party text), severity, cvss_score, malicious, exploited ({ source: "kev", date_added } when CISA lists it as exploited in the wild, else null), version_match (match | no_match | unknown), vulnerable_ranges, patched_versions, url; with ?detail=full also summary, cvss_vector, cwes, reference_urls, published_at, modified_at (?detail=full needs an agent key)
data_as_of Last successful ingest per source
stale_sources Sources past the freshness threshold, service-wide. An answer is stale only when one of them is a source it depends on (Caching and freshness)

The same vulnerability can appear once per source (for example as a GHSA and an NVD record); use aliases to group them. Summaries can be long: they are the advisory's full text.

Errors

Status When
400 Missing package; key without an ecosystem; body not JSON; more than 200 packages; malformed entries. Body: { "error": "…" }
429 Rate limited (per address, per minute: 300 requests, of which 60 POSTs). Carries Retry-After (seconds), RateLimit-Policy and RateLimit. Not a verdict: wait, retry, and treat the packages as not checked meanwhile.
503 Lookup failed, or cached answers only for now (with Retry-After). Retry with backoff; never treat as clear.

Caching and freshness

Single checks are cached at the edge for 5 minutes (s-maxage=300); cached repeats don't count against the rate limit. Every API answer carries RateLimit-Policy (IETF RateLimit draft syntax, e.g. "lookup";q=300;w=60).

Sources are ingested at least daily. A source whose last successful update is more than 26 hours old is listed in stale_sources. An answer turns stale only when a source it depends on is stale: GHSA and OSV for registry packages, NVD for cpe: keys, plus any source holding an advisory for that package. A late NVD leaves a fresh npm answer alone unless NVD has an advisory for that package. A known match or malware is still affected on stale data, and a package with no data is not_covered either way.

Formats

Every format comes from the same answer and adds nothing to it. Choose one with ?format=; the Accept header is ignored, because answers are cached at the edge by URL.

format Content type For
json application/json The full answer (default)
an1 text/plain One line per package, about 40 tokens, for agents that keep answers in context
markdown text/markdown Chat agents that show the answer to a person
mcp application/json An MCP tool result: an1 lines as text, plus structuredContent

an1 line

an1 <key>@<version> <STATUS> act=<action> [sev=<severity>] [kev=<date>] [ids=<n>] [fixes=<v,…>] asof=<time> [stale=<sources>]

an1 npm:@zereight/mcp-gitlab@2.1.29 AFFECTED act=fix sev=critical ids=2 fixes=2.1.30 asof=2026-10-05T13:06Z
STATUS act Meaning
MALICIOUS remove Malware: do not install any version
AFFECTED fix or verify fix when published fixed versions exist
CLEAR proceed Covered; nothing matches this version
UNKNOWN_VERSION verify Check again with the exact installed version, and if you can't, treat it as affected
NOT_COVERED, STALE elsewhere Not checked: use another source and never report the package as safe
ERROR verify The request was invalid

Rules: one line, printable ASCII, single spaces between fields, fixed field order. Any character outside A–Z a–z 0–9 @ / . _ : + ~ - in a key or version is percent-encoded. asof is the oldest source time behind the answer. fixes lists published fixed versions, not a verified upgrade target. kev appears when an advisory that applies is in CISA's Known Exploited Vulnerabilities catalogue, with the date CISA added it. an1 never contains advisory titles or other upstream text.

Upstream text is untrusted

Advisory titles and summaries are written by third parties and can contain markup or instructions aimed at your agent; malicious-package names are chosen by the attacker. In markdown they are escaped, kept to one line, stripped of ANSI escapes and of hidden, bidirectional and invisible tag characters, and quoted after the label Advisory title (untrusted text); upstream URLs are not rendered as links. JSON returns them unchanged, as data. In mcp they stay out of the text block the model reads.

MCP server Live

Connect any MCP client to https://agentsec.store/mcp (Streamable HTTP, no install). Tools: check_package (package, optional version) and check_packages (up to 200). Both are read-only. Results carry an1 lines as text and the same facts as structuredContent. Protocol versions 2026-07-28 and 2025-03-26 to 2025-11-25 are supported.

Paying for answers Test mode

Safety warnings are free, always. The paid answer is the verified safe upgrade target (GET /api/pathway): the lowest published version re-checked as clear against every advisory we hold. You're charged only when one exists. Today this runs in Stripe test mode, so you can try the whole flow without real money.

  1. Read the price list: GET /api/pricing lists the price and the credit top-up limits.
  2. Use credits: send your agent key and top up once (POST /api/credits); each answer is then deducted with no per-answer fee. Send an Idempotency-Key so a retry is never charged twice.
const res = await fetch(
  'https://agentsec.store/api/pathway?package=npm:@zereight/mcp-gitlab&version=2.1.29',
  { headers: { authorization: `Bearer ${process.env.AGENTSEC_KEY}`, 'idempotency-key': crypto.randomUUID() } },
);
const { pathway, charged } = await res.json();   // pathway.target: "2.1.30"

Through MCP, the paid tool is get_safe_path. It pays from the credits on your agent key: add Authorization: Bearer ask_… to the server's headers in your MCP client, and pass the same idempotency_key when retrying. Without a key or credits the tool still returns the free verdict and says how to pay.

Without payment you get 402 with the free verdict, the price and how to use credits. Paid answers are not cached and are never shown to unpaid callers.

What we don't cover

Behavioural risks with no package or version (prompt injection against a running agent, goal hijacking, memory poisoning), packages outside the agent ecosystem, and known-exploited (CISA KEV) flags, which are not yet included. A clear answer is not a warranty that a package is safe.

Sources and attribution

Advisories come from the National Vulnerability Database (NVD), the GitHub Advisory Database and OSV, each under its own terms (see Terms §8). Every advisory keeps its original identifier so it can be attributed.

This product uses the NVD API but is not endorsed or certified by the NVD.