{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tellers-ai/json-schema/tellers-ai-agent-message-request-schema.json",
  "title": "AgentMessageRequest",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tellers-ai-openapi.json#/components/schemas/AgentMessageRequest",
  "properties": {
    "message": {
      "type": "string",
      "title": "Message",
      "description": "The message to send to the agent"
    },
    "chat_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chat Id",
      "description": "Optional chat ID for conversation tracking"
    },
    "previous_response_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Previous Response Id",
      "description": "The ID of the previous response to the model. Use this to create multi-turn conversations."
    },
    "llm_verbosity": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "title": "Llm Verbosity",
      "description": "Verbosity for this message: higher values yield longer, more detailed responses. Use this to set the verbosity. Defaults to the default mode's verbosity. A value the chosen model does not advertise in `available_llm_models` is replaced by that model's standard verbosity.",
      "default": "low"
    },
    "llm_reasoning_effort": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "minimal",
            "low",
            "medium",
            "high",
            "xhigh",
            "max"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Llm Reasoning Effort",
      "description": "Reasoning effort for this message: higher values yield more precise but slower responses. Use this to set the effort. Defaults to the default mode's effort. A value the chosen model does not advertise in `available_llm_models` is replaced by that model's standard effort.",
      "default": "high"
    },
    "priority": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "low",
            "default",
            "high",
            "ultra"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Priority",
      "description": "Priority level for the response: 'low' (cheaper/slower), 'default' (standard), 'high' (premium/low-latency), or 'ultra' (OpenAI Ultrafast: several times faster output at 1.5-3x the 'high' price, depending on the model). Only levels in the chosen model's `available_priorities` (see GET /) take effect; others fall back to 'default'.",
      "default": "default"
    },
    "context": {
      "anyOf": [
        {
          "$ref": "#/$defs/AppContext"
        },
        {
          "type": "null"
        }
      ],
      "description": "The app context when the response is sent."
    },
    "llm_model": {
      "type": "string",
      "enum": [
        "gpt-6.2-astra",
        "gpt-6.2-sol",
        "gpt-6-astra",
        "gpt-6.1-sol",
        "gpt-6.1-terra",
        "gpt-6-sol",
        "gpt-6-luna",
        "gpt-5.6-sol",
        "gpt-5.6-terra",
        "gpt-5.6-luna",
        "gpt-5.5-2026-04-23",
        "gpt-5.5-pro-2026-04-23",
        "gpt-5.4-pro-2026-03-05",
        "gpt-5.4",
        "gpt-5.4-mini",
        "gpt-5.3-codex",
        "gpt-5.2-2025-12-11",
        "gpt-5-mini-2025-08-07",
        "gpt-5-nano"
      ],
      "title": "Llm Model",
      "description": "The model to use to generate the response.",
      "default": "gpt-6.1-terra"
    },
    "tools": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tools",
      "description": "The tools to use to generate the response. Defaults to the same as GET /settings (AVAILABLE_AGENT_TOOLS if set, else all tools)."
    },
    "custom_agent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Custom Agent Id",
      "description": "The ID of the custom agent to use to generate the response. If not provided, the default custom agent will be used."
    },
    "parallel_tool_calls": {
      "type": "boolean",
      "title": "Parallel Tool Calls",
      "description": "Whether to allow parallel tool calls. Defaults to true. If True, the tool calls will be executed in parallel. If False, the tool calls will be executed sequentially.",
      "default": true
    },
    "compaction": {
      "type": "boolean",
      "title": "Compaction",
      "description": "Whether to enable automatic context cleanup when the selected model supports it. This keeps long conversations manageable.",
      "default": true
    },
    "prefer_compaction": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 20000.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Prefer Compaction",
      "description": "Preferred input-token size to compact the conversation at, when `compaction` is enabled and the model supports it. A preference, not a guarantee: it is capped at the chosen model's own threshold (`compaction_threshold` in `available_llm_models`), which is also what is used when this is unset, because past that point compaction is what keeps the request inside the context window. Lower it to have long conversations compacted earlier."
    },
    "tool_exposure": {
      "$ref": "#/$defs/ToolExposure",
      "description": "How much of each tool the model is shown up front. 'flat_search' (default) defers the parameter schemas behind the model's tool_search tool but keeps every tool name and description visible, because a deferred top-level function still shows both — roughly 10k tokens up front. 'search' groups deferred tools into namespaces, showing only namespace descriptions up front. 'flat' defers nothing — every schema up front as a plain function list, no tool_search, roughly 45k tokens — and is how you rule out tool discovery entirely when the agent does not call a tool you expect it to. Both deferring values fall back to 'flat' on models without tool_search.",
      "default": "flat_search"
    },
    "max_tellers_token": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Tellers Token",
      "description": "Maximum cumulative Tellers Token budget for the agent run."
    },
    "no_interaction": {
      "type": "boolean",
      "title": "No Interaction",
      "description": "Whether to disable interaction with the agent. If True, the agent will try to generate a response without interacting with the user.",
      "default": false
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "message"
  ],
  "$defs": {
    "AppContext": {
      "properties": {
        "current_playback_time": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Current Playback Time",
          "description": "The current playback time in the project when the response is sent."
        },
        "on_screen_asset": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "On Screen Asset",
          "description": "The id of the asset on screen when the response is sent."
        },
        "on_screen_project": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "On Screen Project",
          "description": "The id of the project on screen when the response is sent."
        },
        "selected_clips": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Selected Clips",
          "description": "The ids of the clips selected when the response is sent."
        },
        "selected_assets": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Selected Assets",
          "description": "The ids of the assets selected when the response is sent."
        },
        "selected_projects": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Selected Projects",
          "description": "The ids of the projects selected when the response is sent."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "AppContext"
    },
    "ToolExposure": {
      "type": "string",
      "enum": [
        "search",
        "flat_search",
        "flat"
      ],
      "title": "ToolExposure",
      "description": "How much of a tool the model is shown up front.\n\nWhat deferral hides depends on whether the tool is in a namespace, and the\ndifference is the whole point of this enum. Per OpenAI's tool search guide:\na deferred tool *inside a namespace* is hidden completely — the model sees\nonly the namespace name and description — while a deferred *top-level*\nfunction still shows its name and description, so deferral there only holds\nback the parameter schema. Measured over the current 56 tools:\n\n==============  ============================  ==========\nexposure        visible up front              tokens\n==============  ============================  ==========\n``search``      11 namespace descriptions          ~0.5k\n``flat_search`` 56 tool names + descriptions      ~10.2k\n``flat``        the above plus every schema       ~44.6k\n==============  ============================  ==========\n\n``search`` uses namespace descriptions and hides the names inside them;\n``flat_search`` exposes top-level tool names and descriptions while\ndeferring only parameter schemas. ``flat`` removes deferral entirely.\n\nGrouping without deferring is deliberately not offered: namespaces exist\nto make search legible, so once every schema is up front they buy nothing\nand cost their own descriptions.\n\nThe member value is what the API accepts on the wire."
    }
  }
}