Agent System
How Ragnerock's AI agents reason, use tools, and produce artifacts.
Ragnerock provides a general-purpose agentic AI framework with specific optimizations for data processing and data analysis. AI agents power two core capabilities:
- The Research Agent in notebooks: an interactive assistant that searches your data, analyzes results, generates visualizations, and writes code
- Operators in workflows: automated agents that process data at scale with strongly typed outputs
Both share the same underlying agent infrastructure, tool system, and provider support.
How Agents Work
When you ask the Research Agent a question or run an operator against your data, the agent follows an iterative reasoning loop:
┌─────────────────────────────┐
│ Observation │
│ (your request + tools) │
└──────────────┬──────────────┘
│
▼
┌─────────────────────────────┐
│ LLM Reasoning │
│ "What should I do next?" │
└──────────────┬──────────────┘
│
┌────────┴────────┐
│ │
▼ ▼
┌────────────┐ ┌─────────────┐
│ Tool Call │ │ Response │
└─────┬──────┘ └─────────────┘
│ ▲
▼ │
┌────────────┐ │
│ Execute │ │
│ Tool │ │
└─────┬──────┘ │
│ │
▼ │
┌────────────┐ │
│ Result │ │
│ informs ├──────────┘
│ next step │
└────────────┘
- The agent examines your request along with the available tools.
- It reasons about what action to take, either calling a tool or responding with text.
- If it calls a tool, the result informs the next reasoning step. The loop continues until the agent has gathered enough information to answer your question.
- When the agent responds, all artifacts accumulated during the turn (DataFrames, citations, visualizations, search results) are delivered alongside the text response.
Most queries complete in 2-5 steps. The loop is bounded to prevent runaway execution.
Tools
The Research Agent has access to a set of specialized tools for working with your data:
| Tool | Purpose |
|---|---|
| Search | Semantic and keyword search across your data library |
| Cite | Create citations to specific passages in source documents |
| Read | Page-by-page reading of individual documents |
| Code | Generate Python code for data analysis |
| Find Document | Look up documents by name |
| Document Properties | Retrieve metadata and annotations for a document |
| List Operators | Show available operators and their schemas |
| Query | Execute SQL queries against documents and annotations |
| Analyze | Perform DataFrame analysis: statistics, plots, transformations |
Tools can produce artifacts, rich interactive objects that appear in the notebook UI alongside the agent’s text response. See AI Research Agent for a complete guide to the agent’s capabilities and how to use them effectively.
Artifacts
When the agent works through a multi-step query, each tool call can produce artifacts. These artifacts are distinct from the agent’s text response:
- Text responses appear as the agent’s message, a synthesized answer to your question
- Artifacts appear as interactive objects you can work with directly:
- Citations: Click to navigate to the exact passage in the source document
- DataFrames: Interactive tables you can sort, filter, and import into code cells or your JupyterLab environment
- Visualizations: Charts and plots generated from data analysis
- Search results: An overview of what the agent found across your data, with relevance scores
Artifacts accumulate across all tool calls within a single turn. This enables multi-step research workflows where each step builds on previous results.
Example: Multi-Step Research
- You ask: “What do Apple’s recent filings say about services revenue?”
- The agent searches your documents, finding relevant passages (produces search result artifacts)
- The agent reads the results and decides to cite specific passages
- The agent creates citation artifacts linking to the exact document, page, and excerpt
- The agent composes a text response with all accumulated artifacts rendered in the UI
Bring Your Own AI
The agent system supports Ragnerock’s Bring Your Own AI feature. You can power all agent interactions (both the Research Agent and workflow operators) with your choice of AI provider:
- OpenAI: GPT-4o and compatible models
- Anthropic: Claude models
- Google: Gemini models
- xAI: Grok models
Switching providers is seamless. The same tools, artifacts, and capabilities work identically regardless of which provider you choose. See Provider Routing for details on how Ragnerock secures and manages provider configurations.
Next Steps
- AI Research Agent: Complete guide to the Research Agent’s capabilities
- Operators: Define automated agents for data processing
- Notebooks: The conversational interface where agents work
- Provider Routing: Security and routing for AI providers