Melso Agents is available only internally or by private invitation. Agents-specific features require existing access. For the autónomo fiscal service, see Get started.
1. Get a company key
An owner or admin of an Agents company can create a key in Settings → API keys. Save it when it is shown; it is returned once. Creating a key in another company type returns403 with code: agents_only. The authentication guide describes supported personal tokens and credential scopes.
A company key already identifies its company. Omit the company header. In Bash, enter the key at the hidden prompt so it stays out of terminal history. MELSO_URL follows the base URL convention:
2. Make your first read
200 with this list envelope is your first success. Existing Tasks appear in tasks. To check the integration identity and its company, call GET /api/me with the same Bearer header. You can stop here; the remaining steps start work.
Before creating a Run: confirm funding
A company key uses its own integration identity’s funding policy; it cannot borrow a member’s subscription account. Read that policy before requesting execution:codex harness used below, check next_method and next_reason. Configure permitted Melso credits or a provider API key through Harness access and BYOK; an ordinary key identity must keep accounts_enabled: false. Cloud execution also needs usable company compute funding. Confirm it in Billing before proceeding.
Create a Task and start work
input is the first message. execution requests a Run. In an Agents company, omitting execution saves the Task without running it. Send a fresh UUID as client_request_id; keep the same ID and body if you need to retry an uncertain response. An identical replay also returns 201, with the existing Task and original run_id; it does not create another Task or Run. See Idempotency.
201 response contains the Task and, when a Run started, its run_id. This excerpt shows the identifiers to retain:
TASK_ID to the actual id from your response, not the example value:
401 means credentials need attention; 403 workspace_key_scope means the key cannot access that route or company. See Errors and Idempotency for other conflicts and retry rules.
Follow the Task and read the answer
run_id matches it:
POST /api/tasks/{id}/input and a new client_request_id; see Messages and interactions.
Next
When finished, rununset MELSO_API_KEY in this shell.
- MCP setup: connect an assistant with explicit OAuth consent, then follow the Claude or Cursor steps.
- Tasks: add context, isolation and execution options.
- Execution funding: configure the key’s own model funding.
- WhatsApp tasks for Agents: request work from your linked chat.
Read Tasks in TypeScript or Python
LoadMELSO_API_KEY with the hidden prompt above or your secret manager. These examples perform a read and fail clearly on an HTTP error. They use the language’s standard HTTP support and require Node.js 22 LTS or Python 3.10 or later.
tasks.py and run python3 tasks.py. For TypeScript, use your project’s TypeScript runner or compile it for Node.js. Use a valid company key and an account with access to Tasks. These snippets do not start a Run.