1919
2020from veadk import Agent
2121from veadk .a2a .agent_card import get_agent_card
22- from veadk .a2a .ve_request_converter import AuthenticatedA2ARequestConverter
23- from veadk .a2a .credentials import VeCredentialStore
2422from veadk .runner import Runner
2523from veadk .memory .short_term_memory import ShortTermMemory
2624
27- from google .adk .a2a .executor .a2a_agent_executor import (
28- A2aAgentExecutor ,
29- A2aAgentExecutorConfig ,
30- )
25+ from google .adk .a2a .executor .a2a_agent_executor import A2aAgentExecutor
3126
3227
3328class VeA2AServer :
3429 def __init__ (
35- self ,
36- agent : Agent ,
37- url : str ,
38- app_name : str ,
39- short_term_memory : ShortTermMemory ,
40- credential_service : VeCredentialStore ,
30+ self , agent : Agent , url : str , app_name : str , short_term_memory : ShortTermMemory
4131 ):
4232 self .agent_card = get_agent_card (agent , url )
4333
@@ -46,15 +36,6 @@ def __init__(
4636 agent = agent ,
4737 app_name = app_name ,
4838 ),
49- config = (
50- A2aAgentExecutorConfig (
51- request_converter = AuthenticatedA2ARequestConverter (
52- credential_service = credential_service
53- ).build_converter (),
54- )
55- if credential_service
56- else None
57- ), # If no credential_service, no need to use AuthenticatedA2ARequestConverter
5839 )
5940
6041 self .task_store = InMemoryTaskStore ()
@@ -74,11 +55,7 @@ def build(self) -> FastAPI:
7455
7556
7657def init_app (
77- server_url : str ,
78- app_name : str ,
79- agent : Agent ,
80- short_term_memory : ShortTermMemory ,
81- credential_service : VeCredentialStore | None = None ,
58+ server_url : str , app_name : str , agent : Agent , short_term_memory : ShortTermMemory
8259) -> FastAPI :
8360 """Init the fastapi application in terms of VeADK agent.
8461
@@ -87,7 +64,6 @@ def init_app(
8764 app_name: str, the name of the app
8865 agent: Agent, the agent of the app
8966 short_term_memory: ShortTermMemory, the short term memory of the app
90- credential_service: VeCredentialStore, the credential service of the app
9167
9268 Returns:
9369 FastAPI, the fastapi app
@@ -98,6 +74,5 @@ def init_app(
9874 url = server_url ,
9975 app_name = app_name ,
10076 short_term_memory = short_term_memory ,
101- credential_service = credential_service ,
10277 )
10378 return server .build ()
0 commit comments