AI Chat
Ask about a selected database in plain language. The assistant can use its schema, saved queries, and query tools to help explain and explore your data.
A fast answer when you need to know what your data says.
Explore AI ChatONYX AI · BUILT AROUND YOUR DATA
Ask a question. Investigate a pattern. Build an agent. Train a model. Put the result in your application. Onyx connects AI to the data and tools you already use to build.
Structured records · queries · relationships
The idea behind Onyx AI
Most product questions begin in your data: a customer record, a transaction, a pattern across thousands of rows. Onyx puts AI beside the database, query tools, development workspace, and application interfaces.
Start with a plain-language answer. When the question grows, let an agent investigate. When the answer needs to become a feature, call AI through the SDK or publish an agent or model for your app.
Explore the platform
Choose the right depth for the job, from a quick database question to a shipped application feature.
Ask about a selected database in plain language. The assistant can use its schema, saved queries, and query tools to help explain and explore your data.
A fast answer when you need to know what your data says.
Explore AI ChatGive an agent a larger question. It can examine records in batches, track its progress, and return an answer with supporting analysis and files.
Grant actions when you want it to create scripts, visualizations, or dashboards.
Explore Agentic ResearchDesign an agent as a workflow of connected steps. Choose prompts, models, tools, and approval paths; test it in chat before publishing.
Call the published agent by model identifier from your application.
Explore Agent BuilderUse a saved database query as training data. Map input features and targets, train a neural network, inspect runs, and publish a model.
Send application inputs to its prediction API.
Explore Model BuilderWork with an AI coding agent beside your source code and live preview. Ask it to implement features, inspect changes, and run checks in your workspace.
Your app, data connection, and development tools stay in one place.
Explore WorkspacesCall chat from your code with database credentials. Use the SDK for short answers or the chat completions API for messages, streaming, and agents.
Bring intelligence into a real product flow.
Browse the SDKs01 / Understand
You can open AI Chat for a selected database and ask in ordinary language. Onyx can use the database schema and query tools to help find an answer, draft a script, or explain what is available. Saved queries and documents can provide additional context.
Working in the Query Editor? Its AI Query Assistant can draft and revise queries there, too.
Which open support issues are affecting our largest accounts?
Look across your account and issue tables, inspect the relevant records, and explain the finding in context.
02 / Investigate
Agentic Research works through a longer investigation. It can page through large datasets, show what it is checking, and preserve task history when you leave the page. The answer includes evidence and available supporting files.
When you grant the relevant actions, research can also create saved scripts, visualizations, dashboards, and documents. Its permissions are checked against your role and the selected database.
How Agentic Research works“What changed in customer activity this month?”
Query in batches, analyze patterns, show progress.
Answer, evidence, and supporting files.
AI in your code
Use the same Onyx client to ask a question and query structured records. The SDK makes it straightforward to compose the two in an application flow.
// Ask AI for a value, then use it in a query.
import { onyx, eq } from "@onyx.dev/onyx-database";
const db = onyx.init();
const name = (await db.chat(
"Who was the first U.S. president? Reply with only the full name."
)).trim();
const users = await db.from("Users")
.where(eq("name", name))
.list();db.chat() returns the answer text from the configured AI model.
Await the answer before passing it to where(eq(...)). Your application can validate the value before querying.
Use chat completions for multi-message conversations and streaming, or call a published agent with its model identifier.
The code is illustrative: your schema needs a Users table with a name field. Exact-match filters should use a validated model response.
From answers to capabilities
Onyx gives you two routes from an idea to a reusable AI capability.
Agent Builder
Connect workflow nodes, choose tools and models, and test how the agent handles real questions and approvals. Publish a model identifier, then call the agent through chat completions.
Model Builder
Start from a saved Onyx query, map input features and targets, configure and train a neural network, then publish a version for prediction requests from your application.
Workspace AI control plane
Workspaces bring the AI coding agent, source files, live preview, tests, and environment controls into one development surface. Ask it to implement a feature, inspect its diff, run checks, and connect your application to the database and AI capabilities above. You keep the code and review the path to release.
Explore Onyx WorkspacesGood questions
AI Chat is useful for focused questions about a selected database and for help with queries or scripts. Agentic Research is a separate, longer running workspace for investigations that can page through large datasets, show progress, keep task history, and return supporting analysis. Actions such as saving resources require the permissions you grant.
Yes. The Onyx SDK supports db.chat() and AI model calls. The OpenAI compatible chat completions endpoint accepts a database context and can invoke a published Agent Builder workflow by its model identifier. Published Model Builder models are available through a separate prediction API.
Database chat and queries can use your selected Onyx database directly. Model Builder trains from a saved Onyx query. You can also add documents for supporting context. The access and tools available depend on your credentials, model, and permissions.
Your next question could be the start
Start with a question. Build the intelligence your product needs.