Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 545 Bytes

File metadata and controls

31 lines (26 loc) · 545 Bytes

Tool Agent JSON Schema

The tool agent communicates exclusively using JSON in one of two forms:

1. Tool Invocation

{
  "tool": "<tool_name>",
  "args": {
    /* arguments matching the tool's input_schema */
  }
}

2. Final Response

{
  "final": "<answer text>"
}

Any other output is considered invalid.

Example Transcript

System: <prompt listing tools>
User: "What is 2 + 2?"
Assistant: {"tool": "calculator", "args": {"expression": "2+2"}}
User: {"result": 4}
Assistant: {"final": "2 + 2 = 4"}