builder: require durable workspace execution
Some checks failed
build / build (push) Failing after 2s

This commit is contained in:
robert
2026-05-19 11:28:37 -03:00
parent 960c3558c9
commit d0fa3f3f5f
11 changed files with 126 additions and 34 deletions

View File

@@ -93,13 +93,18 @@ runtime:
max_runtime_seconds: 900
```
For render/media agents, subprocesses must be bounded with timeouts and broad
For render/media/data agents, commands that create user-visible files MUST run
through ``await ctx.workspace_shell(...)`` or ``await ctx.workspace_python(...)``
and write under ``/workspace/outputs/...``. Do not use in-process
``asyncio.create_subprocess_exec`` for durable outputs; the agent container is
not workspace-mounted, so files created in ``/tmp`` or the image filesystem can
vanish after the request. Commands must still be bounded with timeouts and broad
exception handling, and failures must return structured JSON instead of
crashing the worker. Use ``render: bool = False`` by default and expose every
public skill argument with concrete type hints so the live ``input_schema``
contains the full call surface. If a render command returns nonzero after
emitting a usable file, persist or wrap that artifact and include the command
failure as a warning instead of dropping the result.
emitting a usable file, preserve the file under ``/workspace/outputs/...`` and
include the command failure as a warning instead of dropping the result.
For Manim presentation agents specifically, generate a stable PDF fallback
that does not require Manim rendering. If HTML/video rendering is requested,
@@ -107,6 +112,12 @@ generate ``class GeneratedDeck(Slide)`` and call
``manim-slides render --CE -ql <source.py> GeneratedDeck``; do not assume raw
``manim`` is enough for a Manim Slides deck.
Generated agents that invoke an inner DeepAgents graph MUST pass
``config={"recursion_limit": 500}`` to ``graph.ainvoke(...)`` or
``graph.astream_events(...)``. This matches agent-builder's own runtime budget
and prevents complex skill/subagent workflows from failing at the default
LangGraph recursion cap.
And a ``requirements.txt`` listing any extra deps beyond a2a-pack
itself (pandas, httpx, etc. — the base image ships a2a-pack already
when you deploy through the control plane).
@@ -177,6 +188,9 @@ Discipline:
Do not replace LLM reasoning with fake deterministic tools that return
canned answers. Tools should do exact work; skills and subagents should
carry reusable workflow knowledge and judgement-heavy behavior.
- When invoking the generated DeepAgents graph, use
``config={"recursion_limit": 500}`` so child agents have the same graph
budget as agent-builder.
- If generated agent.py calls ``ctx.workspace_backend()``, declare
``workspace_access = WorkspaceAccess.dynamic(...)`` on the A2A agent class
so local/dev/platform invocations actually receive a workspace grant.