Home / Servers / OpenAI API / create_agent

Create an agent

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Create an agent Creates a reusable agent without storing credentials. See agent configuration. [POST /agents]

Name on the gateway: openai_api__create_agent · may change things.

Parameters

NameTypeDescription
experimentalobjectExperimental agent settings. All experimental features default to disabled.
metadataobjectUp to 16 string key-value pairs, with keys up to 64 and values up to 512…
namestringA human-readable name for the agent. Omission or null leaves the agent unnamed.
model requiredstringThe model to use for the agent. The requested model name is preserved.
reasoningobjectConfiguration for model reasoning. Omission uses the model's default effort.
textobjectConfiguration for generated text. Defaults to the text format and medium…
service_tierauto | default | flex | priority | fast | ultrafastThe service tier used for model requests. Defaults to auto.
instructionsstringAdditional instructions appended to the agent's default base instructions.…
toolsarrayTools available to the agent. Defaults to an empty list. The tool list must…
multi_agentobjectConfiguration for creating and coordinating subagents. Subagent tools are…
compactionobjectContext compaction settings. Omission or null enables background compaction.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__create_agent",
  "arguments": {
    "model": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create an agent tool with experimental set to ….

More from OpenAI API