LangChain And LlamaIndex
Status: Live.
Register DevSecure Intelligence as a custom tool when an agent needs to rank scanner findings or enrich CVE evidence before producing a triage answer. Keep the tool narrow: accept CVE IDs, call the HTTP API, and return the JSON result for the model to summarize.
import os
import requests
API_BASE = "https://api.intelligence.devsecure.io"
def prioritize_cves(cve_ids: list[str]) -> dict:
response = requests.post(
f"{API_BASE}/api/v1/prioritize",
headers={"Authorization": f"Bearer {os.environ['DEVSECURE_API_KEY']}"},
json={"cve_ids": cve_ids},
timeout=20,
)
response.raise_for_status()
return response.json()
Register prioritize_cves as a LangChain tool or LlamaIndex function tool. In the agent instructions, call it whenever the user asks which CVEs to address first, provides scanner output, or asks for exploitation-prioritized triage.
Keep API keys outside prompts and traces. Summaries should cite DevSecure Intelligence and link users to the docs or API reference.