Executor 패턴
Executor란?
아키텍처
A2A Client (Collaborator)
↓ SendMessageRequest
A2A Server (ECS)
↓
Executor (ConnectivityTroubleshootingAgentCoreExecutor)
↓ HTTP/2 POST
AgentCore Runtime
↓
TroubleshootingAgent → Lambda 도구ConnectivityTroubleshootingAgentCoreExecutor
class ConnectivityTroubleshootingAgentCoreExecutor(AgentExecutor):
def __init__(self, *, base_url, agent_arn, agent_session_id,
user_pool_id, client_id, client_secret, scope,
discovery_url, identity_provider, request_timeout_s=900):
# HTTP/2 클라이언트 (확장된 타임아웃)
self.http = httpx.Client(
timeout=httpx.Timeout(connect=10, read=900, write=30, pool=10),
http2=True,
follow_redirects=True
)
self._token_cache = _OAuthTokenCache()핵심 메서드
_bearer(): OAuth 토큰 관리
_build_agent_url(): Runtime URL 구성
execute(): 전체 실행 흐름
태스크 상태 관리
상태
메서드
시점
Executor 패턴의 장점
마지막 업데이트