Technical Documentation: Arindam200/awesome-ai-apps
βΉοΈ Provenance: Multi-Tier Ingestion Β· CodeWiki Reference
Overview (README.md)
This repository is a comprehensive collection of 132 projects, tutorials, and recipes for building powerful LLM-powered applications, including text agents, voice assistants, RAG apps, and MCP-backed tools. These projects serve as a guide for developers working with various AI frameworks and stacks.
π Table of Contents
π Featured AI Apps
π§© Starter Agents
Quick-start agents for learning and extending different AI frameworks. 21 projects
- AutoGen Tool-Calling Starter: Microsoft AutoGen
AssistantAgentwith a custom tool, powered by Nebius Token Factory - AWS Strands Agent Starter: Weather report agent using AWS Strands SDK
- CAMEL AI Model Benchmark: Performance benchmarking tool comparing various AI models
- Coding Harness Starter: OpenAI Agents SDK coding loop with plan, approval-gated edits, fixed tests, and bounded review, powered by Nebius Token Factory
- CrewAI Research Crew: Multi-agent research team example
- Docker cagent Multi-Agent Starter: Open-source customizable multi-agent runtime by Docker
- DSPy Optimization Starter: DSPy framework for building and optimizing AI systems
- Google Agent Development Kit Starter: Google Agent Development Kit starter template
- Hacker News Trend Analyst (Agno): Agno-based agent for trend analysis on Hacker News
- Hugging Face smolagents Starter: Hugging Face smolagents code-first web-search agent
- KAOS Kubernetes Multi-Agent Starter: Kubernetes-native multi-agent system with MCP tools and in-cluster LLM
- LangChain Tool-Calling Starter: LangChain tool-calling agent with
create_tool_calling_agent+AgentExecutor, powered by Nebius - LangGraph ReAct Agent Starter: LangGraph prebuilt ReAct agent (
create_react_agent) with custom tools, powered by Nebius - Letta Stateful Memory Agent: Stateful agent with persistent long-term memory across sessions
- LlamaIndex Task Manager: LlamaIndex-powered task assistant
- Mastra Tool-Calling Starter: TypeScript-first agent with a custom tool powered by Nebius Token Factory
- Microsoft Agent Framework Starter: Multi-agent travel planning demos built on Microsoft Agent Framework
- OpenAI Agents SDK Starter: OpenAI Agents SDK with email helper and haiku writer examples
- PydanticAI Weather Bot: Real-time weather information agent
- Sayna Realtime Voice Agent: Real-time voice infrastructure with multi-provider STT/TTS (Deepgram, ElevenLabs, Azure, Google) and WebSocket streaming
- Semantic Kernel Starter: Microsoft Semantic Kernel
ChatCompletionAgentwith plugin-based tool calling
πͺΆ Simple Agents
Straightforward, practical use-cases for everyday AI applications. 19 projects
- Agno Agent Examples: Simple to multi-agent examples with web search and a knowledge base
- Agno Agent UI: Interactive UI for web and finance agents
- AI Agent Registry Explorer: Find and compare AI agents across NANDA, MCP, Virtuals, A2A, and ERC-8004 registries
- AI Expense Tracker: Chat-based expense tracking with Nebius Token Factory and a Postgres backend that agents provision on first run
- Calendar Assistant: Calendar scheduling integration with Cal.com
- Cost-Aware Model Router (RouteLLM): Intelligent model routing with RouteLLM (GPT-4o-mini vs Nebius Llama) for cost optimization
- Email-to-Calendar Assistant: AI-powered Gmail reader and Google Calendar manager
- Financial Reasoning Agent: Step-by-step financial reasoning demonstration
- Human-in-the-Loop Agent: HITL actions for safe AI task execution
- LangChain Operations Agent Collection: Nebius-powered incident response, support, vendor risk, and data quality agents with typed outputs and guarded tools
- Macro Event Brief Agent: Scheduled macro releases with last prints, publication times and sources, plus an optional Nebius brief that cites each record
- Mastra Weather Bot: Weather updates using Mastra AI framework
- Natural-Language Database Assistant: Natural language database queries with GibsonAI and LangChain
- Natural-Language SQL Agent (LangChain): Natural-language-to-SQL data agent with LangGraph, Nebius, read-only SQL safety, and Streamlit charts
- Nebius Chat: Chat interface for Nebius Token Factory
- Newsletter Generator: AI-powered newsletter builder with Firecrawl integration
- Stock Market Finance Agent: Real-time stock and market data tracking agent
- Stock Portfolio Analyst: Live portfolio valuation, concentration analysis, risk flags, and rebalancing ideas with Agno
- VoyageCompass Travel Planner: LangChain and Nebius travel planner with weather, research, currency conversion, budgets, and packing tools
- Web Automation Agent: Browser automation agent using Nebius and browser-use
ποΈ Voice Agents
Real-time voice assistants and streaming speech pipelines β including LiveKit, Pipecat, Gradium, and VoxCode (Deepgram + Cursor SDK). 9 projects
- AI Pitch Coach (Gradium + Nebius): Conversational pitch coach using Gradium STT/TTS, LangChain orchestration, and Nebius reasoning
- Customer Support Voice Agent (LiveKit): Nebius-powered voice support agent with context-preserving AI manager handoff, noise cancellation, and inactivity handling
- Gemini Realtime Voice Agent (LiveKit): LiveKit Agents with Google Gemini Live (
geminimultimodal realtime) for low-latency voice conversations in a LiveKit room - Healthcare Voice Contact Center: Pipecat healthcare contact center with appointment booking, FAQ handling, and supervisor escalation
- Multilingual Voice Agent (Pipecat + Sarvam): Pipecat voice pipeline with Sarvam STT/TTS and OpenAI for chat; WebRTC (browser) or Daily transport via the Pipecat runner
- RSVP Confirmation Voice Agent (LiveKit): Outbound voice agent that calls attendees, confirms RSVPs, and updates a JSON-backed event database
- Speed-to-Lead Sales Voice Agent: LiveKit-based voice agent that calls inbound leads instantly, routes them to specialists, and logs to a mock CRM
- VoxCode β Deepgram + Cursor Voice Coding Agent: Local voice workspace for codebase summaries and architecture Q&A; Deepgram Voice Agent orchestration, Nebius reasoning, and optional Cursor SDK file inspection and edits
- Web-Search Voice Agent (LiveKit): LiveKit + Gemini realtime voice agent with an Olostep-backed
web_searchtool for fresh, source-cited answers
ποΈ MCP Agents
Examples using Model Context Protocol for external tool integration. 14 projects
- Couchbase LangGraph MCP Agent: LangChain ReAct agent with Couchbase integration
- Couchbase MCP Server: Couchbase database integration with MCP protocol
- Custom MCP Server Starter: Custom MCP server implementation example
- Documentation Q&A MCP Agent: Documentation Q&A agent with MCP
- Documentation RAG MCP Server: Semantic RAG documentation and Q&A system
- GibsonAI Database MCP Agent: Conversational AI agent for managing GibsonAI database projects and schemas
- GitHub MCP Agent: Repository insights and analysis via MCP
- GitHub MCP Agent Starter: GitHub repository analyzer starter template
- Hotel Finder Agent: Hotel search and booking using MCP integration
- Sandboxed Code Execution MCP Agent (Docker + E2B): Secure AI agent for running agents in sandboxed Docker environments via MCP Gateway
- Secure Database MCP Agent (MCP Toolbox): Secure ecommerce agent over PostgreSQL and MongoDB; MCP Toolbox enforces per-user data access, least-privilege roles, and authorized tools
- Secure MCP Access Agent (ScaleKit + Exa): Security-focused MCP integration with Exa search
- Self-Healing Text-to-SQL Agent (Okahu): Self-healing Text-to-SQL demo using Okahu Cloud traces via hosted MCP
- Taskade MCP Agent: AI-powered workspace agent for managing projects, tasks, and workflows via Taskade MCP
π§ Memory Agents
Agents with advanced memory capabilities for context retention and personalization. 13 projects
- AI Research Consultant with Long-Term Memory: AI-powered consulting agent using Memori v3 as a long-term memory fabric and ExaAI for research
- arXiv Researcher Agent with Memori: Research assistant using OpenAI Agents and GibsonAI Memori
- AWS Strands Persistent Memory Agent: AWS Strands agent enhanced with the Memori memory system
- Blog Writing Agent: Personalized blog writing agent with memory for style consistency
- Brand Reputation Monitor: AI-powered brand reputation monitoring with news analysis and sentiment tracking
- Customer Support Voice Agent: Voice-enabled customer support assistant with Memori v3 and Firecrawl for knowledge base management
- Engineering Content Agent: Chat-first Agno app that turns HN demand, DEV.to supply gaps, and Weaviate Engram memory into a developer trend digest plus DevRel talk and blog ideation via Nebius
- Job Search Agent: Job search agent with memory for preference tracking
- Persistent Memory Agent (Agno): Agno-based agent with persistent memory capabilities
- Product Launch Agent: Competitive intelligence tool for analyzing competitor product launches
- Social Media Agent: Social media automation agent with memory for brand voice
- Study Coach Agent: AI-powered study coach with Memori v3 and LangGraph for multi-step verification of understanding
- YouTube Trend Agent: YouTube channel analysis agent with Memori, Agno, and Exa for trend analysis and video ideas
π RAG Applications
Retrieval-augmented generation examples for document understanding and knowledge bases. 18 projects
- Agentic RAG with Agno and GPT-5: Agentic RAG implementation with Agno and GPT-5
- Agentic Typed RAG with LlamaIndex: Typed, citation-verified RAG with structured answers, local document parsing, and deterministic refusal for weak evidence
- Codebase Q&A RAG: Conversational code explorer and documentation assistant
- Enterprise Contextual RAG: Enterprise-level RAG with managed datastores and quality evaluation
- Gemma 3 Document OCR: OCR-based document and image processor using the Gemma 3 model
- GraphRAG with Neo4j: Knowledge graph extraction and Cypher-backed retrieval with Neo4j and Nebius
- LiteParse Invoice & Receipt Auditor: Local OCR with LiteParse bounding boxes, Nebius LLM audit for math errors and duplicate charges, evidence pinning on scans, and an LLM batch summary
- LlamaIndex RAG Starter: LlamaIndex and Nebius RAG starter template
- LLM and RAG Debugger (WFGY 16-Problem Map): 16-mode map-based debugger for LLM and RAG bugs
- Multi-PDF RAG Analyzer: Multi-PDF chat and analysis system
- Nebius RAG Starter: Basic RAG implementation with Nebius for quick starts
- NVIDIA Nemotron Document OCR: OCR-based document and image parsing using NVIDIA Nemotron-Nano-V2-12b
- Production PDF RAG with Reranking: Production-shaped PDF RAG with contextual retrieval, Qdrant hybrid search, reranking, streaming answers, upload ingestion, and clickable citations
- Qwen3 PDF RAG Chat: PDF chatbot interface built with Streamlit
- Resume Optimizer: AI-powered resume optimization and enhancement tool
- Trustworthy RAG: Citation verification, per-claim evidence checks, and hallucination scoring for RAG answers
- Video Q&A with Timestamp Citations: Multimodal video retrieval with Gemini embeddings, Weaviate, Nebius, and clickable timestamp citations
- Web-Augmented Agentic RAG: Advanced RAG with CrewAI, Qdrant, and Exa for hybrid search capabilities
π¬ Advanced Agents
Complex multi-agent pipelines for production-ready end-to-end workflows. 35 projects
- AI Hedge Fund Research Team: Agentic workflow for comprehensive financial analysis
- AI Trend Research Agent: AI trend mining and analysis with Google ADK
- Candidate Profile Analyzer (Candilyzer): Candidate analysis tool for GitHub and LinkedIn profiles
- Car Finder Agent: AI-powered used car recommendation system with CrewAI and MongoDB
- Clinical Early-Warning Agent: Nebius Token Factory tool-calling agent that spots patient deterioration with NEWS2, qSOFA, personal baselines and trends
- Conference Proposal Generator: Automated conference proposal generation system
- Conference Talk Abstract Generator: Automated talk abstract generation with Google ADK and Couchbase
- Contract Review Crew (Paralegal): CrewAI contract review workflow for clause extraction, risk analysis, and recommended redlines
- Cosmos Arena Debate Council: Multi-agent debate council built with LangGraph and the NVIDIA Cosmos reasoning model via Nebius Token Factory
- Customer Support Resolution Agent: LangChain and Nebius support agent with knowledge-base retrieval, order lookup, and human ticket escalation
- Deep Research + Writing Agents Workshop: Nebius-powered LangChain MCP workshop with Exa research, Gemini image generation, and Okahu/Monocle eval observability
- Deep Research Workflow: Multi-stage research agent with Agno and ScrapeGraph AI
- Due Diligence Agent: Multi-agent company due diligence pipeline with AG2 and TinyFish deep web scraping
- Financial Document OS: Turns financial PDFs into an editable relational database with source-level citations
- Financial Market Data Service: FastAPI server for stock data and predictions with Agno
- Financial Research Agent (AgentField): Financial research agent with AgentField
- GitHub and LinkedIn Job Finder: LinkedIn job search automation with Bright Data integration
- Jev Social Research Agent: Typed Jev routing, local socai CLI evidence, and evidence-linked Nebius synthesis for Instagram, TikTok, and LinkedIn research
- Local File-Editing Agent Prototype: Local coding-agent prototype with file discovery, reading, and editing tools
- Maintainer Intelligence Brief: Weekly open-source intelligence briefs from community, security, and document signals with source citations
- Meeting Assistant Agent: Automated meeting notes and task creation from conversations
- Multi-Agent Coding Harness: Deep LangGraph coding crew with planning, repository exploration, human-gated file edits, and E2B-sandboxed test loops
- Nebius Autonomous Pipeline Optimizer: NYC taxi analytics pipeline optimizer with iterative code search using real-time or batch Nebius Token Factory inference
- Pre-Meeting Intel Agent (Briefing Room): LangGraph plan-research-reflect loop with Tavily web search that turns a company name into a cited one-page meeting brief
- Price Monitoring Agent: Price monitoring and alerting agent powered by CrewAI, Twilio, and Nebius
- Prompt Format Benchmark: Benchmark harness for comparing XML, JSON, and Markdown prompt formats across accuracy, latency, and token usage
- Sandboxed Browser Game Generator: FastAPI multi-agent studio that generates sandboxed browser games from one prompt using Pydantic AI and GLM-5.2 on Nebius
- SEO Content Strategy Team: SEO content optimization workflow with Agno and SerpAPI for Google AI Search ranking
- Shark Tank Pitch Practice Agent: Interactive 3D Shark Tank room with three Nebius-backed Mastra investor sharks, round-based Q&A, deal memos, and SQLite report history
- Software Engineering Model Arena: Nebius Token Factory benchmark for two coding models with seven curated challenges, weighted local hidden tests, partial-credit scoring, and an independent judge
- Startup Go-to-Market Strategy Agent: Go-to-market strategy and competitive analysis agent
- Startup Idea Validator Agent: Agentic workflow to validate and analyze startup ideas
- Temporal Agents: Examples of Temporal-based AI agents
- Temporal Transaction Agent Evaluation (Okahu + Monocle): Evaluation and regression loop for a Temporal fraud-processing agent, using OpenTelemetry traces, deterministic checks, and LLM-graded Okahu evaluations
- Web Intelligence Agent: Mastra multi-agent pipeline that turns Olostep web evidence into Nemotron-verified case studies with SQLite persistence and a Velt audit trail
- Workflow Audit Trail (FlowSentinel): Next.js workflow command center with Nebius Nemotron reasoning, n8n orchestration, Velt activity logs, and optional Tailscale Funnel exposure
𧬠Fine-Tuning
End-to-end examples of fine-tuning open-source LLMs, from data prep to deployment. 6 projects
- Customer Support Fine-Tuning with Data Lab: Teacher-student distillation workflow to generate support data, curate it in Data Lab, fine-tune, and deploy
- Insurance Claims Fine-Tuning: Data Lab, LoRA fine-tuning, and a Gradio comparison app for insurance claims
- Legal Tech Fine-Tuning (Self-Hosted): Fine-tunes Gemma on UK legislation with LoRA, serves with vLLM, and exposes a FastAPI layer
- Legal Tech Fine-Tuning (Token Factory): Managed LoRA fine-tuning on Nebius Token Factory with private model deployment
- Open-Source LLM Fine-Tuning on Token Factory: Colab-first LoRA fine-tuning walkthrough to upload a dataset, train, monitor, and deploy
- Standalone Customer Support Fine-Tuning (Colab): Fully standalone Colab notebook for the customer-support distillation and fine-tuning flow
πΊ Tutorials & Videos
π Course Playlists
- AWS Strands Course: Complete 8-lesson course on building AI agents with AWS Strands SDK (watch the playlist)
- Voice Agents Playlist: Tutorials on building voice agents
π§ Framework Tutorials
- AI Agents, MCP and more...: Mixed tutorials and project demos
- Build AI Agents: General AI agent development tutorials
- Build with MCP: Model Context Protocol tutorials and examples
Getting Started
Prerequisites
- Python 3.10+ (Python 3.11+ recommended for newer projects)
- Git for cloning the repository
- Package Manager:
piporuv(recommended for faster installs) - API Keys: Most projects require API keys (see individual project READMEs)
Quick Start
Clone the repository
bashgit clone https://github.com/Arindam200/awesome-ai-apps.git cd awesome-ai-appsChoose a project and navigate to its directory
bashcd starter_ai_agents/agno_starter # Example: Start with Agno starterSet up environment variables
bashcp .env.example .env # Copy example environment file # Edit .env with your API keysInstall dependencies
bash# Using pip pip install -r requirements.txt # OR using uv (recommended - faster) uv sync # or uv pip install -e .Run the project
bashpython main.py # or for Streamlit apps streamlit run app.py
π€ Contributing
We welcome contributions from the community! Here's how you can help:
- π‘ Add new projects: Submit your own AI agent examples
- π§ Fix issues: Contribute code improvements and bug fixes
- π Improve documentation: Help make projects more accessible
- π Report bugs or suggest improvements via GitHub Issues
Before contributing:
- Read our Contributing Guidelines for detailed information
- Check existing issues to avoid duplicates
- Follow the project structure and naming conventions
- Ensure your project includes a comprehensive README.md
Important: This project follows a Contributor Code of Conduct. By participating, you agree to abide by its terms.
π License
This repository is licensed under the MIT License. Feel free to use and modify the examples for your projects.
π₯ Core Maintainers
This project is actively maintained by:
For any questions, suggestions, or contributions, feel free to reach out to the maintainers.
Thank You for the Support! π
Mcp Ai Agents Mcp Toolbox Security Agent Docs ARCHITECTURE (`mcp_ai_agents/mcp_toolbox_security_agent/docs/ARCHITECTURE.md`)
Architecture
Components
| Component | Role |
|---|---|
| agent-web (FastAPI + Google ADK) | The user-facing app + shopping agent. The LLM is pluggable β Nebius Token Factory (Kimi-K2.6) by default via ADK's LiteLLM adapter, or Gemini (AGENT_PROVIDER=gemini). Loads Toolbox tools via the toolbox-core SDK. Lives outside the trust boundary, so the provider choice changes no security property. Gemini is still used for query embeddings (semantic search). |
| MCP Toolbox | The security control plane. Serves curated tools over HTTP/MCP; binds identity from tokens; holds the DB credentials; emits OpenTelemetry. |
| PostgreSQL | System of record: users, product catalog (price/stock), carts, orders. Accessed only via least-privilege roles. |
| MongoDB (Atlas Local) | Vector/semantic product search over pre-computed Gemini embeddings ($vectorSearch). |
| Keycloak | OIDC identity provider (local). Issues the JWTs Toolbox validates. Swapped for Google Sign-In in production. |
| OTel Collector + Jaeger | Traces/metrics pipeline. |
The trust boundary
βββββββββββββββββββββββββββββββββββββββ
login β agent-web (FastAPI) β
alice β ββ Google ADK + Gemini agent β tool calls (HTTP/MCP)
bob β ββ deterministic demo endpoints ββββββββββββββββ
carol ββββββββββββββββ¬βββββββββββββββββββββββ keycloak_token (JWT)
β embeddings (Gemini) β
βΌ βΌ
google-genai ββββββββββββββββββββββ
β MCP TOOLBOX β βββ TRUST BOUNDARY
Keycloak (OIDC) ββissues JWTβββββββββββββββββββΆ β β’ custom tools β
β² β β’ authN params β
βββ agent-web logs users in (server-side) β β’ authRequired β
β β’ parameterized β
β β’ least-priv roles β
βββββ€ββββββββββββ€ββββββ
parameterized SQL ($1) β β $vectorSearch
role: toolbox_app/adminβΌ βΌ
βββββββββββββ ββββββββββββ
β PostgreSQLβ β MongoDB β
βββββββββββββ ββββββββββββEverything to the left of the double line is untrusted with respect to the
data: the LLM, its prompt, and the tool arguments it produces. All enforcement
happens at Toolbox and in the database.
Request lifecycle (e.g. "show my orders")
- The browser calls agent-web; the server attaches the signed-in user's JWT.
- The agent (or a deterministic endpoint) calls the Toolbox tool
list_my_orders.
The token travels in thekeycloak_tokenheader. Nousernameis sent β
the tool's schema doesn't have one. - Toolbox validates the JWT against the OIDC issuer (signature, issuer,
audience), extractspreferred_username, and binds it into the SQL parameter. - Toolbox runs
... WHERE u.username = $1as the least-privilegetoolbox_app
role, returns rows, and records a trace span. - A different user's data is unreachable: the model can't pass
username, and
even a forged body value is ignored (the claim wins).
Why polyglot (Postgres + Mongo)
Transactional integrity (orders, carts, prices, least-privilege roles, IAM) lives
in PostgreSQL; semantic search lives in MongoDB vector search. Toolbox presents
one secure gateway over both, joined by sku. This shows the control plane
generalizing across very different datastores β a realistic production shape.
Local vs. GKE
| Concern | Local (compose) | GKE (deploy/k8s/) |
|---|---|---|
| Postgres source | kind: postgres + password |
kind: cloud-sql-postgres, no password (IAM) |
| DB auth | role password in .env |
Workload Identity KSAβGSA, IAM DB users |
tools.yaml |
bind-mounted file | mounted from a Secret |
| Secrets | .env |
Secret Manager (CSI / External Secrets) |
| Network | compose bridge | NetworkPolicy: agentβToolboxβDB only |
| Telemetry | --telemetry-otlp β collector |
--telemetry-gcp β Cloud Trace/Monitoring |
| Identity | local Keycloak | Google Sign-In (authService: kind: google) |
| Scaling | single container | HPA 2β10, built-in connection pooling |
The tools, authenticated parameters, and roles are identical across both β
only the sources: block changes (deploy/k8s/tools.yaml is generated fromtoolbox/tools.yaml).
Catalog data flow
scripts/build_catalog.py streams grocery_store.inventory.json (70 MB of
products with Gemini embeddings), assigns SKUs, and loads an aligned catalog
into Postgres (price/stock) and Mongo (embeddings + sku), then builds thevector_index. This guarantees a product returned by vector search exists, with
an authoritative price, in Postgres.
Mcp Ai Agents Mcp Toolbox Security Agent Docs ARCHITECTURE DIAGRAM (`mcp_ai_agents/mcp_toolbox_security_agent/docs/ARCHITECTURE_DIAGRAM.md`)
Technical Architecture β MCP Toolbox E-Commerce Security Demo
The diagram below shows every layer of the system and how MCP Toolbox acts as
the security control plane between the untrusted LLM layer and the databases.
Annotated numbers correspond to the ten security mechanisms documented in
SECURITY.md.
/* Detailed source-code truncated for AI context efficiency. */Security mechanism quick-reference
| # | Mechanism | Where enforced | What it prevents |
|---|---|---|---|
| 1 | Custom named tools only β no execute_sql |
tools.yaml (10 tools) |
Arbitrary query power; attack surface = tool list |
| 2 | Authenticated parameters β username from JWT claim |
tools.yaml authServices |
Model requesting another user's data |
| 3 | Authorized invocations β authRequired:[keycloak_admin] |
tools.yaml admin tools |
Non-admins calling view_all_orders / update_inventory |
| 4 | SDK bound parameters β store_region fixed by app |
agent/agent.py bound_params |
Model choosing tenant / region |
| 5 | Parameterized queries β $1 β¦ $n everywhere |
tools.yaml all SQL stmts |
SQL injection |
| 6 | Least-privilege DB roles β toolbox_app / toolbox_admin |
db/postgres/01_roles.sql |
Blast radius of a compromised tool |
| 7 | IAM / Workload Identity β cloud-sql-postgres, no password |
deploy/k8s/tools.yaml |
DB password in the cluster |
| 8 | Secrets via env-var interpolation β ${VAR} in tools.yaml |
tools.yaml + .env / Secret Manager |
Credentials in source code |
| 9 | Full observability β OTLP on every tool call | --telemetry-otlp / --telemetry-gcp |
Silent misuse; every call is an audited trace |
| 10 | Network hardening β --allowed-hosts; K8s NetworkPolicy |
deploy/k8s/networkpolicy.yaml |
Agent reaching DBs directly; SSRF |
Key insight: Everything to the left of the Toolbox boundary (the LLM,
its prompt, its tool arguments) is treated as untrusted input.
All enforcement happens inside Toolbox and in the database β below the agent,
making misuse structurally impossible rather than just discouraged.
Mcp Ai Agents Mcp Toolbox Security Agent Docs RUNBOOK (`mcp_ai_agents/mcp_toolbox_security_agent/docs/RUNBOOK.md`)
Live demo runbook
A ~6β8 minute talk demo. Every step has a UI action and a CLI fallback you
can run if a slide or click fails.
Before you go on stage
scripts/bootstrap_local.sh # ~3β5 min: build, start, seed catalog
scripts/verify_security.sh # confirm all 11 checks passOpen tabs: http://localhost:8080 (UI) and http://localhost:16687 (Jaeger).
For the live chat, set NEBIUS_API_KEY (Kimi-K2.6 agent) and GOOGLE_API_KEY
(Gemini embeddings for semantic search) in deploy/compose/.env, thendocker compose ... up -d agent-web. Otherwise use the deterministic buttons,
which need no API key.
Reset demo state any time:
docker compose -f deploy/compose/docker-compose.yaml --env-file deploy/compose/.env \
run --rm catalog # re-seeds alice's cart + bob's orderThe script
1 β Frame it (30s). "An agent that can touch a production database is a
security problem. The usual answer is an MCP server with execute_sql β the
agent can run anything. We did the opposite: MCP Toolbox gives the agent narrow
tools and becomes the trust boundary." Show docs/ARCHITECTURE.md diagram.
2 β Shop as alice (1m). Sign in as alice. In chat: "find me some dark
chocolate" β "add two of the first one" β "check out". (No API key? Use the
cart/refresh buttons after running the CLI below.) Point out: the agent passed asku, never a price or a username.
3 β Per-user scoping (1m). Click Refresh cart / Refresh orders β alice
sees only her data. Sign in as bob: different cart, different orders. Nothing
in the agent or the request said "alice" or "bob" β Toolbox derived it from the
login token.
4 β The block (1.5m, the centerpiece). Back as alice, in Cross-user
access test enter bob's order id (1) β Read order details. Result: a red
Blocked banner, zero rows. "She asked for order 1. Toolbox ran the query as
her. username is bound from her token β she can't pass it, can't forge it."
CLI fallback / proof:
# inside the stack so the token issuer matches:
docker compose -f deploy/compose/docker-compose.yaml --env-file deploy/compose/.env \
exec -T agent-web python3 - <<'PY'
import urllib.request,urllib.parse,json
def tok(u):
d=urllib.parse.urlencode({"client_id":"grocery-agent","grant_type":"password","username":u,"password":u+"123"}).encode()
return json.load(urllib.request.urlopen("http://keycloak:8080/realms/grocery/protocol/openid-connect/token",d))["access_token"]
def call(t,p,h):
r=urllib.request.Request(f"http://toolbox:5000/api/tool/{t}/invoke",json.dumps(p).encode(),{"Content-Type":"application/json",h[0]:h[1]})
return urllib.request.urlopen(r).read().decode()
print("alice -> bob's order:", call("get_order_details",{"order_id":1},("keycloak_token",tok("alice"))))
print("bob -> bob's order:", call("get_order_details",{"order_id":1},("keycloak_token",tok("bob"))))
PY5 β Why it's impossible, not just unlikely (1m). Click Show tool schemas.
Contrast: the Toolbox manifest lists username annotated authServices:[keycloak],
but the model's function signature is view_cart() / add_to_cart(quantity, sku)
β no username. "The model can't pass what isn't in its schema."
6 β Admin gating (1m). As alice, click view_all_orders β denied. Sign
in as carol (admin) β it returns every order. "Same tool, different token.
Only carol's token carries the grocery-admin audience β and that's role-driven
in Keycloak, she can't self-grant it."
7 β It's all audited (45s). Open Jaeger (http://localhost:16687), servicetoolbox. Show the spans for the calls you just made β including the blocked one
(a successful, audited tool call that returned zero rows, not a silent drop).
8 β Land the plane (30s). Recap with docs/SECURITY.md: authenticated
parameters, authorized invocations, parameterized queries, least-privilege roles,
IAM/Workload Identity, observability. "Toolbox is the control plane. The agent is
outside the trust boundary β by construction." Show deploy/k8s/ for the GKE
shape (Workload Identity = no DB password at all).
One-command proof (if you only have 60 seconds)
scripts/verify_security.sh11 green checks: authenticated params, the cross-user block, no-token rejection,
admin allow/deny, SQL-injection-as-literal, and three least-privilege denials.
Troubleshooting
- Toolbox restarting β it inits sources + OIDC eagerly; it converges once
Keycloak's realm is imported (restart: on-failure). Give it ~60s after first
boot.docker compose ... logs toolbox. - Chat returns 503 β
NEBIUS_API_KEYisn't set (orGOOGLE_API_KEYifAGENT_PROVIDER=gemini); the security demo still works without it. - Chat works but search fails β semantic search needs
GOOGLE_API_KEY
(Gemini query embeddings); cart/checkout/orders still work without it. - Token rejected by Toolbox β only mint tokens inside the network
(keycloak:8080); a host-minted token (localhost:8085) has a different
issuer.scripts/get_token.shis for inspecting claims, not calling Toolbox. - Port already in use β published host ports are 8080/5055/8085/16687/8899/
5544/27117; change them indeploy/compose/docker-compose.yamlif needed.
Mcp Ai Agents Mcp Toolbox Security Agent Docs SECURITY (`mcp_ai_agents/mcp_toolbox_security_agent/docs/SECURITY.md`)
Security model β how MCP Toolbox constrains the agent
The agent is treated as untrusted. Ten mechanisms, layered, ensure that no
prompt, jailbreak, or malformed tool argument lets it exceed its authority. Each
is implemented in this repo and verified by scripts/verify_security.sh.
Mechanism map
| # | Mechanism | Where | What it stops |
|---|---|---|---|
| 1 | Custom tools, not execute_sql |
toolbox/tools.yaml β only 10 named tools; the Mongo vector index/path are hardcoded |
The agent never has arbitrary query power; the attack surface is the tool list |
| 2 | Authenticated parameters | tools.yaml β username carries authServices:[{name: keycloak, field: preferred_username}] |
The model can't request another user's data; username isn't even in its tool schema |
| 3 | Authorized invocations | tools.yaml β admin tools have authRequired:[keycloak_admin] |
Non-admins can't call view_all_orders / update_inventory |
| 4 | Bound parameters (SDK) | agent/agent.py β bound_params={"store_region": ...} |
The model can't choose the tenant/region; it's fixed by the app |
| 5 | Parameterized queries | tools.yaml β every statement uses $1..$n (no string interpolation) |
SQL injection; tool args are values, never SQL |
| 6 | Least-privilege DB roles | db/postgres/01_roles.sql β toolbox_app / toolbox_admin, one per source |
A compromised tool can't DROP/UPDATE-catalog/DELETE-orders |
| 7 | IAM / Workload Identity | deploy/k8s/ β cloud-sql-postgres with no password; KSAβGSA |
No DB password exists in the cluster at all |
| 8 | Secrets handling | ${ENV} in tools.yaml; .env (local) / Secret Manager (GKE) |
Credentials never reach the model and aren't hardcoded |
| 9 | Observability | --telemetry-otlp / --telemetry-gcp; observability/ |
Every tool call is an audited, traced event |
| 10 | Network hardening | --allowed-hosts / --allowed-origins; deploy/k8s/networkpolicy.yaml |
Only agentβToolboxβDB; the agent can't reach the DB directly |
The headline: authenticated parameters (#2)
The view_cart tool is defined with a single parameter that the model never sees:
parameters:
- name: username
type: string
authServices:
- name: keycloak
field: preferred_username # taken from the verified token, not the modelVerified behavior (from the running stack):
- The model-facing signature is
view_cart() -> strβ nousername.
(add_to_cart(quantity, sku),get_order_details(order_id)β same story.) - Calling
view_cartwith a body of{"username":"bob"}while presenting
alice's token still returns alice's cart. The forged value is ignored; the
claim wins. - Calling it with no token β HTTP 401 ("error parsing authenticated
parameter"). Identity isn't optional. get_order_details(order_id=)as alice β zero rows. Ownership is in
theWHEREclause against the authenticated username; it can't be bypassed.
This is the difference between asking the model nicely and making it
impossible: identity is resolved deterministically by the server, below the
agent.
Admin gating is role-driven, not request-driven (#3)
view_all_orders and update_inventory use authRequired: [keycloak_admin],
whose audience is grocery-admin. In Keycloak, only carol holds thegrocery-admin client role, so the built-in audience-resolve mapper adds that
audience to her token automatically. alice/bob can't obtain it β even requesting
the scope explicitly is rejected ("Invalid scopes"). Verified: alice β 401,
carol β 200.
Honest caveat (the confused-deputy lesson): bound parameters (#4) and the
app's choice of which token/header to send are trusted to the application
layer. Toolbox stops the model; your app process must still be trustworthy.
Call this out β it's the same lesson the MCP Toolbox docs flag for bound params.
Defense in depth below the tools (#6)
Even if a tool were subverted, the database role caps the blast radius. toolbox_app
holds SELECT on products and SELECT/INSERT on orders β and nothing more:
UPDATE products ... β permission denied
DELETE FROM orders β permission denied
DROP TABLE orders β must be owner of tableVerifying it yourself
scripts/verify_security.shRuns 11 checks inside the stack (tokens minted via keycloak:8080 so the issuer
matches what Toolbox validates) covering #2, #3, #5, and #6. Traces for every
call appear in Jaeger (#9).
Production hardening (#7, #8, #10)
On GKE (deploy/k8s/): Cloud SQL via Workload Identity means no DB password in
the cluster; tools.yaml and secrets come from Secret Manager; a NetworkPolicy
ensures only app=agent-web can reach Toolbox and only Toolbox can reach the
databases. Swap the authService to kind: google for Google Sign-In β no other
change.
Mcp Ai Agents Mcp Toolbox Security Agent Docs Architecture Diagram (`mcp_ai_agents/mcp_toolbox_security_agent/docs/architecture-diagram.md`)
Technical architecture β MCP Toolbox as the security control plane
/* Detailed source-code truncated for AI context efficiency. */Legend
- Green (bold) β MCP Toolbox, the only component that touches data. The agent never holds a DB credential or runs raw SQL.
- Red dashed β the untrusted zone: the LLM and its tool arguments. Anything here is treated as hostile.
- Solid thick arrows β data-plane calls that Toolbox makes as a least-privilege role.
- Dotted arrows β identity/token flow (JWT issuance + OIDC validation).
- #1β#10 β the ten security mechanisms (full map in SECURITY.md).
Renders on GitHub, in mermaid.live, and VS Code's Mermaid preview.
--- METRICS ---
- Files Extracted: 6
- Estimated Token Budget: ~13100 tokens
- Canonical Reference: https://codewiki.google/github.com/Arindam200/awesome-ai-apps