This commit is contained in:
2
a2a.yaml
2
a2a.yaml
@@ -1,5 +1,5 @@
|
|||||||
name: agent-builder
|
name: agent-builder
|
||||||
version: 0.1.7
|
version: 0.1.8
|
||||||
entrypoint: agent:AgentBuilder
|
entrypoint: agent:AgentBuilder
|
||||||
description: Generate, test, and deploy new a2a agents from natural language.
|
description: Generate, test, and deploy new a2a agents from natural language.
|
||||||
expose:
|
expose:
|
||||||
|
|||||||
11
agent.py
11
agent.py
@@ -39,7 +39,8 @@ class BuilderConfig(BaseModel):
|
|||||||
|
|
||||||
_URL_RE = re.compile(r"https?://[a-zA-Z0-9._-]+\.[a-zA-Z]{2,}[\w/?#%&=.-]*")
|
_URL_RE = re.compile(r"https?://[a-zA-Z0-9._-]+\.[a-zA-Z]{2,}[\w/?#%&=.-]*")
|
||||||
DEEPAGENTS_RECURSION_LIMIT = 500
|
DEEPAGENTS_RECURSION_LIMIT = 500
|
||||||
BUILDER_WALL_TIMEOUT_SECONDS = 25 * 60
|
BUILDER_WALL_TIMEOUT_SECONDS = 60 * 60
|
||||||
|
BUILDER_GRANT_RUN_TIMEOUT_SECONDS = BUILDER_WALL_TIMEOUT_SECONDS - 60
|
||||||
|
|
||||||
|
|
||||||
class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
|
class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
|
||||||
@@ -49,7 +50,7 @@ class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
|
|||||||
"Writes the project into the user's workspace, validates it in a "
|
"Writes the project into the user's workspace, validates it in a "
|
||||||
"sandbox, then ships it via the control plane."
|
"sandbox, then ships it via the control plane."
|
||||||
)
|
)
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
|
|
||||||
config_model = BuilderConfig
|
config_model = BuilderConfig
|
||||||
auth_model = NoAuth
|
auth_model = NoAuth
|
||||||
@@ -76,14 +77,14 @@ class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
|
|||||||
),
|
),
|
||||||
tags=["builder", "scaffold", "deepagents", "meta"],
|
tags=["builder", "scaffold", "deepagents", "meta"],
|
||||||
stream=True,
|
stream=True,
|
||||||
timeout_seconds=1800,
|
timeout_seconds=BUILDER_WALL_TIMEOUT_SECONDS,
|
||||||
cost_class="expensive",
|
cost_class="expensive",
|
||||||
grant_mode="read_write_overlay",
|
grant_mode="read_write_overlay",
|
||||||
grant_allow_patterns=("agents/{name}/**",),
|
grant_allow_patterns=("agents/{name}/**",),
|
||||||
grant_outputs_prefix="agents/{name}/",
|
grant_outputs_prefix="agents/{name}/",
|
||||||
grant_write_prefixes=("agents/{name}/",),
|
grant_write_prefixes=("agents/{name}/",),
|
||||||
grant_ttl_seconds=1800,
|
grant_ttl_seconds=BUILDER_WALL_TIMEOUT_SECONDS,
|
||||||
grant_run_timeout_seconds=1740,
|
grant_run_timeout_seconds=BUILDER_GRANT_RUN_TIMEOUT_SECONDS,
|
||||||
grant_approval_timeout_seconds=180,
|
grant_approval_timeout_seconds=180,
|
||||||
grant_scope_approval_timeout_seconds=120,
|
grant_scope_approval_timeout_seconds=120,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
enableServiceLinks: false
|
enableServiceLinks: false
|
||||||
containerConcurrency: 10
|
containerConcurrency: 10
|
||||||
timeoutSeconds: 1800
|
timeoutSeconds: 3600
|
||||||
responseStartTimeoutSeconds: 1800
|
responseStartTimeoutSeconds: 3600
|
||||||
containers:
|
containers:
|
||||||
- name: agent
|
- name: agent
|
||||||
image: registry.a2acloud.io/agents/agent-builder:a5913d6c2cb856a9941c529c027506c6c12b7d4e
|
image: registry.a2acloud.io/agents/agent-builder:a5913d6c2cb856a9941c529c027506c6c12b7d4e
|
||||||
|
|||||||
@@ -162,10 +162,17 @@ class BuilderPromptTests(unittest.TestCase):
|
|||||||
self.assertIn("caller's saved LLM credential", agent_source)
|
self.assertIn("caller's saved LLM credential", agent_source)
|
||||||
|
|
||||||
def test_builder_defaults_raise_timeout_budget(self) -> None:
|
def test_builder_defaults_raise_timeout_budget(self) -> None:
|
||||||
|
agent_source = Path(__file__).resolve().parents[1].joinpath("agent.py").read_text()
|
||||||
config_source = Path(__file__).resolve().parents[1].joinpath(
|
config_source = Path(__file__).resolve().parents[1].joinpath(
|
||||||
"agent_builder/config.py"
|
"agent_builder/config.py"
|
||||||
).read_text()
|
).read_text()
|
||||||
|
|
||||||
|
self.assertIn("BUILDER_WALL_TIMEOUT_SECONDS = 60 * 60", agent_source)
|
||||||
|
self.assertIn("timeout_seconds=BUILDER_WALL_TIMEOUT_SECONDS", agent_source)
|
||||||
|
self.assertIn(
|
||||||
|
"grant_run_timeout_seconds=BUILDER_GRANT_RUN_TIMEOUT_SECONDS",
|
||||||
|
agent_source,
|
||||||
|
)
|
||||||
self.assertIn('os.environ.get("A2A_SANDBOX_TIMEOUT_S")', config_source)
|
self.assertIn('os.environ.get("A2A_SANDBOX_TIMEOUT_S")', config_source)
|
||||||
self.assertIn('os.environ.get("SANDBOX_TIMEOUT_S", "1200")', config_source)
|
self.assertIn('os.environ.get("SANDBOX_TIMEOUT_S", "1200")', config_source)
|
||||||
self.assertIn('deploy_wait_timeout_s=int(os.environ.get("DEPLOY_WAIT_TIMEOUT_S", "900"))', config_source)
|
self.assertIn('deploy_wait_timeout_s=int(os.environ.get("DEPLOY_WAIT_TIMEOUT_S", "900"))', config_source)
|
||||||
|
|||||||
Reference in New Issue
Block a user