add remote sub agent

This commit is contained in:
4pmtong 2026-05-12 12:37:00 +08:00
parent 5baad7283a
commit b467ff2e4c
4 changed files with 10 additions and 13 deletions

View file

@ -29,4 +29,3 @@ class RemoteSubAgentConfig(BaseModel):
enabled: bool = False
provider: str = DEFAULT_REMOTE_SUB_AGENT_PROVIDER
gemini_agents: GeminiRemoteSubAgentConfig | None = None

View file

@ -13,4 +13,3 @@
# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
DEFAULT_REMOTE_SUB_AGENT_PROVIDER = "gemini_agents"

View file

@ -36,11 +36,14 @@ class RemoteSubAgentProviderAdapter:
def get_configured_provider_name(
remote_sub_agent_config: Any | None,
) -> str:
return _config_str(
remote_sub_agent_config,
"provider",
DEFAULT_REMOTE_SUB_AGENT_PROVIDER,
) or DEFAULT_REMOTE_SUB_AGENT_PROVIDER
return (
_config_str(
remote_sub_agent_config,
"provider",
DEFAULT_REMOTE_SUB_AGENT_PROVIDER,
)
or DEFAULT_REMOTE_SUB_AGENT_PROVIDER
)
def get_provider_config(

View file

@ -60,12 +60,8 @@ class RemoteSubAgentRuntime:
remote_agent_name=request.remote_agent_name,
session_key=session_key,
)
if (
not request.reuse_session
and (
session.remote_interaction_id
or session.remote_environment_id
)
if not request.reuse_session and (
session.remote_interaction_id or session.remote_environment_id
):
logger.info(
"RemoteSubAgent existing session found; reusing it",