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:

Text
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:

Terminal
export M8TES_API_KEY=m8_your_key_here

Create 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:

Python
import m8tes

result = m8tes.signup("you@example.com", "yourpassword", "yourname")
print(result.api_key)  # export as M8TES_API_KEY
Or 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
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:

  1. 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-flash on the API starter credit. For personal development, connect a matching model subscription and run without user_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.
  2. Detect the gate. After that verification threshold, runs return 403 with error.details.error_code == "EMAIL_VERIFICATION_REQUIRED". Tell the person to open the activation email; resend it with POST /api/v2/verify/resend.
  3. 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.
  4. Know when. Poll GET /api/v2/verify/status with the setup key: is_verified flips to true. A 401 also 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:

Python
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",
)
"platform" (default)"bare"
Names m8tes / links m8tes.aiyesno
Calls itself a "Mate"yesno
Knows our billing modelyesno
Can load m8tes' own Agent Skillsyesno
Your instructions, tools, and skillsunchangedunchanged
Capabilities, approvals, safety rulesunchangedunchanged

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:

Python
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.

Python
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:

Python
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:

PropertyWhy it holds
The agent never holds a loginOmit password and no credential exists for the agent to keep.
The agent can't activate the accountThe activation link is emailed to the person only; it is never in the API response.
The agent hands off cleanlyWhen the person activates, the agent's setup-only key is revoked. The person mints their own key going forward.
The agent can still start work nowOnce you can run (top-up or own-subscription OAuth), you can complete up to 25 runs before email verification is required — connect or top up first; not free credit.

The blocked-run response:

JSON
{
  "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 with user_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 no user_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

  1. Run the generated quickstart end to end. Confirm provider sign-in finishes and the run returns output.
  2. Check run.error_code is empty on success paths, and that failures surface the code.
  3. Confirm end-user isolation: a resource created with one user_id is invisible to another.

Next: Quick Start · Errors · Webhooks

Was this page helpful?