# Technical Documentation: Arindam200/awesome-ai-apps

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/Arindam200/awesome-ai-apps)

### Overview (README.md)

<div align="center">

# Awesome AI Apps [](https://awesome.re)

<a href="https://trendshift.io/repositories/14662" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14662" alt="Arindam200%2Fawesome-ai-apps | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>

</div>

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](#-featured-ai-apps)
  - [🧩 Starter Agents](#-starter-agents)
  - [🪶 Simple Agents](#-simple-agents)
  - [🎙️ Voice Agents](#-voice-agents)
  - [🗂️ MCP Agents](#️-mcp-agents)
  - [🧠 Memory Agents](#-memory-agents)
  - [📚 RAG Applications](#-rag-applications)
  - [🔬 Advanced Agents](#-advanced-agents)
  - [🧬 Fine-Tuning](#-fine-tuning)
- [📺 Tutorials & Videos](#-tutorials--videos)
- [🚀 Getting Started](#getting-started)
- [🤝 Contributing](#-contributing)

---

<div align="center">

## 💎 Sponsors

<p align="center">
  A huge thank you to our sponsors for their generous support!
</p>

<table align="center" cellpadding="10" style="width:100%; border-collapse:collapse;">
  <tr align="center">
    <td width="300" valign="middle" align="center">
      <a href="https://dub.sh/brightdata" target="_blank" title="Visit Bright Data">
        <img src="https://upload.wikimedia.org/wikipedia/commons/7/74/Bright_Data.svg" height="35" style="max-width:180px;" alt="Bright Data - Web Data Platform">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">Web Data Platform</span>
        <br>
        <a href="https://dub.sh/brightdata" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit Bright Data website">
        </a>
      </sub>
    </td>
    <td width="300" valign="middle" align="center">
      <a href="https://dub.sh/nebius" target="_blank" title="Visit Nebius Token Factory">
        <img src="./assets/nebius.png" height="36" style="max-width:180px;" alt="Nebius Token Factory">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">AI Inference Provider</span>
        <br>
        <a href="https://dub.sh/nebius" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit Nebius Token Factory">
        </a>
      </sub>
    </td>
    <td width="300" valign="middle" align="center">
      <a href="https://dub.sh/scrapegraphai" target="_blank" title="Visit ScrapeGraphAI on GitHub">
        <img src="https://raw.githubusercontent.com/ScrapeGraphAI/ScrapeGraph-AI/main/docs/assets/scrapegraphai_logo.png" height="44" style="max-width:180px;" alt="ScrapeGraphAI - Web Scraping Library">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">AI Web Scraping framework</span>
        <br>
        <a href="https://dub.sh/scrapegraphai" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="View ScrapeGraphAI on GitHub">
        </a>
      </sub>
    </td>
  </tr>
  <tr align="center">
    <td width="300" valign="middle" align="center">
      <a href="https://dub.sh/memorilabs" target="_blank" title="Visit Memorilabs">
        <img src="assets/memori.png" height="36" style="max-width:180px;" alt="Memori - SQL Native Memory for AI">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">SQL Native Memory for AI</span>
        <br>
        <a href="https://dub.sh/memorilabs" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit Memorilabs website">
        </a>
      </sub>
    </td>
    <td width="300" valign="middle" align="center">
      <a href="https://dub.sh/copilotkit" target="_blank" title="Visit CopilotKit">
        <img src="assets/copilot-kit-logo.svg" height="36" style="max-width:180px;" alt="CopilotKit - Agentic Application Platform">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">Agentic Application Platform</span>
        <br>
        <a href="https://dub.sh/copilotkit" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit CopilotKit website">
        </a>
      </sub>
    </td>
    <td width="300" valign="middle" align="center">
      <a href="https://dub.sh/scalekitt" target="_blank" title="Visit ScaleKit">
        <img src="assets/scalekit.svg" height="36" style="max-width:180px;" alt="ScaleKit - Auth Stack for AI">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">Auth Stack for AI</span>
        <br>
        <a href="https://dub.sh/scalekitt" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit ScaleKit website">
        </a>
      </sub>
    </td>
  </tr>
  <tr align="center">
    <td width="200" valign="middle" align="center">
      <a href="https://okahu.ai" target="_blank" title="Visit Okahu">
        <img src="assets/okahu.png" height="36" style="max-width:180px;" alt="Okahu - AI Platform">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">AI Observability Platform</span>
        <br>
        <a href="https://okahu.ai" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit Okahu website">
        </a>
      </sub>
    </td>
    <td width="200" valign="middle" align="center">
      <a href="https://dub.sh/agentfield" target="_blank" title="Visit AgentField">
        <img src="assets/agentfield.png" height="40" style="max-width:180px;" alt="AgentField - Kubernetes for AI Agents">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">Kubernetes for AI Agents</span>
        <br>
        <a href="https://dub.sh/agentfield" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit AgentField website">
        </a>
      </sub>
    </td>
    <td width="200" valign="middle" align="center">
      <a href="https://dub.sh/byteful" target="_blank" title="Visit Byteful">
      <img src="https://byteful.com/favicon.ico" height="40" style="max-width:180px;" alt="Byteful">
      </a>
      <br>
      <sub>
        <span style="white-space:nowrap;">Byteful</span>
        <br>
        <a href="https://dub.sh/byteful" target="_blank">
          <img src="https://img.shields.io/badge/Visit%20Site-blue?style=flat-square" alt="Visit Byteful website">
        </a>
      </sub>
    </td>
  </tr>

</table>

### 💎 Become a Sponsor

<p align="center">
Interested in sponsoring this project? Feel free to reach out!
<br/>
<a href="mailto:contact@studio1hq.com">
    <img src="https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white" alt="Email">
</a>
</p>

</div>

---

## 🚀 Featured AI Apps

### 🧩 Starter Agents

**Quick-start agents for learning and extending different AI frameworks.** _21 projects_

- [AutoGen Tool-Calling Starter](starter_ai_agents/autogen_starter): Microsoft AutoGen `AssistantAgent` with a custom tool, powered by Nebius Token Factory
- [AWS Strands Agent Starter](starter_ai_agents/aws_strands_starter): Weather report agent using AWS Strands SDK
- [CAMEL AI Model Benchmark](starter_ai_agents/camel_ai_starter): Performance benchmarking tool comparing various AI models
- [Coding Harness Starter](starter_ai_agents/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](starter_ai_agents/crewai_starter): Multi-agent research team example
- [Docker cagent Multi-Agent Starter](starter_ai_agents/cagent_starter): Open-source customizable multi-agent runtime by Docker
- [DSPy Optimization Starter](starter_ai_agents/dspy_starter): DSPy framework for building and optimizing AI systems
- [Google Agent Development Kit Starter](starter_ai_agents/google_adk_starter): Google Agent Development Kit starter template
- [Hacker News Trend Analyst (Agno)](starter_ai_agents/agno_starter): Agno-based agent for trend analysis on Hacker News
- [Hugging Face smolagents Starter](starter_ai_agents/smolagents_starter): Hugging Face smolagents code-first web-search agent
- [KAOS Kubernetes Multi-Agent Starter](starter_ai_agents/kaos_starter): Kubernetes-native multi-agent system with MCP tools and in-cluster LLM
- [LangChain Tool-Calling Starter](starter_ai_agents/langchain_starter): LangChain tool-calling agent with `create_tool_calling_agent` + `AgentExecutor`, powered by Nebius
- [LangGraph ReAct Agent Starter](starter_ai_agents/langgraph_starter): LangGraph prebuilt ReAct agent (`create_react_agent`) with custom tools, powered by Nebius
- [Letta Stateful Memory Agent](starter_ai_agents/letta_starter): Stateful agent with persistent long-term memory across sessions
- [LlamaIndex Task Manager](starter_ai_agents/llamaindex_starter): LlamaIndex-powered task assistant
- [Mastra Tool-Calling Starter](starter_ai_agents/mastra_starter): TypeScript-first agent with a custom tool powered by Nebius Token Factory
- [Microsoft Agent Framework Starter](starter_ai_agents/microsoft_agents_starter): Multi-agent travel planning demos built on Microsoft Agent Framework
- [OpenAI Agents SDK Starter](starter_ai_agents/openai_agents_sdk): OpenAI Agents SDK with email helper and haiku writer examples
- [PydanticAI Weather Bot](starter_ai_agents/pydantic_starter): Real-time weather information agent
- [Sayna Realtime Voice Agent](starter_ai_agents/sayna_starter): Real-time voice infrastructure with multi-provider STT/TTS (Deepgram, ElevenLabs, Azure, Google) and WebSocket streaming
- [Semantic Kernel Starter](starter_ai_agents/semantic_kernel_starter): Microsoft Semantic Kernel `ChatCompletionAgent` with plugin-based tool calling

### 🪶 Simple Agents

**Straightforward, practical use-cases for everyday AI applications.** _19 projects_

- [Agno Agent Examples](simple_ai_agents/agno_ai_examples): Simple to multi-agent examples with web search and a knowledge base
- [Agno Agent UI](simple_ai_agents/agno_ui_agent): Interactive UI for web and finance agents
- [AI Agent Registry Explorer](simple_ai_agents/agent_discovery_agent): Find and compare AI agents across NANDA, MCP, Virtuals, A2A, and ERC-8004 registries
- [AI Expense Tracker](simple_ai_agents/ai_expense_tracker): Chat-based expense tracking with Nebius Token Factory and a Postgres backend that agents provision on first run
- [Calendar Assistant](simple_ai_agents/cal_scheduling_agent): Calendar scheduling integration with Cal.com
- [Cost-Aware Model Router (RouteLLM)](simple_ai_agents/llm_router): Intelligent model routing with RouteLLM (GPT-4o-mini vs Nebius Llama) for cost optimization
- [Email-to-Calendar Assistant](simple_ai_agents/email_to_calendar_scheduler): AI-powered Gmail reader and Google Calendar manager
- [Financial Reasoning Agent](simple_ai_agents/reasoning_agent): Step-by-step financial reasoning demonstration
- [Human-in-the-Loop Agent](simple_ai_agents/human_in_the_loop_agent): HITL actions for safe AI task execution
- [LangChain Operations Agent Collection](simple_ai_agents/langchain_simple_agents): Nebius-powered incident response, support, vendor risk, and data quality agents with typed outputs and guarded tools
- [Macro Event Brief Agent](simple_ai_agents/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](simple_ai_agents/mastra_ai_weather_agent): Weather updates using Mastra AI framework
- [Natural-Language Database Assistant](simple_ai_agents/talk_to_db): Natural language database queries with GibsonAI and LangChain
- [Natural-Language SQL Agent (LangChain)](simple_ai_agents/langchain_data_agent_poc): Natural-language-to-SQL data agent with LangGraph, Nebius, read-only SQL safety, and Streamlit charts
- [Nebius Chat](simple_ai_agents/nebius_chat): Chat interface for Nebius Token Factory
- [Newsletter Generator](simple_ai_agents/newsletter_agent): AI-powered newsletter builder with Firecrawl integration
- [Stock Market Finance Agent](simple_ai_agents/finance_agent): Real-time stock and market data tracking agent
- [Stock Portfolio Analyst](simple_ai_agents/stock_portfolio_analyst): Live portfolio valuation, concentration analysis, risk flags, and rebalancing ideas with Agno
- [VoyageCompass Travel Planner](simple_ai_agents/nebius_travel_planner): LangChain and Nebius travel planner with weather, research, currency conversion, budgets, and packing tools
- [Web Automation Agent](simple_ai_agents/browser_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](voice_agents/Cursor_code_editor) (Deepgram + Cursor SDK). _9 projects_

- [AI Pitch Coach (Gradium + Nebius)](voice_agents/voice-agent-gradium-nebius-langchain): Conversational pitch coach using Gradium STT/TTS, LangChain orchestration, and Nebius reasoning
- [Customer Support Voice Agent (LiveKit)](voice_agents/customer_support_agent): Nebius-powered voice support agent with context-preserving AI manager handoff, noise cancellation, and inactivity handling
- [Gemini Realtime Voice Agent (LiveKit)](voice_agents/livekit_gemini_agents): LiveKit Agents with Google Gemini Live (`gemini` multimodal realtime) for low-latency voice conversations in a LiveKit room
- [Healthcare Voice Contact Center](voice_agents/healthcare_contact_center): Pipecat healthcare contact center with appointment booking, FAQ handling, and supervisor escalation
- [Multilingual Voice Agent (Pipecat + Sarvam)](voice_agents/pipecat_agent): 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)](voice_agents/livekit_rsvp_agent): Outbound voice agent that calls attendees, confirms RSVPs, and updates a JSON-backed event database
- [Speed-to-Lead Sales Voice Agent](voice_agents/speed_to_lead_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](voice_agents/Cursor_code_editor): 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)](voice_agents/livekit_web_search_agent): LiveKit + Gemini realtime voice agent with an Olostep-backed `web_search` tool for fresh, source-cited answers

### 🗂️ MCP Agents

**Examples using Model Context Protocol for external tool integration.** _14 projects_

- [Couchbase LangGraph MCP Agent](mcp_ai_agents/langchain_langgraph_mcp_agent): LangChain ReAct agent with Couchbase integration
- [Couchbase MCP Server](mcp_ai_agents/couchbase_mcp_server): Couchbase database integration with MCP protocol
- [Custom MCP Server Starter](mcp_ai_agents/custom_mcp_server): Custom MCP server implementation example
- [Documentation Q&A MCP Agent](mcp_ai_agents/docs_qna_agent): Documentation Q&A agent with MCP
- [Documentation RAG MCP Server](mcp_ai_agents/doc_mcp): Semantic RAG documentation and Q&A system
- [GibsonAI Database MCP Agent](mcp_ai_agents/database_mcp_agent): Conversational AI agent for managing GibsonAI database projects and schemas
- [GitHub MCP Agent](mcp_ai_agents/github_mcp_agent): Repository insights and analysis via MCP
- [GitHub MCP Agent Starter](mcp_ai_agents/mcp_starter): GitHub repository analyzer starter template
- [Hotel Finder Agent](mcp_ai_agents/hotel_finder_agent): Hotel search and booking using MCP integration
- [Sandboxed Code Execution MCP Agent (Docker + E2B)](mcp_ai_agents/e2b_docker_mcp_agent): Secure AI agent for running agents in sandboxed Docker environments via MCP Gateway
- [Secure Database MCP Agent (MCP Toolbox)](mcp_ai_agents/mcp_toolbox_security_agent): 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)](mcp_ai_agents/scalekit-exa-mcp-security): Security-focused MCP integration with Exa search
- [Self-Healing Text-to-SQL Agent (Okahu)](mcp_ai_agents/telemetry-mcp-okahu): Self-healing Text-to-SQL demo using Okahu Cloud traces via hosted MCP
- [Taskade MCP Agent](mcp_ai_agents/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](memory_agents/ai_consultant_agent/): AI-powered consulting agent using **Memori v3** as a long-term memory fabric and **ExaAI** for research
- [arXiv Researcher Agent with Memori](memory_agents/arxiv_researcher_agent_with_memori): Research assistant using OpenAI Agents and GibsonAI Memori
- [AWS Strands Persistent Memory Agent](memory_agents/aws_strands_agent_with_memori): AWS Strands agent enhanced with the Memori memory system
- [Blog Writing Agent](memory_agents/blog_writing_agent): Personalized blog writing agent with memory for style consistency
- [Brand Reputation Monitor](memory_agents/brand_reputation_monitor): AI-powered brand reputation monitoring with news analysis and sentiment tracking
- [Customer Support Voice Agent](memory_agents/customer_support_voice_agent): Voice-enabled customer support assistant with Memori v3 and Firecrawl for knowledge base management
- [Engineering Content Agent](memory_agents/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](memory_agents/job_search_agent): Job search agent with memory for preference tracking
- [Persistent Memory Agent (Agno)](memory_agents/agno_memory_agent): Agno-based agent with persistent memory capabilities
- [Product Launch Agent](memory_agents/product_launch_agent): Competitive intelligence tool for analyzing competitor product launches
- [Social Media Agent](memory_agents/social_media_agent): Social media automation agent with memory for brand voice
- [Study Coach Agent](memory_agents/study_coach_agent): AI-powered study coach with Memori v3 and LangGraph for multi-step verification of understanding
- [YouTube Trend Agent](memory_agents/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](rag_apps/agentic_rag): Agentic RAG implementation with Agno and GPT-5
- [Agentic Typed RAG with LlamaIndex](rag_apps/agentic_typed_rag_llamaindex): Typed, citation-verified RAG with structured answers, local document parsing, and deterministic refusal for weak evidence
- [Codebase Q&A RAG](rag_apps/chat_with_code): Conversational code explorer and documentation assistant
- [Enterprise Contextual RAG](rag_apps/contextual_ai_rag): Enterprise-level RAG with managed datastores and quality evaluation
- [Gemma 3 Document OCR](rag_apps/gemma_ocr/): OCR-based document and image processor using the Gemma 3 model
- [GraphRAG with Neo4j](rag_apps/graphrag_neo4j): Knowledge graph extraction and Cypher-backed retrieval with Neo4j and Nebius
- [LiteParse Invoice & Receipt Auditor](rag_apps/liteparse_invoice_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](rag_apps/llamaIndex_starter): LlamaIndex and Nebius RAG starter template
- [LLM and RAG Debugger (WFGY 16-Problem Map)](rag_apps/wfgy_llm_debugger): 16-mode map-based debugger for LLM and RAG bugs
- [Multi-PDF RAG Analyzer](rag_apps/pdf_rag_analyser): Multi-PDF chat and analysis system
- [Nebius RAG Starter](rag_apps/simple_rag): Basic RAG implementation with Nebius for quick starts
- [NVIDIA Nemotron Document OCR](rag_apps/nvidia_ocr/): OCR-based document and image parsing using NVIDIA Nemotron-Nano-V2-12b
- [Production PDF RAG with Reranking](rag_apps/advanced_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](rag_apps/qwen3_rag): PDF chatbot interface built with Streamlit
- [Resume Optimizer](rag_apps/resume_optimizer): AI-powered resume optimization and enhancement tool
- [Trustworthy RAG](rag_apps/trustworthy_rag): Citation verification, per-claim evidence checks, and hallucination scoring for RAG answers
- [Video Q&A with Timestamp Citations](rag_apps/video_rag): Multimodal video retrieval with Gemini embeddings, Weaviate, Nebius, and clickable timestamp citations
- [Web-Augmented Agentic RAG](rag_apps/agentic_rag_with_web_search): 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](advance_ai_agents/ai-hedgefund): Agentic workflow for comprehensive financial analysis
- [AI Trend Research Agent](advance_ai_agents/trend_analyzer_agent): AI trend mining and analysis with Google ADK
- [Candidate Profile Analyzer (Candilyzer)](advance_ai_agents/candidate_analyser): Candidate analysis tool for GitHub and LinkedIn profiles
- [Car Finder Agent](advance_ai_agents/car_finder_agent): AI-powered used car recommendation system with CrewAI and MongoDB
- [Clinical Early-Warning Agent](advance_ai_agents/clinical_early_warning_agent): Nebius Token Factory tool-calling agent that spots patient deterioration with NEWS2, qSOFA, personal baselines and trends
- [Conference Proposal Generator](advance_ai_agents/conference_agnositc_cfp_generator): Automated conference proposal generation system
- [Conference Talk Abstract Generator](advance_ai_agents/conference_talk_abstract_generator): Automated talk abstract generation with Google ADK and Couchbase
- [Contract Review Crew (Paralegal)](advance_ai_agents/paralegal_crew): CrewAI contract review workflow for clause extraction, risk analysis, and recommended redlines
- [Cosmos Arena Debate Council](advance_ai_agents/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](advance_ai_agents/customer_support_resolution_agent): LangChain and Nebius support agent with knowledge-base retrieval, order lookup, and human ticket escalation
- [Deep Research + Writing Agents Workshop](advance_ai_agents/deep_research_writing_agents_nebius_okahu): Nebius-powered LangChain MCP workshop with Exa research, Gemini image generation, and Okahu/Monocle eval observability
- [Deep Research Workflow](advance_ai_agents/deep_researcher_agent): Multi-stage research agent with Agno and ScrapeGraph AI
- [Due Diligence Agent](advance_ai_agents/due_diligence_agent): Multi-agent company due diligence pipeline with AG2 and TinyFish deep web scraping
- [Financial Document OS](advance_ai_agents/financial_document_os): Turns financial PDFs into an editable relational database with source-level citations
- [Financial Market Data Service](advance_ai_agents/finance_service_agent): FastAPI server for stock data and predictions with Agno
- [Financial Research Agent (AgentField)](advance_ai_agents/agentfield_finance_research_agent): Financial research agent with AgentField
- [GitHub and LinkedIn Job Finder](advance_ai_agents/job_finder_agent): LinkedIn job search automation with Bright Data integration
- [Jev Social Research Agent](advance_ai_agents/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](advance_ai_agents/coding_harness_agent): Local coding-agent prototype with file discovery, reading, and editing tools
- [Maintainer Intelligence Brief](advance_ai_agents/maintainer_brief): Weekly open-source intelligence briefs from community, security, and document signals with source citations
- [Meeting Assistant Agent](advance_ai_agents/meeting_assistant_agent): Automated meeting notes and task creation from conversations
- [Multi-Agent Coding Harness](advance_ai_agents/coding_agent_harness): Deep LangGraph coding crew with planning, repository exploration, human-gated file edits, and E2B-sandboxed test loops
- [Nebius Autonomous Pipeline Optimizer](advance_ai_agents/nebius-autoresearch-autoresearch-mar30): NYC taxi analytics pipeline optimizer with iterative code search using real-time or batch Nebius Token Factory inference
- [Pre-Meeting Intel Agent (Briefing Room)](advance_ai_agents/meeting_briefing_agent): LangGraph plan-research-reflect loop with Tavily web search that turns a company name into a cited one-page meeting brief
- [Price Monitoring Agent](advance_ai_agents/price_monitoring_agent): Price monitoring and alerting agent powered by CrewAI, Twilio, and Nebius
- [Prompt Format Benchmark](advance_ai_agents/context_engineering_pipeline): Benchmark harness for comparing XML, JSON, and Markdown prompt formats across accuracy, latency, and token usage
- [Sandboxed Browser Game Generator](advance_ai_agents/pydantic_game_agent): 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](advance_ai_agents/content_team_agent): SEO content optimization workflow with Agno and SerpAPI for Google AI Search ranking
- [Shark Tank Pitch Practice Agent](advance_ai_agents/shark_tank_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](advance_ai_agents/coding_model_arena): [Nebius Token Factory](https://dub.sh/nebius) 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](advance_ai_agents/smart_gtm_agent): Go-to-market strategy and competitive analysis agent
- [Startup Idea Validator Agent](advance_ai_agents/startup_idea_validator_agent): Agentic workflow to validate and analyze startup ideas
- [Temporal Agents](advance_ai_agents/temporal_agents/): Examples of Temporal-based AI agents
- [Temporal Transaction Agent Evaluation (Okahu + Monocle)](advance_ai_agents/temporal_agents/temporal_okahu_agent/temporal-tx-agent-eval): Evaluation and regression loop for a Temporal fraud-processing agent, using OpenTelemetry traces, deterministic checks, and LLM-graded Okahu evaluations
- [Web Intelligence Agent](advance_ai_agents/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)](advance_ai_agents/flowsentinal_audittrail): 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](fine_tuning/customer_support_datalab): Teacher-student distillation workflow to generate support data, curate it in Data Lab, fine-tune, and deploy
- [Insurance Claims Fine-Tuning](fine_tuning/insurance_claims_finetuning): Data Lab, LoRA fine-tuning, and a Gradio comparison app for insurance claims
- [Legal Tech Fine-Tuning (Self-Hosted)](fine_tuning/legal-tech-fine-tuning-nebius-cloud): Fine-tunes Gemma on UK legislation with LoRA, serves with vLLM, and exposes a FastAPI layer
- [Legal Tech Fine-Tuning (Token Factory)](fine_tuning/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](fine_tuning/open_source_llms_token_factory): Colab-first LoRA fine-tuning walkthrough to upload a dataset, train, monitor, and deploy
- [Standalone Customer Support Fine-Tuning (Colab)](fine_tuning/customer_support_standalone_colab): Fully standalone Colab notebook for the customer-support distillation and fine-tuning flow

## 📺 Tutorials & Videos

### 🎓 Course Playlists

- [**AWS Strands Course**](course/aws_strands): Complete 8-lesson course on building AI agents with AWS Strands SDK ([watch the playlist](https://www.youtube.com/playlist?list=PLMZM1DAlf0Lrc43ZtUXAwYu9DhnqxzRKZ))
- [**Voice Agents Playlist**](https://www.youtube.com/watch?v=c6t4q0tE61E&list=PLKCdxubW1354): Tutorials on building voice agents

### 🔧 Framework Tutorials

- [**AI Agents, MCP and more...**](https://www.youtube.com/playlist?list=PL2ambAOfYA6-LDz0KpVKu9vJKAqhv0KKI): Mixed tutorials and project demos
- [**Build AI Agents**](https://www.youtube.com/playlist?list=PLMZM1DAlf0LqixhAG9BDk4O_FjqnaogK8): General AI agent development tutorials
- [**Build with MCP**](https://www.youtube.com/playlist?list=PLMZM1DAlf0Lolxax4L2HS54Me8gn1gkz4): Model Context Protocol tutorials and examples

---

<div align="center">

## 📥 Stay Updated with Daily AI Insight!

Get easy-to-follow weekly tutorials and deep dives on AI, LLMs, and agent frameworks. Perfect for developers who want to learn, build, and stay ahead with new tech. Subscribe our Newsletter!

[](https://mranand.substack.com/subscribe)

</div>

---

## Getting Started

### Prerequisites

- **Python 3.10+** (Python 3.11+ recommended for newer projects)
- **Git** for cloning the repository
- **Package Manager**: `pip` or `uv` (recommended for faster installs)
- **API Keys**: Most projects require API keys (see individual project READMEs)

### Quick Start

1. **Clone the repository**

   ```bash
   git clone https://github.com/Arindam200/awesome-ai-apps.git
   cd awesome-ai-apps
   ```

2. **Choose a project** and navigate to its directory

   ```bash
   cd starter_ai_agents/agno_starter  # Example: Start with Agno starter
   ```

3. **Set up environment variables**

   ```bash
   cp .env.example .env  # Copy example environment file
   # Edit .env with your API keys
   ```

4. **Install dependencies**

   ```bash
   # Using pip
   pip install -r requirements.txt

   # OR using uv (recommended - faster)
   uv sync
   # or
   uv pip install -e .
   ```

5. **Run the project**

   ```bash
   python 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](https://github.com/Arindam200/awesome-ai-apps/issues)

**Before contributing:**

- Read our [Contributing Guidelines](CONTRIBUTING.md) 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](CODE_OF_CONDUCT.md). By participating, you agree to abide by its terms.

## 📜 License

This repository is licensed under the [MIT License](./LICENSE). Feel free to use and modify the examples for your projects.

## 👥 Core Maintainers

This project is actively maintained by:

<p align="center">
  <a href="https://github.com/Arindam200" title="Arindam Majumder">
    <img src="https://avatars.githubusercontent.com/u/109217591?s=128&v=4" width="72" height="72" alt="Arindam Majumder" style="border-radius: 50%;" />
  </a>
  &nbsp;&nbsp;&nbsp;
  <a href="https://github.com/shivaylamba" title="Shivay Lamba">
    <img src="https://avatars.githubusercontent.com/u/19529592?s=128&v=4" width="72" height="72" alt="Shivay Lamba" style="border-radius: 50%;" />
  </a>
  &nbsp;&nbsp;&nbsp;
  <a href="https://github.com/Astrodevil" title="Astrodevil">
    <img src="https://avatars.githubusercontent.com/u/73425223?s=128&v=4" width="72" height="72" alt="Astrodevil" style="border-radius: 50%;" />
  </a>
</p>

<p align="center">
  <sub>
    <a href="https://github.com/Arindam200">Arindam Majumder</a>
    &nbsp;·&nbsp;
    <a href="https://github.com/shivaylamba">Shivay Lamba</a>
    &nbsp;·&nbsp;
    <a href="https://github.com/Astrodevil">Amitesh Anand</a>
  </sub>
</p>

For any questions, suggestions, or contributions, feel free to reach out to the maintainers.

## Thank You for the Support! 🙏

[](https://star-history.dera.page/#Arindam200/awesome-ai-apps&Date)

---

### 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")

1. The browser calls agent-web; the server attaches the signed-in user's JWT.
2. The agent (or a deterministic endpoint) calls the Toolbox tool `list_my_orders`.
   The token travels in the `keycloak_token` header. **No `username` is sent** —
   the tool's schema doesn't have one.
3. Toolbox validates the JWT against the OIDC issuer (signature, issuer,
   audience), extracts `preferred_username`, and binds it into the SQL parameter.
4. Toolbox runs `... WHERE u.username = $1` as the least-privilege `toolbox_app`
   role, returns rows, and records a trace span.
5. 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 from
`toolbox/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 the
`vector_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](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

```bash
scripts/bootstrap_local.sh          # ~3–5 min: build, start, seed catalog
scripts/verify_security.sh          # confirm all 11 checks pass
```

Open 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`, then
`docker compose ... up -d agent-web`. Otherwise use the deterministic buttons,
which need no API key.

Reset demo state any time:

```bash
docker compose -f deploy/compose/docker-compose.yaml --env-file deploy/compose/.env \
  run --rm catalog          # re-seeds alice's cart + bob's order
```

## The 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 a
`sku`, 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:
```bash
# 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"))))
PY
```

**5 — 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), service
`toolbox`. 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)

```bash
scripts/verify_security.sh
```

11 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_KEY` isn't set (or `GOOGLE_API_KEY` if
  `AGENT_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.sh` is for inspecting claims, not calling Toolbox.
- **Port already in use** — published host ports are 8080/5055/8085/16687/8899/
  5544/27117; change them in `deploy/compose/docker-compose.yaml` if 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:

```yaml
parameters:
  - name: username
    type: string
    authServices:
      - name: keycloak
        field: preferred_username   # taken from the verified token, not the model
```

Verified behavior (from the running stack):

- The model-facing signature is `view_cart() -> str` — **no `username`**.
  (`add_to_cart(quantity, sku)`, `get_order_details(order_id)` — same story.)
- Calling `view_cart` with 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=<bob's>)` as alice → **zero rows**. Ownership is in
  the `WHERE` clause 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 the
`grocery-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 table
```

## Verifying it yourself

```bash
scripts/verify_security.sh
```

Runs 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](SECURITY.md)).

> Renders on GitHub, in [mermaid.live](https://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
