Use Your Coding Agent
Your coding agent (Claude Code, Cursor, or anything that reads URLs) can integrate m8tes for you. Paste one prompt; it pulls the full docs corpus and writes the integration against your codebase. This page is about your agent doing the integration work, not the agents m8tes hosts.
The prompt
Copy this into your coding agent, add what you want built, and go:
Integrate the m8tes API into this project.
Docs (read these first):
- Full docs corpus: https://m8tes.ai/llms-full.txt
- Quick start: https://m8tes.ai/docs/quickstart
- API reference: https://m8tes.ai/docs/api-reference
- Error catalog: https://m8tes.ai/docs/api-errors
Ground rules:
- Base URL is https://api.m8tes.ai/api/v2 (the /api/v2 prefix is required).
- Python: pip install m8tes, then "from m8tes import M8tes"; the client reads
the M8TES_API_KEY env var. Never hardcode the key.
- Every run belongs to a task; pull a task's results with
client.runs.list(task_id=..., user_id="customer_123").
- After a run, gate on run.error_code before trusting run.output. The error
catalog explains each code and whether a retry is safe.
- Multi-tenant: pass user_id on agents/runs/memories to isolate my end users.
What I want built:
[describe your feature, e.g. "a scheduled weekly report agent whose results
render on our dashboard"]Credentials
Set the API key as an environment variable. Never paste it into a prompt or commit it:
export M8TES_API_KEY=m8_your_key_hereCreate or rotate a key with POST /api/v2/token or from the Developer dashboard.
No account yet?
Create one in Python; the key comes back immediately:
import m8tes
result = m8tes.signup("you@example.com", "yourpassword", "yourname")
print(result.api_key) # export as M8TES_API_KEYOr let the agent sign you up (passwordless HTTP flow)
POST /api/v2/signup needs no auth. Omit password and the agent stays credential-free:
curl -X POST https://api.m8tes.ai/api/v2/signup \
-H "Content-Type: application/json" \
-d '{"email": "alex@acme.com", "first_name": "alex"}'The response contains a setup-only API key. The activation link is emailed to the person only; it is never in the API response. From there:
- Connect a model plan (local) or use the $1 test lane / top up (prod embeds), then set up. For a cold hello-world, run
deepseek-v4-1-flashon the API starter credit. For personal development, connect a matching model subscription and run withoutuser_id. For production embeds, top up after the starter pin for the full catalog. Then use the key as a Bearer token to create agents and start runs. Unverified accounts may complete up to 25 runs before email verification is required. - Detect the gate. After that verification threshold, runs return
403witherror.details.error_code == "EMAIL_VERIFICATION_REQUIRED". Tell the person to open the activation email; resend it withPOST /api/v2/verify/resend. - Hand off. The person clicks the link, sets a password, and activates. At activation the setup-only key is revoked. The person mints their own key from the Developer dashboard or
POST /api/v2/token. - Know when. Poll
GET /api/v2/verify/statuswith the setup key:is_verifiedflips totrue. A401also means the hand-off happened (the key was revoked).
product picks what to provision: "api" (default, the developer product) or "platform" (the team product, with Lead Mate and Day-1 onboarding). "api" accounts start in strict multi-tenant mode; pass "require_end_user_id": false at signup for personal development only. This setting persists account-wide. For customer-facing apps, keep strict mode on and pass user_id.
Run an agent with none of our branding
An agent you embed in your product should sound like your product. By default an agent knows it runs on m8tes: it calls itself a Mate, can describe what m8tes does, and knows our pricing. That is right for a team using m8tes directly and wrong for an agent your customers talk to.
Set prompt_profile to "bare" and none of that reaches the agent:
agent = client.agents.create(
name="Acme Support",
instructions="You are Acme Support. Answer billing questions for Acme customers.",
prompt_profile="bare",
user_id="cust_42",
)bare removes branding, not ability. Permissions, approvals, memory, files, integrations
and your own Agent Skills all work exactly the same.
Switch an existing agent any time with client.agents.update(id, prompt_profile="bare");
it takes effect on that agent's next run.
Turn off any built-in tool
Every agent gets built-in tools (memory, task history, issue reporter, owner-notify email, desktop). Some are wrong for embeds: report_issue files feedback with us, and notify emails the account owner, not your end user. Name them in disabled_builtin_tools to unmount:
agent = client.agents.create(
name="Acme Support",
prompt_profile="bare",
disabled_builtin_tools=["feedback", "notify", "computer_use"],
user_id="cust_42",
)Valid names: GET /api/v2/built-in-tools. Pass teammate_id to see what a run will actually mount after your disable list. Unknown names are rejected, so a typo cannot leave a tool on.
for t in client.built_in_tools.list(agent_id=agent.id).data:
print(t.name, t.enabled)See exactly what we inject
Returns the real prompt the agent will run, rendered by the same code that runs it:
sp = client.agents.system_prompt(agent.id, user_id="cust_42")
print(sp.prompt_profile, sp.characters)
assert "m8tes" not in sp.system_prompt.replace("/home/daytona/m8tes-files/", "")One deliberate exception: /home/daytona/m8tes-files/ is the real sandbox directory your
agent writes to when it shares a file, so that path survives in bare. It is a filesystem
path the agent uses, never something it is told to say.
Per-run context (memories, documents, connected tools, the triggering channel) is resolved when a run starts and is not included in this response.
Why the hand-off is secure:
The blocked-run response:
{
"error": {
"type": "permission_error",
"code": 403,
"message": "Verify your email to keep running. Check your inbox for the activation link (resend: POST /api/v2/verify/resend).",
"request_id": "req_...",
"doc_url": "https://m8tes.ai/docs/api-errors#error-types",
"details": {
"error_code": "EMAIL_VERIFICATION_REQUIRED",
"runs_used": 25,
"verification_threshold": 25,
"runs_remaining": 50,
"balance_micros": 0,
"balance_usd": "0.0000",
"topup_url": "/billing/api"
}
}
}runs_used counts every run the account made, on any meter: it is the preview trip-wire, not a billing figure. The two allowances below it are separate meters and neither pays for the other.
balance_micros/balance_usd: the prepaid wallet (runs withuser_id). Appears only on accounts with a prepaid balance.runs_remaining: the platform plan (your own first-party runs: web app, and API calls with nouser_id).
A user_id run debits the balance and leaves runs_remaining untouched. On a new API account (strict multi-tenant by default), you will see runs_remaining sitting at the full plan allowance. See Billing & Usage.
Good first asks
- "create an agent with a Slack tool and run a task that posts a daily summary"
- "stream a run's output into our existing job-status UI"
- "subscribe a webhook endpoint to run.completed and run.failed, and verify signatures"
Verify the integration
- Run the generated quickstart end to end. Confirm provider sign-in finishes and the run returns output.
- Check
run.error_codeis empty on success paths, and that failures surface the code. - Confirm end-user isolation: a resource created with one
user_idis invisible to another.
Next: Quick Start · Errors · Webhooks