Skip to main content
Every command follows the same shape:
mka1 <service> <resource> <action> [flags]
For example, mka1 llm responses create or mka1 search text-store search-texts. Drill into any level with --help to see the flags that apply:
mka1 --help
mka1 llm --help
mka1 llm responses --help
mka1 llm responses create --help
Or launch the interactive TUI to browse every command:
mka1 explore
The rest of this page walks through the most common workflows. All examples assume you have authenticated the CLI — see authenticate the CLI.

Responses

Generate text, continue a thread, or run an agent with tools.
mka1 llm responses create \
  --model auto \
  --input '"Write a one-sentence summary of the MKA1 API."'
Add instructions to steer the reply:
mka1 llm responses create \
  --model auto \
  --instructions 'Reply in plain English. Keep answers under 80 words.' \
  --input '"Explain what embeddings are used for."'
Continue an earlier response without resending the history:
mka1 llm responses create \
  --model auto \
  --previous-response-id resp_123 \
  --input '"Now turn that into an email subject line."'
Stream tokens as they are produced:
mka1 llm responses create \
  --model auto \
  --input '"Write three release-notes bullets for the docs update."' \
  --stream \
  --output-format json
Offload long-running work to the background and poll later with mka1 llm responses get:
mka1 llm responses create \
  --model auto \
  --input '"Produce a 1,000-word brief."' \
  --background
See the Responses guide for the full resource model.

Conversations

Wrap multi-turn exchanges in a reusable container:
# Create a conversation
mka1 llm conversations create --metadata '{"session_id":"web-42"}'

# Use it in a response
mka1 llm responses create \
  --model auto \
  --conversation conv_123 \
  --input '"What should I ask next to refine this draft?"'

# Inspect the stored items
mka1 llm conversations list-items --conversation-id conv_123
See the conversations guide for the full lifecycle.

Files

Upload once, then reference the file from vector stores, fine-tuning jobs, or the Extract API:
mka1 llm files upload --file ./support-manual.pdf --purpose assistants
mka1 llm files list
mka1 llm files get --file-id file_123
mka1 llm files content --file-id file_123 --output-file ./downloaded.pdf

Vector stores

Index files for semantic search and retrieval:
# Create a store
mka1 llm vector-stores create --name support-knowledge

# Attach a file
mka1 llm vector-stores create-file \
  --vector-store-id vs_123 \
  --file-id file_123

# Search it
mka1 llm vector-stores search \
  --vector-store-id vs_123 \
  --query 'How do I reset an account password?'
See the files and vector stores guide for the full pattern.

Extract structured data

Run inline extraction with a JSON Schema:
mka1 llm extract extract \
  --model auto \
  --file ./invoice.pdf \
  --prompt 'Extract invoice number, vendor, total, and date.' \
  --schema '{
    "type": "object",
    "properties": {
      "invoice_number": { "type": "string" },
      "vendor_name": { "type": "string" },
      "total_amount": { "type": "number" },
      "date": { "type": "string", "format": "date" }
    },
    "required": ["invoice_number", "total_amount"]
  }'
Or save a schema once and reuse it:
mka1 llm extract create-schema --name invoice --schema @./invoice.schema.json
mka1 llm extract extract-with-schema --schema-id sch_123 --file ./invoice.pdf
See the extract structured data guide for schema design tips.

Speech

Transcribe audio or generate speech from text:
# Speech to text
mka1 llm speech transcribe --file ./call.wav

# Text to speech — save to a .wav file
mka1 llm speech speak \
  --text 'Hello, welcome to our service.' \
  --language en \
  --output-file ./welcome.wav
See the speech guide for language and voice options.

Agents

Create a reusable agent definition, then run it later:
mka1 agents create \
  --name release-research-agent \
  --model auto \
  --instructions 'Use web search when the question depends on current external information.' \
  --tools '[{"type":"web_search","search_context_size":"medium"}]'

mka1 agent-runs create \
  --agent-id agt_123 \
  --input '"What is the current stable version of Bun?"'

mka1 agent-runs list --agent-id agt_123
See the managing agents guide for the full resource model.

Prompts

Save prompts centrally and version them:
mka1 llm prompts create --name welcome-email --template @./welcome.tpl
mka1 llm prompts create-version --prompt-id prm_123 --template @./welcome.v2.tpl
mka1 llm prompts list-versions --prompt-id prm_123
mka1 llm prompts rollback --prompt-id prm_123 --version 1
See the prompt repository guide.

Models and usage

List the models available to your account and check usage:
mka1 llm models list
mka1 llm models get --model-id meetkai:functionary-pt

mka1 llm usage-stats responses --start-time 2026-04-01 --end-time 2026-04-22
mka1 llm usage-stats embeddings --start-time 2026-04-01 --end-time 2026-04-22

Permissions

Grant, revoke, and check fine-grained permissions on individual resources:
mka1 permissions llm grant \
  --resource-type completion \
  --resource-id my-completion-123 \
  --user-id user-abc456 \
  --role writer

mka1 permissions llm check \
  --resource-type completion \
  --resource-id my-completion-123 \
  --user-id user-abc456
See the authorization guide for the permission model.

Search service

The search group covers text stores, typed tables, and GraphRAG stores:
mka1 search text-store create --store-name faq
mka1 search text-store add-texts --store-name faq --texts '[{"id":"1","text":"Reset password at /account"}]'
mka1 search text-store search-texts --store-name faq --query 'password reset'
See the search guide and GraphRAG guide.

Guardrails

Inspect and test the content moderation settings applied to your traffic:
mka1 guardrails get
mka1 guardrails test --content 'Evaluate this input.'

Discover everything else

The command tree is large and most subcommands follow the same list / get / create / update / delete pattern. Lean on --help and mka1 explore to find the one you need.