AI Answers From Live Web Sources

Contributors

Ferris Kleier
Software Developer
Estimated Implementation Time
30 minutes
Key Libraries Used
  • @operaide/ai
  • @operaide/aktor
  • zod
LLM Providers & Models
  • Azure GPT-4o-mini
  • Configurable via settings
External Services
  • Jina AI
TAGS
Conversational AI
Web Search

Introduction

Ask a question, get an up-to-date answer backed by live web sources — with citations. The AI searches autonomously, refines its approach when needed, and delivers grounded responses your team can trust. Works for recent events, market data, competitor research, or any topic where freshness matters.

Business Impact

Challenge

Employees and customers need current, factual answers that go beyond what a static knowledge base or pre-trained model can provide.

Solution

An AI chat searches the web in real time, retrieves relevant results, and synthesizes answers with source citations.

Outcome

Up-to-date, grounded responses without manual research — the AI handles search strategy and synthesis autonomously.

What It Does

  • Conversational Web Search — Ask questions in a chat interface and get answers backed by live web sources. The AI decides what to search for and how to interpret the results — no manual query crafting required.
  • Multi-Step Research — For complex questions, the AI searches multiple times, reviews what it finds, and refines its approach before delivering a final answer. It handles multi-part questions just as well as simple lookups.
  • Always Up to Date — Responses reflect the latest information available on the web. The AI knows today's date and handles queries about recent events, deadlines, or time-sensitive topics correctly.
  • Customizable Without Code — Adjust the AI's personality, search depth, and language model through the Operaide UI. Non-technical team members can fine-tune behavior without developer involvement.

How It Works

  • Chat Reaktor RegistrationregisterChatReaktorDefinition creates a chat-optimized endpoint. Messages arrive as a conversation history, and the Reaktor returns the AI's response — the framework handles the chat protocol automatically.
  • Web Search as a ToolaktorToTool wraps the built-in aktorWebsearch into an AI-callable tool with a Zod-validated parameter schema. The AI only sees the query parameter; the search result limit is injected as a dependency — invisible to the AI but configurable by operators.
  • Multi-Step Tool OrchestrationaktorAICall is configured with max_steps: 5, allowing the AI to call tools multiple times per turn. It can search, evaluate results, decide they're insufficient, and search again with a refined query before generating a final response.
  • Template-Based System PromptaktorCompletePrompt fills {{dateTime}} placeholders at runtime using aktorGetDateTime. The system prompt itself is exposed as an aktorSetting, so it can be customized through the Operaide UI without touching code.
  • Composable Toolset PatternaktorToolSet wraps the web search tool into a toolbox passed to aktorAICall. This same pattern scales to multiple tools — additional capabilities can be added to the toolset without changing the orchestration logic.

Reaktor Architecture

The Web Search Chat is a single Chat Reaktor with a clean, linear composition. At startup, aktorGetDateTime captures the current time. The system prompt template is completed via aktorCompletePrompt, injecting the datetime. aktorWebsearch is wrapped as an AI tool via aktorToTool with limit injected as a dependency, then grouped into a toolset. aktorAICall receives the patched messages (user history + system prompt), the toolset, and max_steps: 5 — giving the AI up to five reasoning loops. The framework handles the tool-call cycle: the AI requests a search, aktorWebsearch executes it via Jina AI, results flow back to the AI, and the loop continues until the AI is satisfied or the step limit is reached.

Simple Web Search Reaktor Architecture
Why Operaide

Ready to Ship AI

That Works?

See how Operaide helps teams ship reliable AI applications faster. From prototype to production—with complete control and European sovereignty.

More Than Chat. The AI-Native Enterprise

Browse our repository of AI applications built with Operaide. All available in the Operaide platform’s app store as templates for you to get a headstart when implementing your custom AI solutions.