{
  "markdown": "# Deep Agents OKF Consumer\n\nA terminal assistant that answers questions from the Open Knowledge Format\n(OKF) documentation in `bundle/`. It reads the local bundle first and can fetch\nlinked Cloudflare or Vercel documentation pages when a digest needs more detail.\n\n## Setup\n\nRequires Python 3.12 or newer and [uv](https://docs.astral.sh/uv/).\n\n```sh\nuv sync\ncp .env.example .env\n```\n\nSet `OPENROUTER_API_KEY` in `.env`. `MODEL_ID` is optional and defaults to\n`google/gemini-3.8-flash`.\n\nThe `bundle/` directory must be at the project root. The agent has read-only\naccess to that directory.\n\n## Ask a question\n\nRun a single query:\n\n```sh\nuv run deepagents-okf-consumer \"How do Vercel and Cloudflare queues differ?\"\n```\n\nStart an interactive session by omitting the question:\n\n```sh\nuv run deepagents-okf-consumer\n```\n\nEnter `/quit` to end the session. The CLI shows bundle and fetch activity as it\nhappens, then renders the answer as terminal Markdown. Interactive turns share\nconversation context while the process is running. The current in-memory\ncheckpointer forgets that context when the CLI exits.\n\n## Research behavior\n\n- The agent starts from bundle indexes, then searches and reads relevant\n  concept documents.\n- If a digest lacks needed detail, `fetch_url` tries the page's `.md` URL and\n  falls back to readable text extracted from HTML.\n- URL fetching is limited to HTTPS pages on `cloudflare.com` and `vercel.com`.\n- Answers should cite bundle file paths and relevant upstream URLs. The bundle\n  is curated and incomplete, so the agent may report gaps or fetch upstream\n  sources.\n\nExample questions:\n\n- How do Cloudflare Queues and Vercel Queues differ in consumer models,\n  retries, and delivery guarantees?\n- Compare Cloudflare Workers with Vercel Functions for a latency-sensitive API.\n- What should I consider when choosing between Cloudflare R2 and Vercel Blob?\n- How would I expose a private service with Cloudflare Tunnel, and what\n  deployment details should I verify upstream?\n- What are the main caching layers on Vercel, and how do they interact?\n- Which platform has a built-in queue consumer model that fits a background\n  image-processing workload?\n- What does the bundle say about Vercel pricing, and which current rates should\n  I verify on the upstream pages?\n- Does the bundle cover Cloudflare WAF configuration? If not, find the relevant\n  upstream documentation.\n- What are the trade-offs between Cloudflare Durable Objects and Vercel Queues\n  for coordinating asynchronous work?\n\n## Example \n```text\nuv run deepagents-okf-consumer \"What can you tell me about vercel ai gateway?\"   \n\n→ Finding bundle documents\n✓ Finding bundle documents complete\n→ Reading bundle document: /vercel/ai/ai-gateway.md\n✓ Reading a bundle document complete\n→ Searching bundle content\n✓ Searching bundle content complete\n→ Reading bundle document: /vercel/ai/agent-plugin.md\n✓ Reading a bundle document complete\n→ Searching bundle content\n✓ Searching bundle content complete\n→ Searching bundle content\n✓ Searching bundle content complete\n→ Searching bundle content\n✓ Searching bundle content complete\n→ Searching bundle content\n✓ Searching bundle content complete\n→ Searching bundle content\n✓ Searching bundle content complete\n→ Fetching upstream documentation\n✓ Fetching upstream documentation complete\n\n\nVercel AI Gateway is a managed unified API and routing control plane designed to call AI models across multiple inference providers from any infrastructure, without     \nhaving to build and maintain custom proxy, logging, or failover infrastructure.                                                                                          \n\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\nKey Capabilities & Features                                                                                                                                              \n\n 1 Centralized Credentials & BYOK (Bring Your Own Key)                                                                                                                   \n    • Authenticate applications once through AI Gateway using either AI Gateway system credentials or your own provider accounts via BYOK.                               \n    • If a BYOK request fails, AI Gateway can be configured to fall back to system credentials.                                                                          \n    • AI Gateway adds zero markup to provider token prices, even when using BYOK.                                                                                        \n 2 Universal & Infrastructure-Agnostic Access                                                                                                                            \n    • Applications do not need to be deployed on Vercel. AI Gateway can be called from any server, local environment, or cloud provider using an AI Gateway API key      \n      (AI_GATEWAY_API_KEY).                                                                                                                                              \n    • Applications running on Vercel deployments can authenticate using OpenID Connect (OIDC) without managing static secrets.                                           \n    • Vercel CLI provides the ai-gateway command to manage resources and API keys.                                                                                       \n 3 Protocol & SDK Compatibility AI Gateway can be used as a drop-in replacement across various clients and SDKs:                                                         \n    • Vercel AI SDK (e.g., using generateText with models like openai/gpt-4o or similar provider strings).                                                               \n    • OpenAI Compatible APIs: Works with standard OpenAI Chat Completions (endpoint: https://ai-gateway.vercel.sh/v1/chat/completions) and the OpenAI Responses API.     \n    • Anthropic Messages API.                                                                                                                                            \n    • Supported Coding Agents & Tools: Claude Code, Cursor, Codex, etc., via Vercel CLI or framework integrations.                                                       \n    • HTTP / cURL / Python / TypeScript.                                                                                                                                 \n 4 Multi-Provider Routing and Automated Failover                                                                                                                         \n    • Dynamically route requests across healthy providers.                                                                                                               \n    • Define custom provider ordering, filtering, and fallback models if the primary provider or model experiences downtime or rate limiting.                            \n    • Routing rules and virtual model configs can also be inspected and managed via the Vercel REST API (e.g., GET/POST /v1/ai-gateway/virtual-model-configs, GET/POST   \n      /v1/ai-gateway/rules).                                                                                                                                             \n 5 Supported Modalities & Tooling                                                                                                                                        \n    • Broad modality coverage: text generation, image generation, video generation, speech, transcription, realtime, embeddings, and reranking.                          \n    • Full support for file inputs and tool calling where supported by underlying models.                                                                                \n 6 Observability & Request Logging                                                                                                                                       \n    • Detailed request logs track the model, provider attempts, end-to-end latency, token usage, status, cost, and routing attempt traces.                               \n    • Response metadata indicates which provider ultimately fulfilled the request.                                                                                       \n 7 Spend & Budget Controls                                                                                                                                               \n    • Set spending limits and budgets scoped to teams, projects, API keys, or team members.                                                                              \n    • New requests using system credentials are automatically rejected once an applicable budget is reached (BYOK usage is metered separately).                          \n\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\nQuick Examples                                                                                                                                                           \n\nVercel AI SDK                                                                                                                                                            \n\n                                                                                                                                                                         \n import { generateText } from 'ai';                                                                                                                                      \n                                                                                                                                                                         \n const { text } = await generateText({                                                                                                                                   \n   model: 'openai/gpt-4o', // or desired model ID                                                                                                                        \n   prompt: 'Explain AI Gateway in one sentence.',                                                                                                                        \n });                                                                                                                                                                     \n                                                                                                                                                                         \n console.log(text);                                                                                                                                                      \n                                                                                                                                                                         \n\ncURL (OpenAI Chat Completions Interface)                                                                                                                                 \n\n                                                                                                                                                                         \n curl https://ai-gateway.vercel.sh/v1/chat/completions \\                                                                                                                 \n   -H \"Authorization: Bearer $AI_GATEWAY_API_KEY\" \\                                                                                                                      \n   -H \"Content-Type: application/json\" \\                                                                                                                                 \n   -d '{                                                                                                                                                                 \n     \"model\": \"openai/gpt-4o\",                                                                                                                                           \n     \"messages\": [                                                                                                                                                       \n       {                                                                                                                                                                 \n         \"role\": \"user\",                                                                                                                                                 \n         \"content\": \"Explain AI Gateway in one sentence.\"                                                                                                                \n       }                                                                                                                                                                 \n     ]                                                                                                                                                                   \n   }'                                                                                                                                                                    \n                                                                                                                                                                         \n\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\nSources                                                                                                                                                                  \n\n • Source file: /vercel/ai/ai-gateway.md                                                                                                                                 \n • Additional bundle references: /vercel/deploy/cli.md, /vercel/platform/rest-api.md                                                                                     \n • Canonical documentation: https://vercel.com/docs/ai-gateway (Fetched: https://vercel.com/docs/ai-gateway.md)\n ```",
  "bytes": 14496,
  "sha": "34a3e0626b8f9cbb5605298a7c7a3c375e2e049cadd1de0162ba07f84559e0b3",
  "repo_slug": "conceptcodes/deepagents-okf-consumer",
  "fonte": "repo",
  "truncated": false,
  "api": "https://api.agentalog.com/api/listings/okf_conceptcodes_deepagents_okf_consumer_bun_0033e746/readme"
}