# AI Agent Context Graph

## Introduction

The AI Agent Context Graph in Akto helps you visualize and understand the relationships between different agent components, MCP endpoints, and external services in your agentic application. The AI Agent Context Graph shows how components are interconnected, making it easier to understand the flow of data and assess the impact of changes or security issues.

## Key Features

* **Visual Flow Mapping**: See clear, directional relationships between agent components
* **Component Type Indicators**: Different component types (AI Agent, MCP Server, External Tool) are visually distinguished
* **Framework Detection**: View which agent frameworks (LangChain, LlamaIndex, etc.) are used
* **Data Flow Tracking**: Understand how data moves between components and external services
* **Security Risk Assessment**: Identify high-risk dependencies and potential attack paths

## How to Use

1. Navigate to **Agentic Discovery > Collections**
2. Select an agent collection
3. Click on the **AI Agent Context Graph** tab
4. Explore the visual representation of component relationships

## Understanding the Graph

### Node Types

* **AI Agent Nodes**: Represent your application's AI agents
* **MCP Server Nodes**: Show Model Context Protocol servers and their tools
* **External Service Nodes**: Indicate third-party APIs, databases, or services
* **Tool Nodes**: Display specific tools or resources accessible by agents

### Edge Relationships

* **Invocation Edges**: Show when one component calls another
* **Data Flow Edges**: Indicate data passing between components
* **Authentication Edges**: Highlight authentication dependencies

## Use Cases

* **Impact Analysis**: Understand which components are affected when making changes
* **Security Assessment**: Identify potential attack paths through your agentic system
* **Architecture Review**: Visualize the overall structure of your agent ecosystem
* **Dependency Management**: Track external service dependencies
* **Compliance**: Document data flows for regulatory requirements

## Best Practices

* Review the AI Agent Context Graph regularly to understand system evolution
* Identify circular dependencies that might cause issues
* Monitor third-party component dependencies for security risks
* Use the AI Agent Context Graph to plan AI Red Teaming priorities
* Document critical paths and dependencies for incident response


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-security-docs.akto.io/akto-argus-agentic-ai-security-for-homegrown-ai/agentic-ai-discovery/concepts/api-dependency-graph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
