# build_version_text

> **Function** in `deepagents_code`

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

Build the plain-text output for the `--version` CLI flag.

Includes the CLI and SDK versions and any installed optional
dependencies. For editable installs it also reports the source path and
the resolved versions of the core LangChain-ecosystem dependencies.

Reports the same version facts as the `/version` slash command, in the
same section order (versions, editable path, core dependencies, optional
dependencies), but omits its network-dependent release-age suffixes and
update-available hint so `--version` stays offline.

## Signature

```python
build_version_text() -> str
```

## Returns

`str`

Multi-line version string suitable for stdout.

---

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