Skip to content

A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.

audit: fix agent_discovery_agent - add env comment, rewrite em dashes, add docstring, add uv setup steps

Tiioluwani822172df1257
diff --git a/ai_agents/agent_discovery_agent/.env.example b/ai_agents/agent_discovery_agent/.env.example
index 39bb49f..f8e267e 100644
--- a/ai_agents/agent_discovery_agent/.env.example
+++ b/ai_agents/agent_discovery_agent/.env.example
@@ -1 +1,2 @@
+# Google API key used to authenticate Gemini 3 Flash requests. Get one free at https://aistudio.google.com
GOOGLE_API_KEY=your_google_api_key_here
diff --git a/ai_agents/agent_discovery_agent/README.md b/ai_agents/agent_discovery_agent/README.md
index 15859a0..3c27af2 100644
--- a/ai_agents/agent_discovery_agent/README.md
+++ b/ai_agents/agent_discovery_agent/README.md
@@ -8,14 +8,14 @@
## Overview
-Instead of manually browsing five separate agent registries, this agent lets you ask in plain English — "find code review agents", "show me trading bots on Virtuals", "what MCP servers handle databases?" — and get structured results back in seconds.
+Instead of manually browsing five separate agent registries, this agent lets you ask in plain English: "find code review agents", "show me trading bots on Virtuals", "what MCP servers handle databases?" It returns structured results in seconds.
The agent connects to the [Registry Broker API](https://hol.org/registry/docs), a universal index that abstracts NANDA, MCP, Virtuals Protocol, A2A, and ERC-8004 into a single interface. No registry-specific integrations needed.
## Features
- **Universal Search:** Query AI agents across 5 registries with a single natural language request
-- **Agent Details:** Full metadata for any agent — capabilities, endpoints, trust score, and verification status
+- **Agent Details:** Full metadata for any agent including capabilities, endpoints, trust score, and verification status
- **Similar Agents:** Find alternatives and compare agents with similar functionality
- **Faceted Browsing:** Explore available categories, registries, and capability filters
- **Streamlit Chat UI:** Dark-themed conversational interface with example queries and session history
@@ -36,14 +36,15 @@ The agent connects to the [Registry Broker API](https://hol.org/registry/docs),
|---|---|
| LLM | Gemini 3 Flash (`gemini-3-flash-preview`) |
| Agent SDK | [Google GenAI SDK](https://github.com/googleapis/python-genai) (`google-genai`) |
-| Registry API | [Registry Broker API](https://hol.org/registry/docs) — public, no key required |
+| Registry API | [Registry Broker API](https://hol.org/registry/docs) (public, no key required) |
| HTTP client | httpx |
| UI | Streamlit |
## Prerequisites
- Python 3.10 or later
-- A Google API key — get one free at [aistudio.google.com](https://aistudio.google.com)
+- [uv](https://docs.astral.sh/uv/getting-started/installation/) (Python package manager)
+- A Google API key. Get one free at [aistudio.google.com](https://aistudio.google.com)
## Installation
@@ -62,6 +63,12 @@ cp .env.example .env
Open `.env` and add your Google API key.
+**Install dependencies**
+
+```bash
+uv sync
+```
+
## Usage
```bash
diff --git a/ai_agents/agent_discovery_agent/app.py b/ai_agents/agent_discovery_agent/app.py
index 24b2bb5..dbc8816 100644
--- a/ai_agents/agent_discovery_agent/app.py
+++ b/ai_agents/agent_discovery_agent/app.py
@@ -1,5 +1,5 @@
"""
-Agent Discovery Agent — Streamlit UI
+Agent Discovery Agent: Streamlit UI for searching and comparing AI agents across multiple registries.
"""
import json
@@ -228,6 +228,7 @@ if "total_queries" not in st.session_state:
# ── Agent logic ────────────────────────────────────────────────────────────────
def get_client(api_key: str) -> genai.Client:
+ """Create and return a Google GenAI client authenticated with the provided API key."""
return genai.Client(api_key=api_key)