harden agent builder render guidance
All checks were successful
build / build (push) Successful in 26s
All checks were successful
build / build (push) Successful in 26s
This commit is contained in:
@@ -61,6 +61,35 @@ runtime:
|
||||
Names must be plain Debian package slugs (lowercase, ``[a-z0-9.+-]``).
|
||||
Don't reach for this for Python deps — those go in ``requirements.txt``.
|
||||
|
||||
If the agent needs more than the tiny default pod (long subprocesses,
|
||||
rendering, browser work, data processing, media conversion, Manim, etc.),
|
||||
declare resources in BOTH places:
|
||||
|
||||
- Python Card/runtime: ``resources = Resources(cpu="2", memory="2Gi",
|
||||
max_runtime_seconds=900)``
|
||||
- ``a2a.yaml`` for the Gitea/Argo scaffold, which cannot import user code
|
||||
before the image is built:
|
||||
|
||||
```yaml
|
||||
runtime:
|
||||
resources:
|
||||
cpu: "2"
|
||||
memory: 2Gi
|
||||
max_runtime_seconds: 900
|
||||
```
|
||||
|
||||
For render/media agents, subprocesses must 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.
|
||||
|
||||
For Manim presentation agents specifically, generate a stable PDF fallback
|
||||
that does not require Manim rendering. If HTML/video rendering is requested,
|
||||
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.
|
||||
|
||||
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).
|
||||
@@ -113,6 +142,10 @@ Discipline:
|
||||
scaffold.
|
||||
- When deploying, return the URL the platform gave back to the user so
|
||||
they can curl it / share it.
|
||||
- After cp_deploy_tarball returns, compare ``live_skills[].input_schema``
|
||||
with the skill signatures you wrote. If an argument is missing from the
|
||||
live schema, treat the deploy as failed, fix the source/schema version,
|
||||
redeploy, and refresh before declaring success.
|
||||
- Don't fabricate functionality the user didn't ask for. One or two
|
||||
well-scoped @skill methods beats a kitchen sink.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user