# Personal Agent Protocol

The [Personal Agent Protocol (Poppy)](https://personalagentprotocol.org) is an open protocol that lets companies decide what agents can do, and lets people decide what their agent can do for them. Clerk supports one part of it so far: giving a person's agent a browser session that's signed in as them, so the agent can use your application. Clerk will support more of the protocol over time.

To turn it on, enable Clerk's browser session endpoint, then serve a `poppy.json` file so agents can find it.

> Before you enable browser sessions, [restrict what agent sessions can do in your app](https://clerk.com/docs/guides/ai/restrict-agent-sessions.md).

1. ## Enable the browser session endpoint

   Agents connect as OAuth clients, and your users approve them on Clerk's OAuth consent screen. Before you enable the endpoint, keep the [Account Portal](https://clerk.com/docs/guides/account-portal/overview.md) enabled, since it hosts that screen by default, or [set up a custom OAuth consent page](https://clerk.com/docs/guides/configure/auth-strategies/oauth/custom-consent-page.md).

   In the Clerk Dashboard, navigate to the [**Personal Agent Protocol**](https://dashboard.clerk.com/~/agents/personal-agent-protocol) page. Toggle on **Enable Browser Session Endpoint**. If the Dashboard says your application needs to migrate to the new OAuth provider, [contact support](https://clerk.com/contact/support).
2. ## Serve `poppy.json`

   Agents look for your browser session endpoint in a `poppy.json` file at `/.well-known/poppy.json` on your app's root domain.

   In `@clerk/nextjs` 7.10.0 or later, `clerkMiddleware()` serves the file for you when you set the `poppy` option:

   filename: proxy.ts

   ```ts
   import { clerkMiddleware } from '@clerk/nextjs/server'

   export default clerkMiddleware({
     poppy: true,
   })
   ```

   If you're using Next.js ≤15, the file is `middleware.ts` instead of `proxy.ts`.

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
