AI
AI Agents
Autonomous loops that chain tools — read, decide, repeat.
An agent is a loop: think → pick a tool → observe → repeat until the goal is met or a budget runs out.
Three execution modes
The agent runtime picks a path per provider:
- Pure chat — no tools used, just streaming answers
- Native tool calling — used when the provider supports it (Claude, OpenAI / OpenAI-compatible, Gemini)
- ReAct fallback — text-based tool calls, used for Ollama (which doesn't expose native tools)
Built-in tools
Six tools today:
| Tool | Action | Bounds |
|---|---|---|
list_tables | List tables in the database | — |
get_columns | Get a table's columns / indexes / FKs | — |
execute_query | Run a read-only SQL query | ≤ 100 rows; masking applied |
get_sample_data | Sample rows from a table | ≤ 100 rows (default 20); masking applied |
execute_statement | Run a SQL statement | Permission-gated |
get_collection_info | Vector collection metadata only | No similarity search |
Masking is enforced server-side before results return to the model.
Permission tiers
Pick one when the agent starts:
| Tier | Allows |
|---|---|
| Read-only | Tool reads + read-only queries |
| Read-write | Adds execute_statement (blocks DELETE / DROP / TRUNCATE) |
| Schema design | Adds CREATE / ALTER |
| Full control | Everything |
Budgets
- Max LLM rounds: 10 (fixed in the agent config)
- Tool timeout: 30 s read / 60 s write
- Consecutive failures: stops after 3
There is no separate token budget field. Provider max_tokens is currently hardcoded to 4096 in several call sites.
Safety
- Panic recovery + duplicate-call dedup built into the run loop
- Tool errors back to the model so it can correct itself
- Destructive operations are denied based on the permission tier — even with Full Control, the safety checker still reviews each tool call's SQL
Quota
Agent runs consume the daily AI quota (license_consume_ai). Free: 5/day; Pro: unlimited. Note: long-term memory auto-extraction is Pro-only — Free plans can read existing memories and manually pin facts (up to 50), but new facts aren't auto-saved from chat.
Not yet built
- HTTP / file / shell tool executors — only
DatabaseToolExecutorexists today - Agent-level token budget (only
max_roundscurrently) - Vector similarity-search tool (only
get_collection_infoexists)