# make_graph

> **Function** in `deepagents_code`

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

Create the agent graph from environment-based configuration.

Reads `DEEPAGENTS_CODE_SERVER_*` env vars via `ServerConfig.from_env()`
(the inverse of `ServerConfig.to_env()` used by the app process), resolves a
model, assembles tools, and compiles the agent graph.

## Signature

```python
make_graph() -> Any
```

## Returns

`Any`

Compiled LangGraph agent graph.

---

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