AI engineer shipping agents
You get: an AI bill of materials for your agent, a map of where untrusted input can travel, and the one edge to fix first. You need: a current browser. Nothing is installed and no account is needed.
1. Scan the sample agent (2 minutes)
Section titled “1. Scan the sample agent (2 minutes)”- Download trip-planner.zip: a FastAPI trip planner whose GPT-4o agent searches the web and books trips through tools, with a calendar MCP server in
.mcp.json. Its code is shown below. - Open keryn.app. Under Scan, choose File and drop the zip on the box. The scan runs in your tab.
2. What your agent is made of (3 minutes)
Section titled “2. What your agent is made of (3 minutes)”Open AI-BOM:


| Asset | Type | Where |
|---|---|---|
| gpt-4o | model | trip/agent.py:19 |
| openai 1.40.0 | library (LLM SDK) | requirements.txt:2 |
| calendar | service (MCP server) | .mcp.json:3 |
| Claude and Claude Code | service (AI coding tool) | .mcp.json |
The .mcp.json file is what a coding agent reads, so the calendar server is part of what your developers’ agents run. The badge on each row is the worst finding in the files that use it. Share and export downloads the list as a CycloneDX 1.6 AI-BOM.
3. Where untrusted input can go (4 minutes)
Section titled “3. Where untrusted input can go (4 minutes)”Go back to Decision and choose Open the trust map:


The map puts each part in a zone (the public internet, AI processing, outside services) and draws an edge wherever one can reach, call or send to another. Dashed edges are inferred from the code. Fix here marks the edge where one control would cut the riskiest path: here, the agent’s call to the calendar server, which runs through npx with no pinned version. That is also the scan’s only error.
Show riskiest path in the repository takes you to the lines. Edit proposed model lets you correct what the scan inferred, for example mark an edge that already needs a person’s approval.
What the map reads
Section titled “What the map reads”The map reads Python, JavaScript/TypeScript, Java, Kotlin, C# and Go source, and tool declarations kept as OpenAI-style JSON (a *tools*.json file). A framework’s tools and entry points are read only when the file imports that framework. Tools: LangChain and LangGraph (including plain functions given to ToolNode, bind_tools or create_react_agent, also from another module), OpenAI Agents SDK, Vercel AI SDK, Mastra, MCP SDKs, Pydantic AI, LlamaIndex, CrewAI, smolagents, AutoGen and AG2, Google ADK, Semantic Kernel, and the OpenAI, Anthropic and Gemini tool schemas. Entry points: FastAPI, Flask, Quart, Starlette, aiohttp, Django, Streamlit, Chainlit and Gradio in Python; Next.js, Express, Hono, Fastify and Koa in JavaScript and TypeScript. In Java and Kotlin: @Tool methods of Spring AI and LangChain4j, and Spring MVC routes. In C#: Semantic Kernel [KernelFunction] methods, Microsoft.Extensions.AI AIFunctionFactory.Create tools and ASP.NET minimal-API routes. In Go: tools of the MCP Go SDKs (mark3labs/mcp-go and the official go-sdk), and net/http and gin routes. A tool or route the map does not show is not proof it is absent.
4. A second opinion (1 minute)
Section titled “4. A second opinion (1 minute)”Investigate with AI on the Decision view shows recorded example reviews until you add your own model key under Settings, Connectors. With a key, a model you choose reviews up to 60 findings; nothing is sent until you press the button, and a verdict never changes a finding’s evidence level.
The sample’s code
Section titled “The sample’s code”These are the files in trip-planner.zip, from the Trust Canvas journey, which models the same agent by hand.
from fastapi import FastAPIfrom pydantic import BaseModel
from trip.agent import plan
app = FastAPI()
class Chat(BaseModel): message: str
@app.post("/chat")def chat(body: Chat) -> dict: return {"reply": plan(body.message)}import smtplibimport sqlite3import urllib.requestfrom email.message import EmailMessage
def search_pages(url: str) -> str: """Read a travel page the user pointed at.""" with urllib.request.urlopen(url, timeout=10) as resp: return resp.read().decode("utf-8", "replace")[:20000]
def book_trip(destination: str, traveller: str) -> int: """Create a booking and return its id.""" db = sqlite3.connect("bookings.db") cur = db.execute("INSERT INTO bookings (destination, traveller) VALUES (?, ?)", (destination, traveller)) db.commit() return cur.lastrowid
def send_itinerary(to: str, body: str) -> None: """Mail the itinerary to an address.""" msg = EmailMessage() msg["To"], msg["From"], msg["Subject"] = to, "trips@example.invalid", "Your itinerary" msg.set_content(body) with smtplib.SMTP("localhost") as smtp: smtp.send_message(msg)import jsonimport os
from openai import OpenAI
from trip import tools
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
TOOLS = {"search_pages": tools.search_pages, "book_trip": tools.book_trip, "send_itinerary": tools.send_itinerary}
def plan(message: str) -> str: messages = [ {"role": "system", "content": "You plan trips. Use the tools when the traveller asks."}, {"role": "user", "content": message}, ] for _ in range(5): reply = client.chat.completions.create(model="gpt-4o", messages=messages, tools=[ {"type": "function", "function": {"name": n, "parameters": {"type": "object"}}} for n in TOOLS ]) choice = reply.choices[0].message if not choice.tool_calls: return choice.content for call in choice.tool_calls: result = TOOLS[call.function.name](**json.loads(call.function.arguments)) messages.append({"role": "tool", "tool_call_id": call.id, "content": str(result)}) return "I could not finish planning."{ "mcpServers": { "calendar": { "command": "npx", "args": ["-y", "@example/calendar-mcp"] } }}fastapi==0.115.0openai==1.40.0With the CLI (pre-release builds)
Section titled “With the CLI (pre-release builds)”With a pre-release build, the same scan writes the AI-BOM as CycloneDX and the findings as JSON; these commands run against the sample in this page’s tests. Exit 1 is the gate: the unpinned MCP server is an error.
keryn scan . -q --aibom aibom.cdx.json --json result.jsonjq -r '.components[] | "\(.type) \(.name)"' aibom.cdx.json | sortjq -r '.findings[] | select(.severity == "ERROR") | "\(.ruleId) \(.path):\(.line)"' result.jsonlibrary openaimachine-learning-model gpt-4oseceng.agentcfg.mcp-npx-unpinned-package .mcp.json:3The CLI’s CycloneDX file lists the model and the SDK. The MCP server and the coding-agent configuration are in Keryn Web’s AI-BOM, and reach the CLI as findings like the one above; the CLI’s AI-BOM does not list them yet.
- The Trust Canvas: lenses, chokepoints and the hand-written model.
- Agent skills and instruction files and MCP Guard.