{"uid":"cap_yZhh1nVj8i3uBTVWo3LGk","slug":"package-install-safety-preflight-check-158dcbb9","name":"Package Install-Safety Preflight Check","description":"Install-safety preflight for one dependency BEFORE pip install / npm i. Returns a safe / caution / block verdict fusing existence, OSV malware flags, typosquat distance to a popular package, a known-hallucination corpus, and freshness metadata. Supply-chain indicators, not a guarantee.","url":"https://api.agentstools.dev/pkg/preflight?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["ecosystem","name"],"properties":{"name":{"type":"string","description":"Package name to screen"},"ecosystem":{"enum":["npm","pypi"],"type":"string","description":"Package ecosystem (aliases: pip/python, node)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":{"p10Cents":"3.0000","medianCents":"3.0000","p90Cents":"3.0000","minCents":"3.0000","maxCents":"3.0000","p95Cents":"3.0000","sampleCount":1,"varies":false,"failureChargeRate":1},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_71kjnjNUPeNy69g2LOPmG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs a pre-install safety check on an npm or PyPI package, returning a verdict (safe/caution/block) based on OSV malware flags, typosquat detection, hallucination corpus matching, and freshness metadata.","exampleAgentPrompt":"Before I run pip install langchain-openai, can you do a preflight safety check on that PyPI package — tell me if it's safe, a possible typosquat, flagged for malware, or just a hallucinated name?","exampleUseCases":null,"resultDescription":"A JSON object containing a verdict field (safe, caution, or block), OSV malware flag status, typosquat distance score relative to popular packages, whether the package name appears in a known AI-hallucinated package corpus, freshness/existence metadata, and a note that these are supply-chain indicators rather than guarantees.","failureModes":["Unknown or unsupported ecosystem name — ecosystem must be 'npm' or 'pypi'","Package name missing from query — 400-level error returned","Registry lookup timeout causing incomplete verdict","OSV database temporarily unavailable, resulting in partial signal","Very new package with no metadata may return low-confidence freshness result"],"whenToPreferThis":"Use this endpoint when an AI agent is about to suggest or execute a `pip install` or `npm install` command and needs a fast supply-chain safety gate before proceeding. Ideal for agentic coding workflows where hallucinated package names or typosquatted dependencies are a real risk. Prefer this over a generic vulnerability scanner when you need a single-call preflight that fuses existence, malware, typosquat, and hallucination signals in one verdict.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:47:12.399Z","isFirstParty":false,"canonicalSlug":"package-install-safety-preflight-check-158dcbb9"}