Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 4 additions & 28 deletions samples/agent/adk/restaurant_finder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
from a2a.server.apps import A2AStarletteApplication
from a2a.server.request_handlers import DefaultRequestHandler
from a2a.server.tasks import InMemoryTaskStore
from a2a.types import AgentCapabilities, AgentCard, AgentSkill
from a2ui.extension.a2ui_extension import get_a2ui_agent_extension
from agent import RestaurantAgent
from agent_executor import RestaurantAgentExecutor
from dotenv import load_dotenv
Expand Down Expand Up @@ -50,41 +48,19 @@ def main(host, port):
" is not TRUE."
)

capabilities = AgentCapabilities(
streaming=True,
extensions=[get_a2ui_agent_extension()],
)
skill = AgentSkill(
id="find_restaurants",
name="Find Restaurants Tool",
description=(
"Helps find restaurants based on user criteria (e.g., cuisine, location)."
),
tags=["restaurant", "finder"],
examples=["Find me the top 10 chinese restaurants in the US"],
)

base_url = f"http://{host}:{port}"

agent_card = AgentCard(
name="Restaurant Agent",
description="This agent helps find restaurants based on user criteria.",
url=base_url, # <-- Use base_url here
version="1.0.0",
default_input_modes=RestaurantAgent.SUPPORTED_CONTENT_TYPES,
default_output_modes=RestaurantAgent.SUPPORTED_CONTENT_TYPES,
capabilities=capabilities,
skills=[skill],
)
ui_agent = RestaurantAgent(base_url=base_url, use_ui=True)
text_agent = RestaurantAgent(base_url=base_url, use_ui=False)

agent_executor = RestaurantAgentExecutor(base_url=base_url)
agent_executor = RestaurantAgentExecutor(ui_agent, text_agent)

request_handler = DefaultRequestHandler(
agent_executor=agent_executor,
task_store=InMemoryTaskStore(),
)
server = A2AStarletteApplication(
agent_card=agent_card, http_handler=request_handler
agent_card=ui_agent.get_agent_card(), http_handler=request_handler
)
import uvicorn

Expand Down
186 changes: 0 additions & 186 deletions samples/agent/adk/restaurant_finder/a2ui_examples.py

This file was deleted.

Loading
Loading