> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-chore-v2-11-2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Portkey helps bring your agents to production

<CardGroup cols={4}>
  <Card title="OpenAI Agents (Python)" href="/integrations/agents/openai-agents">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/j9-6mT8gnjZp0Idw/images/openai-agents.png?fit=max&auto=format&n=j9-6mT8gnjZp0Idw&q=85&s=564d831893173c96387c825563fdb66d" alt="OpenAI Agents" width="721" height="721" data-path="images/openai-agents.png" />
    </Frame>
  </Card>

  <Card title="OpenAI Agents (Type Script)" href="/integrations/agents/openai-agents-ts">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/j9-6mT8gnjZp0Idw/images/openai-agents.png?fit=max&auto=format&n=j9-6mT8gnjZp0Idw&q=85&s=564d831893173c96387c825563fdb66d" alt="OpenAI Agents" width="721" height="721" data-path="images/openai-agents.png" />
    </Frame>
  </Card>

  <Card title="AWS AgentCore" href="/integrations/agents/agentcore">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/vUojsnejnzCCvLxD/images/supported-llm/amazon.avif?fit=max&auto=format&n=vUojsnejnzCCvLxD&q=85&s=6c63992b602fe44fe358fc71ffd78fe5" alt="AWS Bedrock" width="245" height="138" data-path="images/supported-llm/amazon.avif" />
    </Frame>
  </Card>

  <Card title="Pydantic AI" href="/integrations/agents/pydantic-ai">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/pydantic.png?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=cd5e9bf0d6890bc79fafd6571cb4af66" alt="Pydantic AI Agents" width="225" height="225" data-path="images/autogen/pydantic.png" />
    </Frame>
  </Card>

  <Card title="Autogen" href="/integrations/agents/autogen">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/autogen.jpg?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=699b519984b6b36c7991f30539ade433" alt="Autogen" width="225" height="225" data-path="images/autogen/autogen.jpg" />
    </Frame>
  </Card>

  <Card title="CrewAI" href="/integrations/agents/crewai">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/crew-ai.avif?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=b31fb6c6acdd3d68f84820d770c117bc" alt="CrewAI" width="300" height="300" data-path="images/autogen/crew-ai.avif" />
    </Frame>
  </Card>

  <Card title="Agno AI" href="/integrations/agents/agno-ai">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/agno-ai.svg?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=c5c5060f7d52ef5a4a999572a2113294" alt="Agno-AI" width="172" height="62" data-path="images/agno-ai.svg" />
    </Frame>
  </Card>

  <Card title="Mastra Agents" href="/integrations/agents/mastra-agents">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/bya.avif?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=37ac3d2a1d629d8616ff0fe7220c7c13" alt="Mastra Agents" width="300" height="314" data-path="images/autogen/bya.avif" />
    </Frame>
  </Card>

  <Card title="Llama Index" href="/integrations/agents/llama-agents">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/llama-a.jpg?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=14b0ac40bae063fe04388d307258a1be" alt="Llama Index" width="200" height="200" data-path="images/autogen/llama-a.jpg" />
    </Frame>
  </Card>

  <Card title="LangChain" href="/integrations/agents/langchain-agents">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/langchain-a.avif?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=1861ce0b66afb39dbc093e1515a52d63" alt="LangChain" width="204" height="192" data-path="images/autogen/langchain-a.avif" />
    </Frame>
  </Card>

  <Card title="LangGraph" href="/integrations/agents/langgraph">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/Langgraph.jpeg?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=f61f9caf761ef6c0119e8f18c0e0d2fe" alt="Langgraph" width="259" height="194" data-path="images/autogen/Langgraph.jpeg" />
    </Frame>
  </Card>

  <Card title="Langroid" href="/integrations/agents/langroid">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/langgroid.png?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=cd634cb092b9081115af04231fac7ee5" alt="Langroid" width="563" height="563" data-path="images/autogen/langgroid.png" />
    </Frame>
  </Card>

  <Card title="OpenAI Swarm" href="/integrations/agents/openai-swarm">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/swarm.png?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=c47f5b58b2c5f04d857c722a060153a0" alt="Swarm" width="284" height="177" data-path="images/autogen/swarm.png" />
    </Frame>
  </Card>

  <Card title="Control Flow" href="/integrations/agents/control-flow">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/control-flow.avif?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=4248583209e79df2ea7f2f34fcdaef28" alt="Control Flow" width="300" height="319" data-path="images/autogen/control-flow.avif" />
    </Frame>
  </Card>

  <Card title="AWS AgentCore" href="/integrations/agents/agentcore">
    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/portkey-docs-chore-v2-11-2/images/aws-bedrock.png" alt="AWS AgentCore" />
    </Frame>
  </Card>

  <Card title="Strands Agents" href="/integrations/agents/strands">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/vUojsnejnzCCvLxD/images/strands.svg?fit=max&auto=format&n=vUojsnejnzCCvLxD&q=85&s=4dc2217830f10ec394ab94802a3fc60f" alt="Strands" width="40" data-path="images/strands.svg" />
    </Frame>
  </Card>

  <Card title="Bring Your Agent" href="/integrations/agents/bring-your-own-agents">
    <Frame>
      <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/D2fUJ1EgiWfZeUk9/images/autogen/bya.avif?fit=max&auto=format&n=D2fUJ1EgiWfZeUk9&q=85&s=37ac3d2a1d629d8616ff0fe7220c7c13" alt="Bring Your Agent" width="300" height="314" data-path="images/autogen/bya.avif" />
    </Frame>
  </Card>
</CardGroup>

## Integrate Portkey with your agents with just 2 lines of code

```py Langchain theme={null}
from langchain_openai import ChatOpenAI
from portkey_ai import createHeaders, PORTKEY_GATEWAY_URL

llm = ChatOpenAI(
    api_key="OpenAI_API_Key",
    base_url=PORTKEY_GATEWAY_URL,
    default_headers=createHeaders(
        provider="openai", #choose your provider
        api_key="PORTKEY_API_KEY"
    )
)
```

### Get Started with Portkey x Agent Cookbooks

* [Autogen](https://dub.sh/Autogen-docs)
* [CrewAI](https://git.new/crewAI-docs)
* [Phidata](https://dub.sh/Phidata-docs)
* [Llama Index ](https://git.new/llama-agents)
* [Control Flow](https://dub.sh/Control-Flow-docs)

***

## Key Production Features

By routing your agent's requests through Portkey, you make your agents production-grade with the following features.

### 1. [Interoperability](/product/ai-gateway/universal-api)

Easily switch between LLM providers. Call various LLMs such as Anthropic, Gemini, Mistral, Azure OpenAI, Google Vertex AI, AWS Bedrock and much more by simply changing the `provider ` and `API key` in the LLM object.

### 2. [Caching](/product/ai-gateway/cache-simple-and-semantic)

Improve performance and reduce costs on your Agent's LLM calls by storing past responses in the Portkey cache. Choose between Simple and Semantic cache modes in your Portkey's gateway config.

```json theme={null}
{
 "cache": {
    "mode": "semantic" // Choose between "simple" or "semantic"
 }
}
```

### 3. [Reliability](/product/ai-gateway)

Set up **fallbacks** between different LLMs or providers, **load balance** your requests across multiple instances or API keys, set **automatic retries**, and **request timeouts.** Ensure your agents' resilience with advanced reliability features.

```json theme={null}
{
  "retry": {
    "attempts": 5
  },
  "strategy": {
    "mode": "loadbalance" // Choose between "loadbalance" or "fallback"
  },
  "targets": [
    {
      "provider": "openai",
      "api_key": "OpenAI_API_Key"
    },
    {
      "provider": "anthropic",
      "api_key": "Anthropic_API_Key"
    }
  ]
}
```

### 4. [Observability](/product/observability)

Portkey automatically logs key details about your agent runs, including cost, tokens used, response time, etc. For agent-specific observability, add Trace IDs to the request headers for each agent. This enables filtering analytics by Trace IDs, ensuring deeper monitoring and analysis.

### 5. [Logs](/product/observability/logs)

Access a dedicated section to view records of action executions, including parameters, outcomes, and errors. Filter logs of your agent run based on multiple parameters such as trace ID, model, tokens used, metadata, etc.

<Frame>
  <img src="https://mintcdn.com/portkey-docs-chore-v2-11-2/nq4v4loQyZDnATT9/images/integrations/analytics-new-gif.gif?s=6e49db6873c92d56b91a5d66d4ad59f7" alt="azure" width="1470" height="832" data-path="images/integrations/analytics-new-gif.gif" />
</Frame>

### 6. [Prompt Management](/product/prompt-library)

Use Portkey as a centralized hub to store, version, and experiment with your agent's prompts across multiple LLMs. Easily modify your prompts and run A/B tests without worrying about the breaking prod.

### 7. [Continuous Improvement](/product/observability/feedback)

Improve your Agent runs by capturing qualitative & quantitative user feedback on your requests, and then using that feedback to make your prompts AND LLMs themselves better.

### 8. [Security & Compliance](/product/enterprise-offering/security-portkey)

Set budget limits on provider API keys and implement fine-grained user roles and permissions for both the app and the Portkey APIs.
