# Boundary Documentation ## Instructions for AI Agents - For clean Markdown of any page, append `.md` to the page URL - For section-specific indexes, append `/llms.txt` to any section URL - For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.boundaryml.com/_mcp/server ## Docs - [🏠 Welcome](https://docs.boundaryml.com/home.md): The easiest way to use LLMs - [What is BAML?](https://docs.boundaryml.com/guide/introduction/what-is-baml.md) - [Why BAML?](https://docs.boundaryml.com/guide/introduction/why-baml.md): The journey from simple LLM calls to production-ready structured extraction - [What is baml_src?](https://docs.boundaryml.com/guide/introduction/baml_src.md) - [What is baml_client?](https://docs.boundaryml.com/guide/introduction/baml_client.md) - [VSCode Extension](https://docs.boundaryml.com/guide/installation-editors/vs-code-extension.md) - [Cursor](https://docs.boundaryml.com/guide/installation-editors/cursor-extension.md) - [JetBrains IDEs](https://docs.boundaryml.com/guide/installation-editors/jetbrains.md) - [Zed](https://docs.boundaryml.com/guide/installation-editors/zed.md) - [Claude Code](https://docs.boundaryml.com/guide/installation-editors/claude-code.md) - [Other Editors](https://docs.boundaryml.com/guide/installation-editors/others.md) - [Python](https://docs.boundaryml.com/guide/installation-language/python.md) - [Typescript](https://docs.boundaryml.com/guide/installation-language/typescript.md) - [Go](https://docs.boundaryml.com/guide/installation-language/go.md) - [Ruby](https://docs.boundaryml.com/guide/installation-language/ruby.md) - [Rust](https://docs.boundaryml.com/guide/installation-language/rust.md): Set up BAML with Rust - [REST API (other languages)](https://docs.boundaryml.com/guide/installation-language/rest-api-other-languages.md) - [Elixir](https://docs.boundaryml.com/guide/installation-language/elixir.md) - [React/Next.js Setup](https://docs.boundaryml.com/guide/framework-integration/react-next-js/quick-start.md) - [Building a Chatbot with BAML React Hooks](https://docs.boundaryml.com/guide/framework-integration/react-next-js/building-a-chatbot.md): Learn to build a streaming chatbot using BAML React hooks and Next.js - [Set Environment Variables](https://docs.boundaryml.com/guide/development/environment-variables.md) - [Terminal Logs](https://docs.boundaryml.com/guide/development/terminal-logs.md) - [Upgrading BAML / Fixing Version Mismatches](https://docs.boundaryml.com/guide/development/upgrade-baml-versions.md) - [AWS](https://docs.boundaryml.com/guide/development/deploying/aws.md) - [Docker](https://docs.boundaryml.com/guide/development/deploying/docker.md) - [OpenAPI](https://docs.boundaryml.com/guide/development/deploying/docker-rest-api.md) - [Prompting in BAML](https://docs.boundaryml.com/guide/baml-basics/prompting-with-baml.md) - [Switching LLMs](https://docs.boundaryml.com/guide/baml-basics/switching-llms.md) - [Testing functions](https://docs.boundaryml.com/guide/baml-basics/testing-functions.md) - [Streaming](https://docs.boundaryml.com/guide/baml-basics/streaming.md) - [Multi-Modal (Images / Audio)](https://docs.boundaryml.com/guide/baml-basics/multi-modal.md) - [Error Handling](https://docs.boundaryml.com/guide/baml-basics/error-handling.md) - [Configuring Timeouts](https://docs.boundaryml.com/guide/baml-basics/timeouts.md) - [Concurrent function calls](https://docs.boundaryml.com/guide/baml-basics/concurrent-calls.md) - [AbortSignal / Timeouts](https://docs.boundaryml.com/guide/baml-basics/abort-signal.md): Cancel in-flight LLM operations to save time and resources - [Collector](https://docs.boundaryml.com/guide/baml-advanced/collector-track-tokens.md) - [Client Registry](https://docs.boundaryml.com/guide/baml-advanced/llm-client-registry.md) - [Dynamic Types - TypeBuilder](https://docs.boundaryml.com/guide/baml-advanced/dynamic-types.md) - [Reusing Prompt Snippets](https://docs.boundaryml.com/guide/baml-advanced/reusing-prompt-snippets.md) - [Prompt Caching / Message Role Metadata](https://docs.boundaryml.com/guide/baml-advanced/prompt-caching-message-role-metadata.md) - [Checks and Asserts](https://docs.boundaryml.com/guide/baml-advanced/checks-and-asserts.md) - [Modular API](https://docs.boundaryml.com/guide/baml-advanced/modular-api.md) - [Prompt Optimization (Beta)](https://docs.boundaryml.com/guide/baml-advanced/prompt-optimization.md) - [Boundary Studio](https://docs.boundaryml.com/guide/boundary-cloud/observability/tracking-usage.md) - [Comparing Langchain](https://docs.boundaryml.com/guide/comparisons/baml-vs-langchain.md) - [Comparing Marvin](https://docs.boundaryml.com/guide/comparisons/baml-vs-marvin.md) - [Comparing AI SDK](https://docs.boundaryml.com/guide/comparisons/baml-vs-ai-sdk.md) - [Comparing OpenAI SDK](https://docs.boundaryml.com/guide/comparisons/baml-vs-open-ai-sdk.md) - [Comparing Pydantic](https://docs.boundaryml.com/guide/comparisons/baml-vs-pydantic.md) - [Contact](https://docs.boundaryml.com/guide/contact.md) - [Interactive Examples](https://docs.boundaryml.com/examples/interactive-examples.md) - [Reduce Hallucinations](https://docs.boundaryml.com/examples/prompt-engineering/reducing-hallucinations.md) - [Classification](https://docs.boundaryml.com/examples/prompt-engineering/classification.md) - [Chat](https://docs.boundaryml.com/examples/prompt-engineering/chat.md) - [Tools / Function Calling](https://docs.boundaryml.com/examples/prompt-engineering/tools-function-calling.md) - [Chain-of-Thought Prompting](https://docs.boundaryml.com/examples/prompt-engineering/chain-of-thought.md) - [Creating a Classification Function with Symbol Tuning](https://docs.boundaryml.com/examples/prompt-engineering/symbol-tuning.md) - [Token Optimization](https://docs.boundaryml.com/examples/prompt-engineering/token-optimization.md) - [PII Data Extraction / Scrubbing](https://docs.boundaryml.com/examples/prompt-engineering/pii-data-extraction-scrubbing.md) - [Action Item Extraction](https://docs.boundaryml.com/examples/prompt-engineering/action-item-extraction.md) - [Retrieval-Augmented Generation (RAG)](https://docs.boundaryml.com/examples/prompt-engineering/retrieval-augmented-generation.md) - [BAML Reference](https://docs.boundaryml.com/ref/overview.md) - [init](https://docs.boundaryml.com/ref/baml-cli/init.md) - [generate](https://docs.boundaryml.com/ref/baml-cli/generate.md) - [test](https://docs.boundaryml.com/ref/baml-cli/test.md) - [serve](https://docs.boundaryml.com/ref/baml-cli/serve.md) - [dev](https://docs.boundaryml.com/ref/baml-cli/dev.md) - [fmt](https://docs.boundaryml.com/ref/baml-cli/fmt.md) - [comments](https://docs.boundaryml.com/ref/baml/general-baml-syntax/comments.md) - [Environment Variables](https://docs.boundaryml.com/ref/baml/general-baml-syntax/environment-variables.md) - [string](https://docs.boundaryml.com/ref/baml/general-baml-syntax/string.md) - [int / float](https://docs.boundaryml.com/ref/baml/general-baml-syntax/int-float.md) - [bool](https://docs.boundaryml.com/ref/baml/general-baml-syntax/bool.md) - [array (list)](https://docs.boundaryml.com/ref/baml/general-baml-syntax/array-list.md) - [map (dictionary)](https://docs.boundaryml.com/ref/baml/general-baml-syntax/map-dictionary.md) - [Image / Audio / Pdf / Video](https://docs.boundaryml.com/ref/baml/general-baml-syntax/media.md) - [Types](https://docs.boundaryml.com/ref/baml/types.md) - [function](https://docs.boundaryml.com/ref/baml/function.md) - [test](https://docs.boundaryml.com/ref/baml/test.md) - [template_string](https://docs.boundaryml.com/ref/baml/template-string.md) - [LLM Clients (client)](https://docs.boundaryml.com/ref/baml/client-llm.md) - [class](https://docs.boundaryml.com/ref/baml/class.md) - [enum](https://docs.boundaryml.com/ref/baml/enum.md) - [generator](https://docs.boundaryml.com/ref/baml/generator.md) - [with_options](https://docs.boundaryml.com/ref/baml_client/with-options.md) - [AbortSignal / Timeouts](https://docs.boundaryml.com/ref/baml_client/abort-signal.md): API reference for cancelling BAML function calls - [Collector](https://docs.boundaryml.com/ref/baml_client/collector.md) - [config (logging / environment variables)](https://docs.boundaryml.com/ref/baml_client/config.md) - [AsyncClient / SyncClient](https://docs.boundaryml.com/ref/baml_client/client.md) - [TypeBuilder](https://docs.boundaryml.com/ref/baml_client/type-builder.md) - [client Option](https://docs.boundaryml.com/ref/baml_client/client-option.md) - [OnTick](https://docs.boundaryml.com/ref/baml_client/on-tick.md) - [Image / Audio / Pdf / Video](https://docs.boundaryml.com/ref/baml_client/media.md): Learn how to handle image, audio, Pdf, and video inputs in BAML functions - [Image](https://docs.boundaryml.com/ref/baml_client/image.md): Learn how to handle image inputs in BAML functions - [Audio](https://docs.boundaryml.com/ref/baml_client/audio.md): Learn how to handle audio inputs in BAML functions - [Pdf](https://docs.boundaryml.com/ref/baml_client/pdf.md): Learn how to handle Pdf inputs in BAML functions - [Video](https://docs.boundaryml.com/ref/baml_client/video.md): Learn how to handle video inputs in BAML functions - [BAML Error Types](https://docs.boundaryml.com/ref/baml_client/errors/overview.md): Technical reference for BAML error handling classes - [BamlValidationError](https://docs.boundaryml.com/ref/baml_client/errors/baml-validation-error.md): Technical reference for the BamlValidationError class - [BamlClientFinishReasonError](https://docs.boundaryml.com/ref/baml_client/errors/baml-client-finish-reason-error.md): Technical reference for the BamlClientFinishReasonError class - [BamlAbortError](https://docs.boundaryml.com/ref/baml_client/errors/baml-abort-error.md): Error thrown when a BAML operation is cancelled - [Generated Hooks Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/use-function-name-hook.md): Technical reference for BAML's auto-generated React hooks - [Hook Input Type Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/hook-input.md): Technical reference for the BAML React hook input type - [Hook Output Type Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/hook-output.md): Technical reference for the BAML React hook output type - [Hook Data Type Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/hook-data.md): Technical reference for the BAML React hook data type - [What are attributes?](https://docs.boundaryml.com/ref/attributes/what-are-attributes.md) - [@alias / @@alias](https://docs.boundaryml.com/ref/attributes/alias.md) - [@description / @@description](https://docs.boundaryml.com/ref/attributes/description.md) - [@skip](https://docs.boundaryml.com/ref/attributes/skip.md) - [@assert](https://docs.boundaryml.com/ref/attributes/assert.md) - [@check](https://docs.boundaryml.com/ref/attributes/check.md) - [Jinja in Attributes](https://docs.boundaryml.com/ref/attributes/jinja-in-attributes.md) - [@@dynamic](https://docs.boundaryml.com/ref/attributes/dynamic.md) - [aws-bedrock](https://docs.boundaryml.com/ref/llm-client-providers/aws-bedrock.md): AWS Bedrock provider for BAML - [anthropic](https://docs.boundaryml.com/ref/llm-client-providers/anthropic.md) - [google-ai](https://docs.boundaryml.com/ref/llm-client-providers/google-ai-gemini.md) - [vertex-ai](https://docs.boundaryml.com/ref/llm-client-providers/google-vertex.md) - [openai](https://docs.boundaryml.com/ref/llm-client-providers/open-ai.md) - [openai-responses](https://docs.boundaryml.com/ref/llm-client-providers/open-ai-responses-api.md) - [azure-openai](https://docs.boundaryml.com/ref/llm-client-providers/open-ai-from-azure.md) - [openrouter](https://docs.boundaryml.com/ref/llm-client-providers/openrouter.md) - [openai-generic](https://docs.boundaryml.com/ref/llm-client-providers/openai-generic.md) - [Microsoft Foundry / Azure AI Foundry](https://docs.boundaryml.com/ref/llm-client-providers/microsoft-foundry.md) - [Cerebras](https://docs.boundaryml.com/ref/llm-client-providers/cerebras.md) - [groq](https://docs.boundaryml.com/ref/llm-client-providers/groq.md) - [huggingface](https://docs.boundaryml.com/ref/llm-client-providers/huggingface.md) - [Keywords AI](https://docs.boundaryml.com/ref/llm-client-providers/keywordsai.md) - [llama-api](https://docs.boundaryml.com/ref/llm-client-providers/llama-api.md) - [litellm](https://docs.boundaryml.com/ref/llm-client-providers/litellm.md) - [LMStudio](https://docs.boundaryml.com/ref/llm-client-providers/lmstudio.md) - [ollama](https://docs.boundaryml.com/ref/llm-client-providers/ollama.md) - [vercel-ai-gateway](https://docs.boundaryml.com/ref/llm-client-providers/vercel-ai-gateway.md) - [Tinfoil](https://docs.boundaryml.com/ref/llm-client-providers/tinfoil.md) - [Together AI](https://docs.boundaryml.com/ref/llm-client-providers/together.md) - [Unify AI](https://docs.boundaryml.com/ref/llm-client-providers/unify.md) - [vLLM](https://docs.boundaryml.com/ref/llm-client-providers/vllm.md) - [Timeout Configuration](https://docs.boundaryml.com/ref/llm-client-strategies/timeouts.md) - [retry_policy](https://docs.boundaryml.com/ref/llm-client-strategies/retry-policy.md) - [fallback](https://docs.boundaryml.com/ref/llm-client-strategies/fallback.md) - [round-robin](https://docs.boundaryml.com/ref/llm-client-strategies/round-robin.md) - [What is Jinja / Cookbook](https://docs.boundaryml.com/ref/prompt-syntax/what-is-jinja.md) - [Jinja Filters](https://docs.boundaryml.com/ref/prompt-syntax/jinja-filters.md) - [ctx.output_format](https://docs.boundaryml.com/ref/prompt-syntax/ctx-output-format.md) - [ctx (accessing metadata)](https://docs.boundaryml.com/ref/prompt-syntax/ctx-client.md) - [_.role](https://docs.boundaryml.com/ref/prompt-syntax/role.md) - [Variables](https://docs.boundaryml.com/ref/prompt-syntax/variables.md) - [Conditionals](https://docs.boundaryml.com/ref/prompt-syntax/conditionals.md) - [Loops](https://docs.boundaryml.com/ref/prompt-syntax/loops.md) - [baml.cliPath](https://docs.boundaryml.com/ref/editor-extension-settings/baml-cli-path.md) - [baml.generateCodeOnSave](https://docs.boundaryml.com/ref/editor-extension-settings/baml-generate-code-on-save.md) - [baml.enablePlaygroundProxy](https://docs.boundaryml.com/ref/editor-extension-settings/baml-enable-playground-proxy.md) - [baml.syncExtensionToGeneratorVersion](https://docs.boundaryml.com/ref/editor-extension-settings/baml-sync-extension-to-generator-version.md) - [Changelog](https://docs.boundaryml.com/changelog/changelog.md)