The Agent gives GhostAI and GhostLLM users the ability to ask natural language questions about data in Ghost Databases — and receive answers as text, tables, or charts — without needing to know SQL, use BI tools, or build dashboards.
Enabling the Agent
To enable the Agent for GhostAI, navigate to GhostAI → Customization and toggle Agent Status to enabled, then click Apply.
For GhostLLM, the Agent is enabled per application when creating or editing a GhostLLM API key. See the GhostLLM article for details.
How the Agent works
The Agent uses a key architectural principle: the LLM never sees your corporate data.
When a user asks a question:
- The Agent sends only metadata to the LLM — schema names, table names, column names, descriptions, and data types. No actual data rows are sent.
- The LLM produces a recipe — typically a SQL query or Python code — that would answer the question.
- The recipe is executed in a secure sandbox against the Ghost Database, with all access control and data transformation policies (redaction, obfuscation) enforced.
- The results are formatted and returned to the user.
Because the user is always authenticated, the Agent can only access Ghost Databases that the user's groups have been granted access to. Row-Level Security and transformation policies apply to all Agent queries.
Agent capabilities
Beyond database queries, the Agent can optionally use additional tools:
Web Search — When enabled, the Agent can search the web for current events, real-time information, and facts. This is useful for questions that combine corporate data with external context. Citations are included in responses.
Image Generation — When enabled, the Agent can generate images using OpenAI DALL-E or Google Gemini Imagen models. This requires an OpenAI or Gemini API key configured at the tenant level.
These capabilities are configured separately for GhostAI and GhostLLM:
- GhostAI — Web search and image generation are configured under GhostAI → LLM → Customization, in the Agent Status section. When image generation is enabled, you can also configure the default model, quality, size, aspect ratio, and resolution.
- GhostLLM — Each API key has its own Agent configuration with toggles for web search and image generation, plus group assignments to control database access.
Access control
The Agent respects the same group-based access model as the rest of the platform:
- In GhostAI, the Agent can access all Ghost Databases available to the authenticated user's groups.
- In GhostLLM, each application specifies which groups the Agent runs as, controlling which Ghost Databases it can query.
Data transformation policies (obfuscation, redaction) are applied to all Agent results, just as they would be for direct database queries.
Example
A user can ask a natural language question and receive structured answers, follow-up with related questions, and get charts or tables — all without writing SQL or leaving the chat interface.