# Core Concepts (Reference: https://docs.iqra.bot/intro/concepts) To build on Iqra AI, you need to understand the relationship between the "Persona" (Agent) and the "Logic" (Script), as well as the building blocks available to you. Agents vs. Scripts [#agents-vs-scripts] **Separating Personality from Logic** Iqra AI decouples the "Who" from the "What." 1. **The Agent (The Persona):** Defines the Voice, Tone, Language, and Interruption behavior. 2. **The Script (The Logic):** A visual graph that defines the capabilities, tools, and conversation flow. *Benefit:* You can have one "Sales Script" used by 50 different Agents (with different voices/accents) simultaneously. Script Components [#script-components] The Script is more than just a conversation tree; it is a full orchestration map. } title="Variables (State)" href="/build/script/variables"> **Memory.** Store data (e.g., `user_name`, `booking_count`) during the conversation. * **Visible:** Data the AI can see and use. * **Hidden:** Secure flags used for internal logic only. } title="FlowApps (Plugins)" href="/build/script/flowapps"> **Integrations.** Pre-built connections to external apps (Cal.com, HubSpot). Unlike generic API nodes, these provide a rich UI with dynamic dropdowns and validation. } title="Action Flows" href="/build/script/action-flows"> **Logic Engine.** A group of nodes that execute deterministic logic. When the AI enters an Action Flow, it follows a strict path (If/Else, Loops) until completion. } title="Secure Sessions" href="/build/script/secure-sessions"> **Security.** A "Clean Room" mode where the AI is muted. The system takes control to collect PII/PCI data (Credit Cards, SSNs) via DTMF/Voice, ensuring the LLM never sees the secrets. } title="System Capabilities" href="/build/script/nodes"> **Native Tools.** Built-in platform capabilities available in the graph: * **Telephony:** Get DTMF Input, Transfer Call, End Call. * **Messaging:** Send SMS. * **Context:** Retrieve Business Data (Products/Services). * **Control:** Change Language, Go To Node. Native Multi-Language [#native-multi-language] **Localization over Translation** Iqra AI is built to be Polyglot. We do not rely on fragile real-time translation layers. You define specific prompts, responses, and logic for each language (e.g., English & Arabic) within the same agent. Whenever you see the **Globe/Language Icon** next to an input field (like "Prompt" or "AI Response"), it means you must provide content for **every language** enabled in your Business Settings. Latency & Regions [#latency--regions] **Mastering the Speed of Light** Voice AI requires sub-second responses. To achieve this, physical distance matters. * **Multi-Region Strategy:** You can route a EU Phone Number to be processed by our EU Servers using AI Providers hosted in the EU. * **Edge Computing:** By processing the "Brain" close to the "User," we eliminate trans-continental lag. Templating (Scriban) [#templating-scriban] **Dynamic Data Injection** We use the **Scriban** engine to inject variables into your prompts, SMS messages, and API payloads. * **Syntax:** `{{ variable_name }}` * **Example:** `Hello {{ contact.first_name }}, your code is {{ session.otp }}.` Look for the **Braces Icon** in input labels. This indicates that the field supports dynamic templating. Typing `{{` in these fields will trigger an autocomplete menu. [Read the Templating Guide](/build/script/templating)