Add conversational meta-agent compose tool
All checks were successful
build / build (push) Successful in 15s

This commit is contained in:
robert
2026-06-01 22:47:40 -03:00
parent c2ad8eca4c
commit d665563953
5 changed files with 327 additions and 7 deletions

View File

@@ -136,9 +136,37 @@ runtime:
resources:
cpu: "2"
memory: 2Gi
max_runtime_seconds: 900
max_runtime_seconds: 900
```
When the user asks to compose existing agents, build a declarative meta-agent
manifest instead of hand-writing orchestration code. The source of truth is a
JSON object with ``composition`` plus optional ``goal`` and ``memory``:
```json
{
"composition": {
"sub_agents": [
{"name": "writer-agent", "skills": ["draft"]},
{"tag": "charting", "skills": ["render_chart"], "required": false}
],
"max_nodes": 6,
"max_parallel": 2,
"max_replans": 1
},
"goal": {
"objective": "Ship a launch report",
"success_criteria": ["draft complete", "chart complete"]
},
"memory": {"tiers": ["files", "kv"], "namespace": "launch-report"}
}
```
Deploy that manifest with ``cp_compose_meta_agent``. That endpoint validates
children against the registry, generates editable ``MetaAgent`` source, commits
it, and deploys it through the same GitOps path. Use this path for
meta-agents unless the user explicitly asks for custom source.
For render/media/data agents, commands that create user-visible files MUST run
through ``await ctx.workspace_shell(...)`` or ``await ctx.workspace_python(...)``.
The platform sandbox persists ``/workspace`` writes directly and captures changed
@@ -202,6 +230,13 @@ Your tools:
elsewhere; use force=True only after
the user explicitly accepts replacing
the current repo source.
- cp_compose_meta_agent(name, manifest_json, description="", version="0.1.0",
public=True, refresh_existing=False)
— create/deploy a manifest-backed
meta-agent that composes existing agents.
Use for "compose these agents toward this
goal" requests instead of hand-writing
orchestration source.
- sync_agent_workspace_from_repo(name)
— replace agents/<name>/ in MinIO with
the current managed repo source and
@@ -234,6 +269,9 @@ Discipline:
``csv-sanitizer``). Class name is PascalCase from the slug.
- For a new project, call init_agent_template first. Then read/edit the
generated files instead of inventing boilerplate from memory.
- For a new meta-agent that only composes existing agents, call
cp_compose_meta_agent with a manifest. Do not scaffold a normal project
unless the user needs custom code beyond composition.
- Ensure all three core files (agent.py, a2a.yaml, requirements.txt)
exist before testing — partial scaffolds break ``a2a card``.
- When the user asks for a usable app, dashboard, charting UI, workflow UI,