RaisDBRaisDB
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:

  1. Pure chat — no tools used, just streaming answers
  2. Native tool calling — used when the provider supports it (Claude, OpenAI / OpenAI-compatible, Gemini)
  3. ReAct fallback — text-based tool calls, used for Ollama (which doesn't expose native tools)

Built-in tools

Six tools today:

ToolActionBounds
list_tablesList tables in the database
get_columnsGet a table's columns / indexes / FKs
execute_queryRun a read-only SQL query≤ 100 rows; masking applied
get_sample_dataSample rows from a table≤ 100 rows (default 20); masking applied
execute_statementRun a SQL statementPermission-gated
get_collection_infoVector collection metadata onlyNo similarity search

Masking is enforced server-side before results return to the model.

Permission tiers

Pick one when the agent starts:

TierAllows
Read-onlyTool reads + read-only queries
Read-writeAdds execute_statement (blocks DELETE / DROP / TRUNCATE)
Schema designAdds CREATE / ALTER
Full controlEverything

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 DatabaseToolExecutor exists today
  • Agent-level token budget (only max_rounds currently)
  • Vector similarity-search tool (only get_collection_info exists)

On this page