Getting started
The fastest path is to authenticate the CLI, then ask your coding agent to do the integration.
- Install the CLI
- Log in
- Prompt your agent
Install the CLI
Log in
This opens a browser to authenticate, then saves an API key to ~/.maitai/config so the CLI (and agent tooling that uses it) can call the Maitai API.
For CI or headless environments, create a key in the Portal under Settings > API Keys, then run:
See Authentication and the CLI Reference for other options.
Prompt your agent
In Cursor, Claude Code, Codex, or whichever agent you use, ask it to integrate Maitai for you. Pick the prompt that matches what you want:
Switch OpenAI calls to Maitai
Add traces to agent runs
Build and wire a workflow
Your agent can use the CLI and docs to install the SDK, update your client calls, create Applications/Intents/Workflows, and verify traffic in the Portal.
See it in the Portal
Once your agent finishes and your app makes a request (or a workflow/agent run), open portal.trymaitai.com to inspect the new Application/Intent resources, requests, and sessions.
Prefer to do it yourself?
You can also install the SDK and send a chat completion manually:
session_id is optional (the SDK will generate one if you omit it), but you’ll get the best Portal experience if you provide a stable session id per user/session.
Full chat reference: Chat. Already on an OpenAI-compatible SDK? See Base URL integration.
Next Steps
- Tune configuration in the Portal: Configuration
- Add domain context to improve responses: upload application context entries in the Portal (Application > Edit > Add Context Entry)
- Build a regression suite: Test Sets
- Optional: set up alerts in the Portal (
Settings > Notifications)