Skip to main content
POST
/
api
/
v1
/
agents
Python (SDK)
from mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.agents.create_agent(name="release-research-agent", model="functionary-pt", description="Looks up current release information before answering.", instructions="Use web search when the question depends on current external information.", tools=[
        {
            "type": "web_search",
            "search_context_size": "medium",
        },
    ], tool_choice="auto", parallel_tool_calls=True)

    # Handle response
    print(res)
{
  "object": "agent",
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "model": "functionary-pt",
  "instructions": "<string>",
  "tools": [
    {
      "type": "web_search",
      "search_context_size": "low",
      "user_location": {
        "type": "approximate",
        "city": "<string>",
        "country": "<string>",
        "region": "<string>",
        "timezone": "<string>"
      },
      "filters": {
        "allowed_domains": [
          "<string>"
        ]
      }
    }
  ],
  "tool_choice": "<string>",
  "parallel_tool_calls": true,
  "max_tool_calls": 123,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "reasoning": {
    "effort": "low"
  },
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "deleted_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mka1.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json
name
string
required
Required string length: 1 - 120
model
string
required
Minimum string length: 1
Example:

"functionary-pt"

description
string | null
Maximum string length: 2000
instructions
string | null
Maximum string length: 20000
tools
object[]
tool_choice
parallel_tool_calls
boolean
default:true
max_tool_calls
integer | null
Required range: 1 <= x <= 300
text
object
reasoning
object
metadata
object

Response

Agent created.

object
enum<string>
required
Available options:
agent
id
string
required
name
string
required
description
string | null
required
model
string
required
Example:

"functionary-pt"

instructions
string | null
required
tools
object[]
required
tool_choice
required
parallel_tool_calls
boolean
required
max_tool_calls
integer | null
required
text
object
required
reasoning
object
required
metadata
object
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
deleted_at
string<date-time> | null
required