The filter reads the token from arguments the host set, then removes it. The client secret is not an argument. A chat completion key is not required for this check.

The exchange is in [Agent frameworks](/docs/agent-frameworks#mint-the-bearer).

## Which credential

| Credential | Use it when |
| --- | --- |
| Agent identity | A named agent inside a project that already has users. [Agents](/docs/console/agents) is sales-gated until access is approved. |
| M2M application | The caller is a job, or Agents access is not approved yet. Same `client_credentials` grant. |
| Personal access token | One person's script. Keep it off an unattended caller. |
| Service account | Authdog REST automation. Not the bearer this hook checks. |

To act for a person, keep this hook and present an [RFC 8693 token](/guides/agent-delegation). `sub` stays the user. `act` names the agent. The planned sample uses a token whose subject is the agent.

## Related

| Read | To learn how to |
| --- | --- |
| [Custom channel auth for Semantic Kernel](/docs/ai/semantic-kernel/channel-auth) | Refuse a missing bearer |
| [Machine identity](/docs/machine-identity) | Choose the credential |
| [Semantic Kernel](/docs/agent-frameworks/semantic-kernel) | See the hook |
