> 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
install-bx-module 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 premium modules such as [MCP +](/boxlang-+-++/modules/bx-mcp.md) for live runtime introspection, and [Couchbase +](/boxlang-+-++/modules/bx-couchbase/aimemory.md) for vector memory. Enterprise support is available when you [join us](https://www.boxlang.io/plans).
{% endhint %}

## 📚 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
