> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-ai/boxlang-ai.md).

# Overview

BoxLang AI gives you chat, agents, tools, memory, RAG, MCP, and enterprise governance through one fluent API across the leading AI providers.

BoxLang is the software productivity platform for building, modernizing and running applications, with developers and AI agents working together. **BoxLang AI** is how you build AI **into** your applications: one fluent API for chat, agents, tools, memory, RAG, MCP, and the governance controls that enterprises need.

{% hint style="info" %}
This section summarizes the most important parts of BoxLang AI and links to the complete documentation at [**ai.ortusbooks.com**](https://ai.ortusbooks.com) for depth and reference.
{% endhint %}

## 🤔 Two Different Ideas

|           | Agentic development                                                              | BoxLang AI                                       |
| --------- | -------------------------------------------------------------------------------- | ------------------------------------------------ |
| **What**  | Using AI agents to write your BoxLang application                                | Building AI features **inside** your application |
| **Where** | [Getting Started > Agentic Development](/getting-started/agentic-development.md) | This section                                     |

## ✨ What You Can Build

```mermaid
flowchart LR
    User[User] --> Agent[Agent]
    Agent --> Memory[Memory]
    Agent --> Tools[Tools and MCP]
    Agent --> RAG[RAG]
    RAG --> Vectors[(Vector Stores)]
    Agent --> Model[AI Models]
    Model --> Response[Response]
    Response --> User
    Guard[Middleware and Guardrails] -.-> Agent
```

* **Chat** with streaming and typed, structured output
* **Agents** with instructions, memory, tools, skills, and sub-agents
* **Tools** that let models call your code
* **Memory and RAG** with 20+ memory types and many vector store integrations
* **MCP** clients and servers
* **Governance** with guardrails, prompt-injection defense, human approval, and audit trails
* **Multimodal** audio, image generation, and web search
* **Browser agents** that visit pages, fill forms, and click through web applications with [bx-playwright](/boxlang-ai/boxlang-ai/browser-agents.md)

## ⚡ Quick Start

Install the module:

```bash
bx-module install bx-ai
```

With CommandBox:

```bash
box install bx-ai
```

Configure a provider in `boxlang.json`, keeping keys in environment variables:

```json
{
  "modules": {
    "bxai": {
      "settings": {
        "provider": "openai",
        "apiKey": "${OPENAI_API_KEY}"
      }
    }
  }
}
```

Your first chat:

```js
answer = aiChat( "What is BoxLang?" )
println( answer )
```

```bash
boxlang hello.bxs
```

Prefer to run models locally with no API costs? Use the `ollama` provider. See [Providers & Gateways](/boxlang-ai/boxlang-ai/providers-and-gateways.md).

## 🗺️ In This Section

{% content-ref url="/pages/bN4E4qpQviiPAAArk8Z6" %}
[Chat & Structured Output](/boxlang-ai/boxlang-ai/chat-and-structured-output.md)
{% endcontent-ref %}

{% content-ref url="/pages/i2FkYfgIidy3Zg4Wp6YY" %}
[Agents](/boxlang-ai/boxlang-ai/agents.md)
{% endcontent-ref %}

{% content-ref url="/pages/QrqnZ8hIc9ob8smAxRLI" %}
[Tools & Skills](/boxlang-ai/boxlang-ai/tools-and-skills.md)
{% endcontent-ref %}

{% content-ref url="/pages/DR9JAriGxv5DDaNEC9iZ" %}
[Memory & RAG](/boxlang-ai/boxlang-ai/memory-and-rag.md)
{% endcontent-ref %}

{% content-ref url="/pages/4fV8qkgwsS5WhJjrKob2" %}
[MCP](/boxlang-ai/boxlang-ai/mcp.md)
{% endcontent-ref %}

{% content-ref url="/pages/TV6V5bNNcpWMGDPGMBlV" %}
[Governance & Security](/boxlang-ai/boxlang-ai/governance-and-security.md)
{% endcontent-ref %}

{% content-ref url="/pages/NRsfsXUuK76KFdgeGC8T" %}
[Multimodal](/boxlang-ai/boxlang-ai/multimodal.md)
{% endcontent-ref %}

{% content-ref url="/pages/zISg8wNRj8N1JTZP9Bs5" %}
[Providers & Gateways](/boxlang-ai/boxlang-ai/providers-and-gateways.md)
{% endcontent-ref %}

## 🏢 Enterprise Ready

AI in production needs more than a model call. BoxLang AI includes middleware for guardrails, retries and logging, human approval for sensitive actions, prompt-injection defense, multi-tenant memory isolation, and a flight recorder for audit trails. See [Governance & Security](/boxlang-ai/boxlang-ai/governance-and-security.md).

{% hint style="success" %}
**Try every BoxLang+ module free for 60 days.** The trial starts automatically the first time you start a BoxLang server or CLI with a BoxLang+ module installed. No sign-up and no key. Pair BoxLang AI with [Couchbase +](/boxlang-+-++/modules/bx-couchbase/aimemory.md) for vector memory. Enterprise support is available when you [join us](https://www.boxlang.io/plans).
{% endhint %}

For live runtime introspection, use the free-to-use proprietary [bx-mcp module](/boxlang-ai/bx-mcp.md), which requires `bx-ai`.

## 📚 Full Documentation

* [BoxLang AI documentation](https://ai.ortusbooks.com)
* [Quick Start Guide](https://ai.ortusbooks.com/getting-started/quickstart)
* [Installation](https://ai.ortusbooks.com/getting-started/installation)
* [Built-In Function Reference](https://ai.ortusbooks.com/advanced/reference/built-in-functions)
* Docs MCP server for your agent: `https://ai.ortusbooks.com/~gitbook/mcp`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://boxlang.ortusbooks.com/boxlang-ai/boxlang-ai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
