Skip to main content

AI Agents

Configurable AI agents that use a ReAct (Reasoning + Acting) loop to complete multi-step tasks using tools.

Use case: An agent tasked with "What's 15% of the current Bitcoin price?" will search the web for the price, then use the calculator tool to compute the result — all automatically.

How It Works

  1. Agents are defined with a name, provider, model, system prompt, tool list, temperature, and iteration limits.
  2. When run, the agent sends the task to the LLM with tool definitions.
  3. If the LLM calls a tool, the tool is executed and the result is appended to the conversation.
  4. The loop continues until the LLM returns a final answer or maxIterations is reached.
  5. Steps (thinking, tool call, tool result, final answer) are returned for inspection.

Available Tools

ToolDescription
get_datetimeReturns current ISO 8601 datetime, UTC string, and Unix timestamp
calculateSafely evaluates math expressions (+, -, *, /, %, parentheses)
web_searchDuckDuckGo instant-answer search (no API key required)
http_getMakes HTTP GET requests to public URLs; returns up to 4000 chars of body
database_queryRuns read-only SELECT queries on the Rotifex SQLite database

ReAct Loop

User Input
|
v
LLM (receives task + tool definitions)
|
+-- Tool call requested?
| |
| +-- Execute tool
| +-- Append result to conversation
| +-- Loop back to LLM
|
+-- Final answer -> return output + all steps to caller

Agent Step Types

TypeDescription
thinkingLLM reasoning text before invoking a tool
tool_callName and arguments of the tool being called
tool_resultRaw output from the tool execution
final_answerThe LLM's conclusive response