# fulfill_hook_invocation

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/hooks/client/fulfill_hook_invocation)

Execute a server-owned hook request and return a resume payload.

## Signature

```python
fulfill_hook_invocation(
    runtime: HooksRuntime,
    request: HookInvocationRequest,
) -> dict[str, object]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `runtime` | `HooksRuntime` | Yes | Session-scoped client Hooks runtime. |
| `request` | `HookInvocationRequest` | Yes | Validated invocation request from the server. |

## Returns

`dict[str, object]`

JSON-compatible resume value for `Command(resume=...)`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/hooks/client.py#L70)