from mka1 import SDK, models
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agent_runs.create_agent_run(agent_id="<id>", input=[
models.CreateAgentRunRequestInput(
type="<value>",
),
])
# Handle response
print(res){
"object": "agent.run",
"id": "<string>",
"agent_id": "<string>",
"status": "queued",
"input": "<string>",
"conversation": "<string>",
"previous_response_id": "<string>",
"metadata": {},
"gateway_response_id": "<string>",
"gateway_response": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.
from mka1 import SDK, models
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agent_runs.create_agent_run(agent_id="<id>", input=[
models.CreateAgentRunRequestInput(
type="<value>",
),
])
# Handle response
print(res){
"object": "agent.run",
"id": "<string>",
"agent_id": "<string>",
"status": "queued",
"input": "<string>",
"conversation": "<string>",
"previous_response_id": "<string>",
"metadata": {},
"gateway_response_id": "<string>",
"gateway_response": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_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.
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>.
Optional external end-user identifier forwarded by the API gateway.
Queued run.
agent.run queued, completed, failed Show child attributes
Was this page helpful?