Overview
Build AI-powered applications and autonomous agents on the JVM with one unified API for OpenAI, Claude, Gemini, Ollama, and more.
BoxLang AI is the module for building AI into your applications. It gives you one unified API across many providers, including OpenAI, Claude, Gemini, Grok, and Ollama, plus agents, multi-tenant memory, tools, RAG, MCP, and the middleware controls you need to run AI in production.
It is part of the BoxLang software productivity platform, built for developers, built for AI, built to ship.
We recommend you use simple chat functions (aiChat(), aiMessage()) when you want to quickly add AI capabilities to existing applications. Use AI Agents and Pipelines when you have more advanced needs that require autonomous reasoning, tool calling, memory systems, RAG, and multi-step workflows.
BoxLang AI agents are built with composable pipelines and memory systems to provide streaming execution, tool integration, multi-tenant isolation, persistence, and more. You can start simple and scale to complex workflows as your needs grow.
📚 In This Section
📦 Installation
Quick guide to installing BoxLang AI.
What you'll learn:
Installing via BoxLang Module Installer, CommandBox, or package dependencies
Basic configuration setup
Running Ollama with Docker for production deployments
Verification and next steps
Time: 5 minutes
🧩 Provider Setup & Configuration
Comprehensive guide to configuring all supported AI providers.
What you'll learn:
Provider comparison and recommendations
Getting API keys for the supported cloud providers (OpenAI, Claude, Gemini, and more)
Setting up Ollama for local AI (no API costs!)
Configuration best practices
Environment variables and security
Multiple provider management
Troubleshooting provider issues
Time: 10-15 minutes
✨ What You Get
🤖 Multi-Provider Support - OpenAI, Claude, Gemini, Ollama, Grok, Groq, DeepSeek, Cloudflare Workers AI, Perplexity, and more
💬 Simple Chat Interface - Start with one-line AI conversations
🔄 Composable Pipelines - Build complex AI workflows by chaining operations
🧠 Intelligent Agents - Create autonomous agents with memory and tools
📊 Structured Output - Extract data into classes, structs, or arrays
🎙️ Multimodal Content - Process images, audio, video, and documents
🛠️ Real-Time Tools - Enable AI to call functions and APIs
💭 Memory Systems - Maintain conversation context across interactions
📡 Streaming Support - Real-time response streaming for better UX
🧭 Quick Navigation
🆕 New to BoxLang AI?
Installation Guide Get the module installed in minutes.
Provider Setup Configure your AI providers.
Quickstart Tutorial Your first AI conversation in 5 lines of code.
⚡ Quick Start Guide
Your first AI conversation in 5 lines of code, plus essential patterns and examples.
What you'll learn:
Making your first AI chat request
Understanding basic BIF usage (
aiChat,aiMessage,aiModel)Provider switching and model selection
Streaming responses in real-time
Working with structured output
Building your first AI agent with tools and memory
Common patterns and best practices
Time: 15-20 minutes
📖 Key Concepts
Essential AI terminology and concepts explained in plain language.
What you'll learn:
AI & Machine Learning fundamentals (LLMs, training vs inference)
Language model parameters (temperature, top-p, tokens, context windows)
Messages & conversations (roles, system messages, multi-turn)
Embeddings & vectors (dimensions, cosine similarity, vector databases)
Memory systems (conversation, vector, hybrid, multi-tenant)
RAG (Retrieval Augmented Generation) workflow
Tools & function calling
Streaming & async operations
Pipelines & composition
Providers & services comparison
Tokens & costs
Time: 30 minutes reference
❓ Frequently Asked Questions
Quick answers to the most common questions about BoxLang AI.
Topics covered:
Getting started (why use BoxLang AI, free options, offline usage)
Providers & models (comparison, recommendations, model selection)
Costs & pricing (optimization, estimation, budget management)
Performance & reliability (response variation, speed, handling downtime)
Features & capabilities (structured output, tools, memory, RAG, multimodal)
Memory & context (conversation vs vector, multi-tenant isolation)
Security & privacy (data privacy, prompt injection, API keys)
Troubleshooting (common errors, rate limits, context length)
Best practices (aiChat vs aiAgent, memory sizing, caching, error handling)
Time: Quick reference
🎯 Learning Path
We recommend this progression:
📦 Install - Get the module installed (5 min)
🧩 Configure Providers - Set up your AI providers (10 min)
⚡ Quick Start - Your first AI conversation (10 min)
📖 Key Concepts - Learn AI terminology (reference as needed)
💬 Basic Chatting - Simple interactions and parameters (15 min)
🎯 Advanced Chatting - Streaming, tools, multimodal content (20 min)
🤖 AI Agents - Build autonomous agents (30 min)
💡 Pro Tip: Keep the FAQ handy for quick answers to common questions!
💡 Quick Examples
Simple Chat
Structured Output
AI Agent
🔗 Related Documentation
After mastering the basics, explore these advanced topics:
🔄 Pipelines - Build composable AI workflows
💭 Memory Systems - Maintain conversation context
🛠️ Tools - Enable AI to call functions
📄 Document Loaders - Process various file formats
🔮 Vector Memory - Semantic search with embeddings
❓ Need Help?
🐛 Found a bug? Report it on GitHub
💡 Have an idea? Start a discussion
🆘 Professional Support? AI Services and BoxLang+ plans
🚀 Part of the BoxLang Platform
Building with an AI coding agent? See Agentic Development to set up skills, MCP servers, and project guides so your agent writes idiomatic BoxLang.
Every BoxLang+ module is free to try for 60 days. The trial starts automatically the first time you start a BoxLang server or CLI with a BoxLang+ module installed, with no sign-up and no key.
Last updated