Skip to main content

ReAct (Reasoning & Acting)

High levelReAct block diagram

Introduction

The ReAct reasoning engine powers the ai12z platform’s advanced AI assistant capabilities. It orchestrates integrations, tools, and data sources to provide accurate, context-aware answers and perform multi-step tasks. ReAct can connect to many sources (CMS, CRM, APIs, documents, and more) and plans the best sequence of actions to satisfy user requests.

By default, Answer AI (our Retrieval-Augmented Generation or RAG engine) is the fallback integration, ensuring that user queries are always answered with relevant, organization-specific information.


ReAct Agentic Workflow

Core Steps

  1. User Query: A user asks a question or submits a request.

  2. ReAct Planning: The LLM (ReAct) reviews the available integrations, tools, forms, and conversation context to devise a plan.

  3. Tool & Integration Calls: ReAct may:

    • Call a single integration (e.g., database, external API, document retrieval)
    • Sequence several tools together (e.g., fetch data, compare results, escalate to a live agent)
    • Fall back to Answer AI (RAG) when no other integration provides an answer
  4. Context-Aware Response: The answer is constructed using both retrieved information and ReAct’s reasoning, then streamed or delivered to the user.


RAG / Answer AI Integration

Answer AI (RAG) is the default engine ReAct calls for knowledge retrieval when other integrations can’t provide an answer. Answer AI queries the vector database and always grounds its answers in your own data—never in general LLM knowledge. Guardrails, context, and compliance rules are strictly enforced by the system prompt.

  • Direct Streaming: By default, Answer AI streams its results directly to the user for maximum speed.
  • Post-Processing Mode: When additional reasoning is needed (e.g., product comparisons, combining multiple sources), ReAct sets a flag to prevent streaming. Instead, Answer AI returns its result for further processing before the final answer is sent.

Product Comparison Workflow

When comparing multiple products or items:

  • ReAct sets requiresReasoning=true
  • It makes parallel calls to Answer AI for each product, each with its own vector query
  • All results are aggregated by ReAct, which then performs the reasoning or comparison logic
  • This design enables fast, accurate multi-item comparisons

When requiresReasoning=false, Answer AI streams output directly to the user without extra delay.


Detailed ReAct block diagram

Personalization

ReAct can incorporate personalization by leveraging CRM, CMS, DXP, CDP, geolocation, and other user context (e.g., cookies). This enables more relevant responses, tailored recommendations, and adaptive workflows.


System Prompt

When you create an Agent, ai12z automatically generates a system prompt. This prompt defines the AI’s behavior, tone, guardrails, and instructions for using available integrations and tools. Always provide:

  • Organization name
  • Organization URL
  • Agent’s purpose

Recommended tone: Friendly, professional, concise, and clear.

Prompt management: Every update is versioned in history. Use “Recreate Prompt” in card properties to regenerate as needed.


Extending ReAct

  • Drag & Drop Form & CTA Builder: Easily create custom forms and call-to-action flows
  • Integrations: Connect to a broad set of APIs and platforms (JSON REST, GraphQL, ERP, ServiceNow, Google Search, scheduling, and more)
  • MCP (Model Context Protocol): Unified, LLM-friendly integration for business systems, including custom tools and workflows

Summary

The ReAct reasoning engine brings together planning, multi-step actions, robust integrations, and RAG-powered knowledge retrieval to create a next-generation AI assistant for any enterprise use case.