poppy.json your website serves, registers the agents you allow, and checks the result end to end. Use the Auth0 CLI over manual setup; agents reject your company if a single value in your discovery files differs from your tenant, and the CLI writes those values for you.
The
poppy and agents commands are in beta: their behavior, flags, and output may change, so don’t rely on them in CI/CD pipelines yet.
Prerequisites
- The beta build of the Auth0 CLI. To install it, read Install the beta build.
- A custom domain (recommended). The issuer becomes your company’s identity for agents.
- An existing API with an
httpsidentifier and a description for every scope. Agents call this API, and they show the descriptions to users. - An existing first-party Regular Web Application for your website, with HTTPS routes for login and callback.
- Your website served over HTTPS on its production domain. Preview domains, such as per-branch hosting URLs, fail the domain checks.
- An OpenAPI document for your API, if agents call it directly. To learn what agents need in it, read Describe your API for agents.
Log in to your tenant
Log in with a machine-to-machine application that is authorized for the Management API:setup add the refresh token Action, also give it read:actions, create:actions, and update:actions. To register agents, it also needs permissions for agents, applications, and client grants. If a permission is missing, the CLI names it, and the login command adds it automatically.
Set up your tenant
Preview the changes first:setup asks for your company domain, the API agents call, the web app that agents’ browsers join, and the URL of your OpenAPI document. Every question has a flag, so you can also run it in scripts:
setup shows every change as before and after, marks the settings that affect every application in the tenant, and asks you to confirm. Without a terminal, it can’t ask questions, so it names every missing flag at once and you add --force to skip the confirmation. Running it again does not change anything once everything matches, and it continues where a failed run stopped. setup finishes by running auth0 poppy doctor. A failed check doesn’t fail setup because your website may not serve poppy.json until you deploy it.
setup leaves your MFA policy and your existing Actions alone. It creates an Action only when you ask for one, as described in Add the refresh token Action.
Three of these settings affect every application in your tenant:
iss in authorization responses, the Resource Parameter Compatibility Profile, and the default audience. Applications that send no audience start receiving tokens for your API. Review these tenant settings before you confirm in the CLI.--no-api or --no-web. To skip the doctor checks that setup runs at the end, pass --skip-doctor.
Describe your scopes for agents
Agents choose scopes from their descriptions and show them to users.setup fails if a scope of your API has no description. Add one with --scope. It never edits an existing description.
Scope hints tell an agent how consequential a scope is before it asks the user. Add them with --hint. Each hint has two values:
changes:noneif the scope only reads,reversibleif every change can be undone, orirreversibleif any change can’t be undone, such as placing an order.personal_data:trueif the scope shows or changes the user’s personal data.
setup asks for each description or hint you leave out. Pressing Enter takes the cautious answer.
Choose what poppy:browser-sign-in allows
setup asks whether your website treats poppy:browser-sign-in as the account’s full access on the website. Answer no, the default, when your website only does what your API scopes allow. Answer yes, or pass --web-unscoped, when it doesn’t. setup then sets web.unscoped in poppy.json. It changes nothing in your tenant: Auth0 still limits the web application’s tokens to the scopes the user approved, and your website enforces what unscoped allows. To learn more, read Website access.
Add the refresh token Action
Agents that follow the protocol may not request theoffline_access scope. Without it, Auth0 doesn’t issue them a refresh token, and they have to sign the user in again when the access token expires. Add a post-login Action that requests offline_access for agents that sign in to your API. The API must also allow offline access, which setup turns on. Auth0 drops offline_access when the API doesn’t allow it.
Add the Action with the CLI
Add--always-issue-refresh-tokens to setup:
setup creates the Action, deploys it, and binds it as the last Action of the post-login flow. Your existing bindings keep their order. In a terminal, setup asks if you leave the flag out. Without the flag, your post-login flow isn’t touched. To remove the Action, unbind and delete it in the Auth0 Dashboard.
Add the Action yourself
Deploy this Action with your own API identifiers and bind it to the post-login flow. Put it last so it sees the scopes that other Actions set:offline_access in scope, even if the agent didn’t request it. To learn more, read Write Your First Action.
Deploy poppy.json
Your website serves the document at https://{company-domain}/.well-known/poppy.json. If you use an Auth0 web SDK, give it the file as it is: the SDK serves /.well-known/poppy.json and /.well-known/oauth-protected-resource from it. Otherwise, serve the document yourself as a static file. To learn more, read Add Personal Agent Protocol to Your Web App.
The file holds no secrets. Run auth0 poppy config to rebuild it from your tenant after you change scopes or settings.
Check your setup
After you deploy your website, run the doctor against your live domain:FIX line with the command or change that solves it.
The checks of your website and the issuer need no login. The checks of your tenant and agents run when you’re logged in, and show as skipped otherwise.
During the beta, the doctor may report that Auth0’s metadata lacks
protected_resources, your API scopes in scopes_supported, or ES256 in token_endpoint_auth_signing_alg_values_supported. These results are marked “Auth0 must fix this” and are expected until the server changes are available in your environment.Register agents
Register each personal agent you allow by the URL of its client metadata document:register previews the agent’s metadata document, then creates the agent’s application from its CIMD URL, an agent record linked to it, and a grant on your API with the scopes you choose. In a terminal, if you leave out --api or --scopes, register asks you to choose the API and the scopes to grant the agent. Use --poppy to grant on every API that has the Personal Agent Protocol enabled. Include poppy:browser-sign-in to let the agent browse your website for a person.
The grant limits what the agent can ask for. Users still approve the scopes for their own account on the consent page. Running register again refreshes the agent’s application from its current metadata document, which is how you pick up keys the agent has rotated.
Auth0 accepts client assertions and delegations signed with ES256, PS384, and RS256. When the agent’s metadata document sets
token_endpoint_auth_signing_alg, Auth0 stores only the keys of that algorithm. When it isn’t set, Auth0 stores every key. Run auth0 agents show to check that the agent’s keys are stored.auth0 agents show. auth0 agents list shows all registered agents.