mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-22 11:15:47 +00:00
add remote sub agent
This commit is contained in:
parent
5baad7283a
commit
b467ff2e4c
4 changed files with 10 additions and 13 deletions
|
|
@ -29,4 +29,3 @@ class RemoteSubAgentConfig(BaseModel):
|
|||
enabled: bool = False
|
||||
provider: str = DEFAULT_REMOTE_SUB_AGENT_PROVIDER
|
||||
gemini_agents: GeminiRemoteSubAgentConfig | None = None
|
||||
|
||||
|
|
|
|||
|
|
@ -13,4 +13,3 @@
|
|||
# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
|
||||
|
||||
DEFAULT_REMOTE_SUB_AGENT_PROVIDER = "gemini_agents"
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue