# Agent authentication Launch state: **Live**. Agents can register at /auth.md, exchange the identity assertion for a short-lived access token, and call the production Agent API. ## Public agent boundary REST uses the OAuth resource `https://neotask.ai/api/agent`. Remote MCP uses `https://neotask.ai/mcp`. Tokens are short-lived bearer credentials and are valid only for their exact audience. Neotask validates current revocation state under Auth.md on every authenticated request, then resolves the registration to an active MongoDB principal, tenant, license, and membership. An anonymous registration creates a new isolated ordinary Free account. A claimed `service_auth` registration is bound to a verified user. Claiming promotes that account in place. If the claim cannot be promoted, requests return `identity_conflict` with reason `claim_move_confirmation_required` and a link in `error.action.url` (the CLI prints it as `nextAction.url`; older CLI releases print it under `data.error.action.url`); give it only to the person who claimed the agent. The agent moves after a signed-in confirmation: into the account the claimer's sign-in is linked to, or, if it is not linked to one, into the account of whoever confirms. Accounts are never merged automatically or by email. ## Credential renewal and local runners Save the service-issued `identity_assertion` and its `assertion_expires` value in secure credential storage. Renew access by exchanging that assertion at the advertised token endpoint with the JWT-bearer grant and the same resource. Auth.md does not require a refresh token. When the assertion expires, follow the current [auth.md](https://neotask.ai/auth.md) sign-in instructions. The standalone CLI renews account access before enrollment and requests a separate REST token with only `neotask:runners:execute` for runner control. Enrollment stays pending if the authorization server does not grant that exact scope. Runner requests require both this token and the runner-owned HMAC proof; neither grants internal workload authority. The CLI keeps the token and assertion out of command output and renews runner access before expiry. ## Internal execution boundary External agents do not receive Neotask internal HMAC keys, workload assertions, or proof-of-possession keys. Neotask strips the public bearer before trusted Site-to-Gateway execution. Only Neotask-controlled services can create the existing tenant-bound internal workload proof. The Gateway rejects caller-supplied tenant, model, policy, tool, approval, and billing authority. ## Discovery - REST protected-resource metadata: [https://neotask.ai/.well-known/oauth-protected-resource/api/agent](https://neotask.ai/.well-known/oauth-protected-resource/api/agent) - MCP protected-resource metadata: [https://neotask.ai/.well-known/oauth-protected-resource/mcp](https://neotask.ai/.well-known/oauth-protected-resource/mcp) - API catalog: [https://neotask.ai/.well-known/api-catalog](https://neotask.ai/.well-known/api-catalog)