> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# About Postman Context Graph

Postman Context Graph (also known as Agent Context) maps your organization's APIs, deployments, database schemas, external services, and teams into a single dependency graph. Use it to answer questions about how your services relate to each other, and to give AI agents grounded, queryable context about your architecture.

## Data model

Context Graph is built from one base source and any number of connected sources:

* Base source (indexed by default if already connected) — [Git-connected](/docs/use/native-git/overview) Postman workspaces, APIs, collections, and specifications.
* Connected sources (connected and then indexed) — External systems like New Relic.

The graph's node types cover APIs, deployments, database schemas, external services, teams, telemetry configs, topics, and message schemas. They're connected by relationships that capture dependencies, service calls, ownership, monitoring, and pub/sub messaging (publishing to and subscribing to topics, and topics carrying message schemas).

![Postman Context Graph](https://assets.postman.com/postman-docs/v12/context-graph-detail-v12.png)

## Get started

To get started, do the following:

1. Go to ![Home icon](https://assets.postman.com/postman-docs/aether-icons/descriptive-home-stroke.svg#icon) **Home > Agent Context**.
2. Click **Manage Data Sources** to connect the sources you want to index in the context graph.
3. Click **Index** to start indexing the connected sources.

![Indexing in Postman Context Graph](https://assets.postman.com/postman-docs/v12/context-graph-connect-v12.png)

Indexing runs as background jobs. You can continue to use the graph while indexing is in progress, and results may be incomplete until indexing finishes.

Connecting GitHub requires selecting an organization and one or more repositories to index. Only repositories you have push access to, and that aren't archived or inactive, are eligible. If you don't see a repository you expect, check that it meets these criteria or go to **Integrations** to connect it.

## Query the graph

The recommended way to get answers from Postman Context Graph is to query it, rather than reading conclusions off the graph visualization, which is for exploration only.

You can query the graph using [Agent Mode](/docs/use/agent-mode/overview/), [Agent Tasks](/docs/use/agent-mode-cloud/automations/), the [Context Graph API](/api-docs/api-reference/context-graph/), the [Context Graph CLI](/docs/postman-cli/postman-cli-context-graph/), or an [MCP client](/docs/use/context-graph/mcp-query/).

### Use Agent Tasks to query the graph

Agent Tasks, which are part of [Agent Mode on Cloud](/docs/use/agent-mode-cloud/overview/) automations, run natural-language questions you ask against the graph asynchronously and return an answer grounded in actual graph queries.

For example, you can ask which service has the most dependents, and the agent will return an answer grounded in the graph data.

### Use the Context Graph API to query the graph

The Postman API's [Context Graph endpoints](/api-docs/api-reference/context-graph/) provide a read-only HTTP API for the same capability.

### Use the Context Graph CLI to query the graph

You can also query the Context Graph using the [Context Graph CLI](/docs/postman-cli/postman-cli-context-graph/). This gives you a command-line way to submit queries and work with graph results from your terminal.

### Query the graph with an MCP client

You can also query the Context Graph using an MCP client. This allows you to submit natural-language questions and receive answers grounded in the graph data, similar to using Agent Tasks but through the MCP protocol. See [Query Context Graph with an MCP client](/docs/use/context-graph/mcp-query/) for details on how to set this up.