> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# To Graph • AI Agent SDK

> to_graph: This team's definition as graph data (``praisonai.graph/1``).

# to\_graph

Method

> This is a method of the [**AgentTeam**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/AgentTeam.md) class in the [**agents**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/agents.md) module.

This team's definition as graph data (`praisonai.graph/1`).

Covers agents, tasks (context/depends\_on, next\_tasks, conditions),
tools, hand-offs, human review and the hierarchical manager. Node ids
are stable across processes and match replay events' `node_id`.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def to_graph() -> Dict[str, Any]
```

### Returns

**Returns** `Dict[str, Any]`

The result of the operation.

## Uses

* `to_graph`

## Used By

* [`AgentTeam.to_graph`](../functions/AgentTeam-to_graph)
* [`AgentTeam.to_mermaid`](../functions/AgentTeam-to_mermaid)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agents/agents.py#L2551)
>
> `praisonaiagents/agents/agents.py` at line 2551


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.