Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/maximhq/bifrost/agents-mdgit clone --depth 1 https://github.com/maximhq/bifrostWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/maximhq/bifrost/agents-md)<a href="https://agentmods.dev/instructions/maximhq/bifrost/agents-md"><img src="https://agentmods.dev/badge/instructions/maximhq/bifrost/agents-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.12300 | $0.12300 |
| Opus 5 | $0.06150 | $0.06150 |
| Sonnet 5 | $0.02460 | $0.02460 |
| Haiku 4.5 | $0.01230 | $0.01230 |
Grade A, and why
bifrost AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Note that `qdrant` and `pinecone` report `(unhealthy)` in `docker compose ps` under the `framework/` file because those images have no `wget` for the healthcheck. The services themselves are fine, so ignore that specific How it starts
The opening of the file, as written. The whole thing — 1,023 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — Bifrost AI Gateway
Context for AI agents (Claude Code, Copilot, Cursor, etc.) working on this codebase. Read this fully before making changes.
What is Bifrost?
Bifrost is a high-performance AI gateway that unifies 20+ LLM providers behind a single OpenAI-compatible API with ~11µs overhead at 5,000 RPS. It also serves as an MCP (Model Context Protocol) gateway, turning static chat models into tool-calling agents.
GitHub: maximhq/bifrost
Repository Layout
bifrost/
├── core/ # Go core library — the engine
│ ├── bifrost.go # Main struct, request queuing, provider lifecycle (~3.4K lines)
│ ├── inference.go # Inference routing, fallbacks, streaming dispatch (~1.9K lines)
│ ├── mcp.go # MCP integration entry point
│ ├── schemas/ # ALL shared Go types — 41 files
│ │ ├── bifrost.go # BifrostConfig, ModelProvider enum, RequestType enum, context keys
│ │ ├── provider.go # Provider interface (30+ methods), NetworkConfig, ProviderConfig
│ │ ├── plugin.go # LLMPlugin, MCPPlugin, HTTPTransportPlugin, ObservabilityPlugin
│ │ ├── context.go # BifrostContext (custom context.Context with mutable values)
│ │ ├── chatcompletions.go # Chat completion request/response types
│ │ ├── responses.go # OpenAI Responses API types
│ │ ├── embedding.go # Embedding types
│ │ ├── images.go # Image generation types
│ │ ├── batch.go # Batch operation types
│ │ ├── files.go # File management types
│ │ ├── mcp.go # MCP types
│ │ ├── trace.go # Tracer interface
│ │ └── logger.go # Logger interface
│ ├── providers/ # 20+ provider implementations
│ │ ├── openai/ # Reference implementation (largest, most complete)
│ │ ├── anthropic/ # Non-OpenAI-compatible example
│ │ ├── bedrock/ # AWS event-stream protocol
│ │ ├── gemini/ # Google-specific API shape
│ │ ├── groq/ # OpenAI-compatible (minimal, delegates to openai/)
│ │ └── utils/ # Shared: HTTP client, SSE parsing, error handling, scanner pool
│ ├── pool/ # Generic Pool[T] — dual-mode (prod: sync.Pool, debug: full tracking)
│ │ ├── pool_prod.go # Zero-overhead sync.Pool wrapper (default build)
│ │ └── pool_debug.go # Double-release/use-after-release/leak detection (-tags pooldebug)
│ ├── mcp/ # MCP protocol implementation
│ │ ├── agent.go # Agent orchestration loop (multi-turn tool calling)
│ │ ├── clientmanager.go # MCP client lifecycle management
│ │ ├── toolmanager.go # Tool registration, discovery, filtering
│ │ ├── healthmonitor.go # Client health monitoring
│ │ └── codemode/starlark/ # Starlark sandbox for code-mode execution
│ └── internal/
│ ├── llmtests/ # LLM integration test infra (48 files, scenario-based)
│ └── mcptests/ # MCP/Agent test infra (40+ files, mock-based)
│
├── framework/ # Data persistence, streaming, ecosystem utilities
│ ├── configstore/ # Config storage backends (file, postgres)
│ ├── logstore/ # Log storage backends (file, postgres)
│ ├── vectorstore/ # Vector storage (Weaviate, Qdrant, Redis, Pinecone)
│ ├── streaming/ # Streaming accumulator, delta copying, response marshaling
│ │ ├── accumulator.go # Chunk accumulation into full response (~24KB)
│ │ ├── chat.go # Chat stream handling (~17KB)
│ │ └── responses.go # Response stream marshaling (~35KB)
│ ├── modelcatalog/ # Model metadata registry
│ ├── tracing/ # Distributed tracing helpers
│ └── encrypt/ # Encryption utilities
│
├── transports/
│ ├── config.schema.json # JSON Schema — THE source of truth for config.json (~2700 lines)
│ └── bifrost-http/ # HTTP gateway transport
│ ├── server/ # Server lifecycle, route registration
│ ├── handlers/ # 27 HTTP endpoint handlers
│ │ ├── inference.go # Chat/text completions, responses API (~109KB)
│ │ ├── mcpinference.go # MCP tool execution
│ │ ├── governance.go # Virtual keys, teams, customers, budgets (~100KB)
│ │ ├── providers.go # Provider CRUD, key management
│ │ ├── mcp.go # MCP client registry management
│ │ ├── logging.go # Log queries, stats, histograms
│ │ ├── config.go # System configuration
│ │ ├── plugins.go # Plugin CRUD
│ │ ├── cache.go # Cache management
│ │ ├── session.go # Auth/session management
│ │ ├── health.go # Health checks
│ │ ├── mcpserver.go # MCP server (SSE/streamable HTTP)
│ │ ├── websocket.go # WebSocket handler
│ │ ├── devpprof.go # Pool debug profiler endpoint (~23KB)
│ │ └── middlewares.go # Middleware definitions
│ ├── lib/ # ChainMiddlewares, config, context conversion
│ └── integrations/ # SDK compatibility layers
│ ├── openai.go # OpenAI SDK drop-in compatibility
│ ├── anthropic.go # Anthropic SDK compatibility
│ ├── bedrock.go # AWS Bedrock SDK compatibility
│ ├── genai.go # Google GenAI SDK compatibility
│ ├── langchain.go # LangChain compatibility
│ ├── litellm.go # LiteLLM compatibility
│ └── pydanticai.go # PydanticAI compatibility
│
├── plugins/ # Go plugins — each has own go.mod
│ ├── governance/ # Budget, rate limiting, virtual keys, routing, RBAC
│ ├── telemetry/ # Prometheus metrics, push gateway
│ ├── logging/ # Request/response audit logging
│ ├── semanticcache/ # Semantic response caching via vector store
│ ├── otel/ # OpenTelemetry tracing
│ ├── mocker/ # Mock responses for testing
│ ├── jsonparser/ # JSON extraction utilities
│ ├── maxim/ # Maxim observability
│ └── compat/ # LiteLLM SDK compatibility (HTTP transport)
│
├── ui/ # React + vite web interface
│ ├── app/workspace/ # Feature pages (20+ workspace sections)
│ ├── components/ # Shared React components
│ └── lib/ # Constants, utilities, types
│
├── tests/e2e/ # Playwright E2E tests
│ ├── core/ # Fixtures, page objects, helpers, API actions
│ └── features/ # Per-feature test suites
│
├── docs/ # Mintlify MDX documentation
│ ├── docs.json # Navigation config
│ ├── media/ # Screenshots (ui-*.png naming convention)
│ └── (architecture|features|providers|mcp|plugins|enterprise|...)
│
├── .claude/skills/ # Claude Code skill definitions (4 skills)
├── go.work # Go workspace — requires Go 1.27.0
├── Makefile # Build, test, dev commands (1300+ lines)
└── terraform/ # Infrastructure as Code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 1,023 lines · 12,300 tokens per session scan A 17abebda427a
bifrost AGENTS.md is an instructions file published in the GitHub repository maximhq/bifrost (7,738 stars, last pushed yesterday), licensed Apache-2.0. It adds 12,300 tokens to every session, about $0.0615 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
mcpmate AGENTS.md
AGENTS.md instructions for loocor/mcpmate, covering repository guidelines, collaboration rhythm (discuss → build → report), project structure & module organization, build, test, and development commands and execution rhythm & task sizing.
mcpmate copilot-instructions.md
Copilot instructions for loocor/mcpmate, covering github copilot instructions and pull request review language.
python-sdk AGENTS.md
AGENTS.md instructions for modelcontextprotocol/python-sdk, covering development guidelines, note for ai agents, branching model, package management and code quality.
Embody AGENTS.md
Instructions for dylanroscover/Embody, covering embody + envoy - ai instructions, critical rules, td python rules, network layout rules and mcp server safety rules.
rust-sdk fetch-mcp-doc.instructions.md
Instructions for modelcontextprotocol/rust-sdk, covering overall, key changes, architecture, baseprotocol and lifecycle.
ruby-sdk AGENTS.md
AGENTS.md instructions for modelcontextprotocol/ruby-sdk, covering agents.md, project overview, dev environment setup, build and test commands and testing instructions.