@@ -11,23 +11,37 @@ The core workflow is **discover → inspect → connect**:
1111
12121 . ** Discover** — search ARD registries for resources matching a natural-language query.
13132 . ** Inspect** — fetch the full artifact (agent card, skill markdown, MCP descriptor) by URL.
14- 3 . ** Connect** — send a message to a remote A2A agent and get a response.
14+ 3 . ** Connect** — send a message to a remote A2A agent and get a response (which may be the start of a long-running A2A conversation) .
1515
1616## Quick Start
1717
18+ ### 1. Create the agent (` agent.py ` )
19+
1820``` python
1921from google.adk import Agent
2022from google.adk_community.tools.ardhf import AgentFinderToolset
2123
22- agent = Agent(
23- name = " my_agent" ,
24- instruction = " Search for tools when you need a capability." ,
24+ root_agent = Agent(
25+ name = " discovery_agent" ,
26+ description = " An agent that discovers and connects to agentic resources." ,
27+ instruction = " Search for agents, skills, and tools when you need a capability." ,
2528 tools = [AgentFinderToolset()],
2629)
2730```
2831
29- That's it — the agent now has access to all discovery tools and can search,
30- inspect, and connect to agentic resources.
32+ ### 2. Run the app
33+
34+ ``` bash
35+ # Interactive web UI
36+ adk web .
37+
38+ # Or run programmatically
39+ adk run .
40+ ```
41+
42+ The agent is an ADK app — serve it with ` adk web ` for the interactive UI,
43+ or ` adk run ` for CLI mode. The toolset provides all discovery and connection
44+ tools automatically.
3145
3246## Available Tools
3347
@@ -39,7 +53,7 @@ inspect, and connect to agentic resources.
3953| ` search_tools ` | Search filtered to MCP servers (` application/mcp-server+json ` ) |
4054| ` search_spaces ` | Search filtered to HuggingFace Spaces (` application/vnd.huggingface.space+json ` ) |
4155| ` get_agent_card ` | Fetch a specific artifact (agent card, skill markdown, MCP descriptor) by URL |
42- | ` connect_agent ` | Send a message to a remote A2A agent and return the response |
56+ | ` connect_agent ` | Send a message to a remote A2A agent — may return an immediate response or start a long-running task with its own lifecycle |
4357
4458The ` search_agents ` , ` search_skills ` , ` search_tools ` , and ` search_spaces `
4559tools are convenience aliases — each calls the same core search logic with
@@ -105,6 +119,30 @@ Agent: [calls connect_agent('https://.../agent.json', 'Create a minimalist logo
105119Agent: The image generation agent responded with: ...
106120```
107121
122+ ** Note on A2A conversations:** ` connect_agent ` sends a single message and
123+ collects the response, but the remote agent may return a ** long-running task**
124+ with its own lifecycle (submitted → working → completed). The response you
125+ get back may be the final result or an intermediate status. This initial
126+ exchange is the ** beginning of an A2A conversation** — for multi-turn
127+ interactions with a discovered agent, consider using ADK's ` RemoteA2aAgent `
128+ directly with the agent card URL returned by ` get_agent_card ` :
129+
130+ ``` python
131+ from google.adk.agents.remote_a2a_agent import RemoteA2aAgent
132+
133+ # After discovering an agent via search_agents + get_agent_card:
134+ remote = RemoteA2aAgent(
135+ name = " discovered_agent" ,
136+ agent_card = " https://example.com/.well-known/agent.json" ,
137+ )
138+
139+ # Use as a sub-agent for ongoing A2A conversation
140+ orchestrator = Agent(
141+ name = " orchestrator" ,
142+ sub_agents = [remote],
143+ )
144+ ```
145+
108146### Discovering HuggingFace Spaces
109147
110148> "Find a text-to-speech Space"
@@ -244,9 +282,9 @@ fixed fixtures — no API keys or network access needed:
244282pip install hf-agentfinder
245283hf-agentfinder challenge serve --port 8090
246284
247- # Terminal 2: run the sample agent against it
248- ARDHF_REGISTRY_URL=http://127.0.0.1:8090 \
249- adk web contributing/samples/ardhf
285+ # Terminal 2: run the sample app against it
286+ cd contributing/samples/ardhf
287+ ARDHF_REGISTRY_URL=http://127.0.0.1:8090 adk web .
250288```
251289
252290### Running the unit tests
0 commit comments