Skip to content

chore: Update Demo UI to use A2A Python SDK #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion demo/ui/components/agent_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mesop as me
import pandas as pd

from common.types import AgentCard
from a2a.types import AgentCard
from state.agent_state import AgentState


Expand Down
2 changes: 1 addition & 1 deletion demo/ui/components/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import mesop as me

from common.types import Message, TextPart
from a2a.types import Message, TextPart
from state.host_agent_service import (
ListConversations,
SendMessage,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/components/form_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import mesop as me

from common.types import DataPart, Message, TextPart
from a2a.types import DataPart, Message, TextPart
from state.host_agent_service import SendMessage
from state.state import AppState, StateMessage

Expand Down
4 changes: 2 additions & 2 deletions demo/ui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"fastapi>=0.115.0",
"uvicorn>=0.34.0",
"mesop>=1.0.0",
"a2a-samples",
"a2a",
"pandas>=2.2.0",
"google-genai>=1.9.0",
"google-adk>=0.0.3",
Expand All @@ -23,7 +23,7 @@ packages = ["a2a_ui"]

[tool.uv.sources]
a2a_ui = { workspace = true }
a2a_samples = { path = "../../samples/python", editable = true }
a2a = { path = "../../a2a-python-sdk", editable = true }

[build-system]
requires = ["hatchling"]
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/service/server/adk_host_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import uuid

from common.types import (
from a2a.types import (
AgentCard,
DataPart,
FileContent,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/service/server/application_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABC, abstractmethod

from common.types import AgentCard, Message, Task
from a2a.types import AgentCard, Message, Task
from service.types import Conversation, Event


Expand Down
2 changes: 1 addition & 1 deletion demo/ui/service/server/in_memory_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import datetime
import uuid

from common.types import (
from a2a.types import (
AgentCard,
Artifact,
DataPart,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/service/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import threading
import uuid

from common.types import FileContent, FilePart, Message
from a2a.types import FileContent, FilePart, Message
from fastapi import APIRouter, Request, Response
from service.types import (
CreateConversationResponse,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/service/server/test_image.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from common.types import (
from a2a.types import (
FileContent,
FilePart,
Message,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/service/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Annotated, Literal

from common.types import (
from a2a.types import (
AgentCard,
JSONRPCRequest,
JSONRPCResponse,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/state/host_agent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from typing import Any

from common.types import Message, Part, Task
from a2a.types import Message, Part, Task
from service.client.client import ConversationClient
from service.types import (
Conversation,
Expand Down
2 changes: 1 addition & 1 deletion demo/ui/tests/test_adk_host_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from common.types import DataPart, FilePart, TextPart
from a2a.types import DataPart, FilePart, TextPart
from google.genai import types
from service.server.adk_host_manager import ADKHostManager

Expand Down
2 changes: 1 addition & 1 deletion demo/ui/utils/agent_card.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import requests

from common.types import AgentCard
from a2a.types import AgentCard


def get_agent_card(remote_agent_address: str) -> AgentCard:
Expand Down
Loading