# AI Chat

Your team asks for what they need instead of hunting for it. The assistant answers questions about your data, edits records and runs your actions — always inside the signed-in user’s own permissions.

![AI Chat screenshot](https://avohq.io/assets/addons/ai/ai-a96a081ae92d11053966a62e738f0cbe76898d203bed0938c75947b733a1691a.png)

- Price: $99/month
- Gem: `gem "avo-ai"`
- Docs: https://docs.avohq.io/4.0/ai
- Web page: https://avohq.io/addons/ai
- Pricing: https://avohq.io/pricing.md

Your team asks for what they need instead of hunting for it. A chat bar sits on every Avo page, and the assistant answers questions about your data, edits records, and runs the actions you already defined. It starts from whatever the person is looking at: a record page, the rows they checked on an Index view, a file they dropped in. Ask it for last week's failed orders, or to refund one, and it calls tools against your real resources.

Every tool call runs through your Avo policies for the signed-in user, per record and per field. A resource someone cannot list stays invisible to the assistant too. Writes come back as a confirmation card that only a person can click, and each one lands in the chat's audit trail with an undo. You teach it your domain in one ERB prompt file and choose which tools it gets. The agent loop, the guardrails, and the streaming chat UI come with the gem.

## See it in action

### Ask a question, get the records

Ask from any page, in the words you'd use with a colleague. The answer names the records it found, and each one opens with a click.

### Turn a CSV into records

Attach a file and say what it is. You get the column mapping and a preview of the rows, and nothing is created until you click Import.

### Run the actions you already wrote

Name the action and the record. The assistant finds both, then waits on a card for you to click Run.

## What you get

- Fourteen tools the assistant calls, from `active_record_query` and `schema_inspector` through `create_record`, `update_record`, `run_action`, `import_records`, and `active_storage_attachment`
- A confirmation card before every update, delete, action run, file attachment, and CSV import: the model proposes, the person clicks Confirm, and `write_history` undoes the columns it changed
- Authorization on every call, per resource and per field, for the user who owns the chat, so records outside their reach come back as not found rather than not allowed
- Skills: reusable instructions your admins write in markdown, attached to a message with `/`, imported and exported as `.md` files, and gated by `Avo::Ai::SkillPolicy`
- Prompts are ERB files under `app/prompts/avo/ai/` that your app overrides file by file, plus `bin/rails avo:ai:inventory` and an onboarding skill that writes your `app_context.txt.erb` for you
- A model picker you curate per user with `available_models`, across the RubyLLM 2.0 providers (Anthropic, OpenAI, Gemini, Bedrock, OpenRouter, Ollama), with thinking traces on the models that support them
- Your own tools in the roster with `config.ai.extra_tools`, shipped ones removed with `config.ai.excluded_tools`, and a generator that scaffolds a tool with the authorization mixins already wired

## Why it pays off

- An assistant is an agent loop, a tool layer, and a streaming chat UI before it answers a single question. You add a gem instead of building those three.
- One authorization layer, every surface: the policy that scopes records, hides attributes, and gates actions in the UI binds the assistant too, so there is no second access-control layer to write for agents.
- Built for many apps, so the slow parts are done: confirmation before writes, undo, row caps on imports, and a clear answer when a provider rate-limits or a conversation runs too long.
- New tools, providers, and fixes arrive with bundle update, and they reach every app at once instead of each team patching its own assistant.

Included in bundles: AI Bundle ($139/month)
