> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AgentRequestHandler

> Answer an agent → client request other than (e.g.

Answer an agent → client request other than `session/request_permission`
(e.g. `_cognition.ai/request_diagnostics`, `_cognition.ai/sidechain/request`).
Return the JSON-RPC result, or `undefined` to decline: the SDK then answers
with its built-in default for the method if it has one, otherwise with a
JSON-RPC `method not found` error so the agent can proceed without it.

```typescript
type AgentRequestHandler = (method: string, params: unknown) => unknown
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.