Skip to content

Agent Zero AI framework

prompts: clarify unfenced JSON output

Alessandrocfb7349c1102
diff --git a/prompts/agent.system.main.communication.md b/prompts/agent.system.main.communication.md
index 0e2af514d..4eb01ff9b 100644
--- a/prompts/agent.system.main.communication.md
+++ b/prompts/agent.system.main.communication.md
@@ -15,8 +15,9 @@
- No text output before or after the JSON object
+Fences in the examples below are documentation formatting only. Your actual output starts with `{` and ends with `}` — no fences, no language tag, no prose.
+
### Response example
-~~~json
{
"thoughts": [
"instructions?",
@@ -31,6 +32,5 @@
"arg2": "val2"
}
}
-~~~
{{ include "agent.system.main.communication_additions.md" }}
diff --git a/tests/test_default_prompt_budget.py b/tests/test_default_prompt_budget.py
index eddac9b44..92886a4f2 100644
--- a/tests/test_default_prompt_budget.py
+++ b/tests/test_default_prompt_budget.py
@@ -45,6 +45,9 @@ async def _build_system_text(profile: str = "agent0") -> str:
@pytest.mark.asyncio
async def test_default_agent0_prompt_budget_and_guardrails():
system_text = await _build_system_text()
+ communication_prompt = (
+ PROJECT_ROOT / "prompts" / "agent.system.main.communication.md"
+ ).read_text(encoding="utf-8")
# The default prompt now intentionally includes the compact always-on tool
# surface plus skill metadata. Keep the guardrail close to the observed
@@ -62,6 +65,8 @@ async def test_default_agent0_prompt_budget_and_guardrails():
assert '"tool_name": "code_execution_tool"' in system_text
assert '"tool_name": "memory_load"' in system_text
assert "informative but tight" in system_text
+ assert "Your actual output starts with `{` and ends with `}`" in system_text
+ assert "~~~json" not in communication_prompt
assert "# code_execution_remote tool" not in system_text
assert "# text_editor_remote tool" not in system_text
assert "### computer_use_remote" not in system_text