From 640d1b89ca002b56ab1684c930f0401937f4bd9b Mon Sep 17 00:00:00 2001 From: robert Date: Mon, 11 May 2026 21:30:47 -0300 Subject: [PATCH] tools: form field is 'source' on /v1/agents/from-tarball, not 'tarball' --- agent_builder/tools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent_builder/tools.py b/agent_builder/tools.py index 4fd2681..a7f4a5b 100644 --- a/agent_builder/tools.py +++ b/agent_builder/tools.py @@ -202,11 +202,13 @@ def build_tools(ctx: ToolContext) -> list[Any]: # Read the entrypoint from a2a.yaml so we can pass it verbatim. entrypoint = _read_entrypoint(bundle_bytes) or f"agent:{_class_name(name)}" - files = {"tarball": (f"{name}.tar.gz", bundle_bytes, "application/gzip")} + # NOTE: the CP from-tarball endpoint names the file field + # ``source`` (see apps/control-plane/control_plane/routes/agents.py). + files = {"source": (f"{name}.tar.gz", bundle_bytes, "application/gzip")} data = { "name": name, "version": version, "entrypoint": entrypoint, "public": "true" if public else "false", - "description": f"Built by agent-builder.", + "description": "Built by agent-builder.", } try: async with httpx.AsyncClient(timeout=60.0) as c: