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

# Coding Agents

> The governance layer for Claude Code, Codex, and other AI coding agents — centralized credentials, cost controls, observability, and provider failover for platform teams.

When developers use Claude Code or Codex individually, it works fine. When 100 developers use it — raw API keys get scattered, costs spike overnight without attribution, and there's no fallback when a provider goes down.

Portkey is the gateway that sits between your team's coding agents and LLM providers. **Developers change nothing. You get full control.**

> [card] Secure
>
> Centralize provider credentials. Issue scoped API keys per team. Rotate or revoke access without touching developer configs.

> [card] Control
>
> Set hard budget and rate limits per developer, team, or workspace. Block requests when limits are hit.

> [card] Observe
>
> Log every request — cost, tokens, latency, model, and who made it. Attribute spend by team or project.

***

## Supported agents

> [card] [Claude Code](https://docs.portkey.ai/docs/integrations/libraries/claude-code.md)
>
> The most widely deployed AI coding agent. Supports Anthropic direct, Bedrock, and Vertex AI through a single Portkey endpoint.

> [card] [OpenAI Codex](https://docs.portkey.ai/docs/integrations/libraries/codex.md)
>
> OpenAI's terminal coding agent. Configure via `config.toml` with full provider flexibility.

> [card] [Cursor](https://docs.portkey.ai/docs/integrations/libraries/cursor.md)
>
> Route Cursor's AI requests through Portkey for observability and cost controls.

> [card] [Cline](https://docs.portkey.ai/docs/integrations/libraries/cline.md)
>
> Set Portkey as Cline's custom OpenAI base URL.

> [card] [Roo Code](https://docs.portkey.ai/docs/integrations/libraries/roo-code.md)
>
> Drop-in Portkey integration via base URL override.

> [card] [Pi Agent](https://docs.portkey.ai/docs/integrations/libraries/pi-agent.md)
>
> Minimal extensible terminal coding agent. Route through Portkey via custom provider config.

> [card] [Goose, opencode & more](https://docs.portkey.ai/docs/integrations/libraries/opencode.md)
>
> Any OpenAI-compatible coding agent works with Portkey.

***

## What platform teams get

### Access control

Developers never see provider credentials. Every request is authenticated through a scoped Portkey key.

| Goal | What to use | Description |
| - | - | - |
| Centralize credentials | [Model Catalog](https://docs.portkey.ai/docs/product/model-catalog.md) | Store Anthropic, Bedrock, and Vertex keys once. Issue scoped Portkey keys to teams — no raw key distribution. |
| Isolate teams | [Workspaces](https://docs.portkey.ai/docs/product/enterprise-offering/org-management/workspaces.md) | Each team gets its own workspace with separate budgets, rate limits, and provider access. One team's usage never affects another's. |
| Manage team access | [API Keys](https://docs.portkey.ai/docs/product/enterprise-offering/org-management/api-keys-authn-and-authz.md) | One key per developer or team. Rotate or revoke from one place without touching developer configs. |
| Provision access at scale | [SSO / SCIM](https://docs.portkey.ai/docs/product/enterprise-offering/org-management/sso.md) | Connect your identity provider. Onboard and offboard developers automatically. |

### Cost management

Agentic loops are expensive. One uncapped session can rack up hundreds of dollars overnight.

| Goal | What to use | Description |
| - | - | - |
| Cap team spending | [Budget Policies](https://docs.portkey.ai/docs/product/enterprise-offering/budget-policies.md) | Hard spend limits per developer, team, or workspace. Requests block when the limit is hit. |
| Prevent traffic starvation | [Rate Limits](https://docs.portkey.ai/docs/product/model-catalog/rate-limits.md) | Stop any single user from consuming shared provider capacity. |
| Attribute costs by team | [Logs + Metadata](https://docs.portkey.ai/docs/product/observability/metadata.md) | Every request logged with team, project, model, tokens, and exact cost. Answer spend questions in seconds. |

![Per-request cost breakdown and metadata filters in Portkey](https://mintcdn.com/portkey-docs/28zFZsk9XnqGMtZ6/images/cost.png?fit=max\&auto=format\&n=28zFZsk9XnqGMtZ6\&q=85\&s=03cb0b4f80f27963dcc2d8d0c9bc2dd8)

### Reliability

Coding agents fail silently when providers go down. Portkey routes around outages automatically.

| Goal | What to use | Description |
| - | - | - |
| Survive provider outages | [Fallbacks](https://docs.portkey.ai/docs/product/ai-gateway/fallbacks.md) | Auto-retry on Bedrock or Vertex if Anthropic goes down — no developer intervention. |
| Handle team-scale volume | [Load Balancing](https://docs.portkey.ai/docs/product/ai-gateway/load-balancing.md) | Distribute traffic across providers and API keys. |

### Governance

Coding agents operate with terminal-level access. Portkey adds the control layer.

| Goal | What to use | Description |
| - | - | - |
| Protect sensitive codebases | [Guardrails](https://docs.portkey.ai/docs/product/guardrails.md) | PII detection, prompt injection protection, and content filtering before requests hit the model. |
| Govern MCP tool access | [MCP Gateway](https://docs.portkey.ai/docs/product/mcp-gateway.md) | Centralized auth and full call logs for every MCP tool your agents use. |
| Maintain a compliance trail | [Audit Logs](https://docs.portkey.ai/docs/product/enterprise-offering/audit-logs.md) | Immutable record of every access, config change, and policy action across the org. |
| Share coding standards | [Agent Skills](https://docs.portkey.ai/docs/guides/coding-agents/skills.md) | Version prompt instructions and sync them to every developer's agent with one command. |

***

## Setting up Claude Code and Codex

For Claude Code and Codex, the [Portkey CLI](https://docs.portkey.ai/docs/guides/coding-agents/agent-cli.md) sets up gateway routing, MCP servers, and team skills in one command:

```bash theme={"system"}
npx portkey
```

> [card] [Claude Code setup](https://docs.portkey.ai/docs/integrations/libraries/claude-code.md)
>
> Anthropic direct, Bedrock, and Vertex AI

> [card] [Codex setup](https://docs.portkey.ai/docs/integrations/libraries/codex.md)
>
> Full `config.toml` reference and provider options

***

## Next steps

> [card] [Budget Policies](https://docs.portkey.ai/docs/product/enterprise-offering/budget-policies.md)
>
> Hard spend limits per team or developer

> [card] [Model Catalog](https://docs.portkey.ai/docs/product/model-catalog.md)
>
> Centralized provider credentials and access controls

> [card] [Configs](https://docs.portkey.ai/docs/product/ai-gateway/configs.md)
>
> Fallbacks, load balancing, and routing strategies

> [card] [MCP Gateway](https://docs.portkey.ai/docs/product/mcp-gateway.md)
>
> Govern MCP tool access across your agent fleet

> [card] [Observability](https://docs.portkey.ai/docs/product/observability.md)
>
> Logs, traces, and cost breakdowns for every session

> [card] [Agent Skills](https://docs.portkey.ai/docs/guides/coding-agents/skills.md)
>
> Sync team coding standards to every developer's agent

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [Pi Agent](https://docs.portkey.ai/docs/integrations/libraries/pi-agent.md)
- [Portkey CLI](https://docs.portkey.ai/docs/guides/coding-agents/agent-cli.md)
- [Claude Code](https://docs.portkey.ai/docs/integrations/libraries/claude-code.md)
- [Conductor](https://docs.portkey.ai/docs/integrations/libraries/conductor.md)
- [Agentic Usage](https://docs.portkey.ai/docs/api-reference/inference-api/agentic-usage.md)


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