Users

When building products on top of m8tes, use the user_id field to isolate each end-user's data. Teammates, runs, memories, and tasks are all scoped by user_id.

Why user_id?

Without user_id, all resources belong to your account globally. With user_id, each end-user gets:

  • Isolated teammates — users only see their own bots
  • Isolated memories — teammate context is per-user
  • Isolated task history — no cross-user data leakage
  • Scoped teammate reuse — quick-start mode reuses teammates per user

Set user_id on Everything

Teammates

Runs

Quick Start (auto-create teammate)

Python

If cust_123 runs this again with the same name, the existing teammate is reused.

Memories

Python

Tasks

Python

Filtering by user_id

All list endpoints accept user_id to return only that user's resources:

Without the filter, list endpoints return all resources across all end-users (for your account).

Best Practices

  1. Always pass user_id consistently — set it on teammates, runs, memories, and tasks
  2. Use stable IDs — use your application's user IDs (e.g. usr_abc, database IDs)
  3. Don't mix scoped and unscoped — if you use user_id for one user, use it for all
  4. Isolation is strict — when user_id is set, only that user's data is visible to the teammate (memories, history, etc.)

What's Next

  • Memories — personalize teammate context per end-user
  • Permissions — control tool access per end-user
  • Tools — end-user OAuth connections