# build_grep_results_dict

> **Function** in `deepagents`

📖 [View in docs](https://reference.langchain.com/python/deepagents/backends/utils/build_grep_results_dict)

Group structured matches into the legacy dict form used by formatters.

## Signature

```python
build_grep_results_dict(
    matches: list[GrepMatch],
) -> dict[str, list[tuple[int, str]]]
```

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/bb27e62ebe44dd6e8104a504b1718ce87acc7ffa/libs/deepagents/deepagents/backends/utils.py#L701)