# serialize_goal_state

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/goal_state_notice/serialize_goal_state)

Serialize authoritative notice state with canonical JSON formatting.

## Signature

```python
serialize_goal_state(
    state: Mapping[str, object],
) -> str
```

## Returns

`str`

Deterministic JSON used as the fingerprint input.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e4c1ffe9ee63d7854147de490ca27495ef157a7b/libs/code/deepagents_code/goal_state_notice.py#L525)