Everything you need to know to set up channels and tools on the Vindex Ai Gateway.

System Guide

Everything you need to know to set up channels and tools on the Vindex Ai Gateway.

Quick Start

  1. Create a channel: Go to Channels and click New Channel. Give it a name, write a system prompt that defines your AI's personality, choose a model, and save.
  2. Copy your API key: After saving, you'll see your channel's API key on the channel detail page. This key authenticates all chat requests from your website.
  3. Enable web crawling (optional): Add your site's URL in the Website URL field. The AI will automatically read your pages and sitemap to answer questions from live content — no extra setup needed.
  4. Enable contact lead capture (optional): Turn on the Contact Tool in the channel's settings to let the chatbot collect visitor details (name, email, message, etc.) conversationally and send them to you by email.
  5. Add API tools (optional): Tools let the AI call external APIs during a conversation — e.g. look up a product price or check an order status. Go to your channel's API Tools tab to add them.
  6. Integrate the chat API: Send a
    text
    POST /api/chat
    request with your API key and a user message. See the API Reference for the full reference.

Channel Fields {#channel-fields}

Each channel represents one AI chatbot deployment. These are the fields you configure when creating or editing a channel.
  • Channel Name: A friendly label for your own reference. Not shown to end users. Example: Acme Corp Support Bot.
  • Website URL: The public URL of your website (e.g.
    text
    https://yoursite.com
    ). When set, the AI gains two built-in tools: a web crawler and a sitemap reader.
  • Model: The AI model that powers this channel's conversations. Default is
    text
    llama-3.3-70b-versatile
    .
  • System Prompt (Required): The core instruction that shapes the AI's personality, tone, and behaviour.
  • Knowledge Base: Additional context appended to the system prompt. Supports plain text or Markdown.
  • Rate Limit — Per Minute: Maximum number of API requests this channel will accept in any 60-second window (1–1000).
  • Rate Limit — Per Day: Maximum number of API requests this channel will accept in a 24-hour period (1–100,000).
  • Active: When off, the channel rejects all incoming API requests with a 503 response.

API Key & Slug

  • API Key: A secret token that your website sends with every chat request in the
    text
    X-API-Key
    header. Keep it private.
  • Slug: A URL-safe identifier for the channel, auto-generated from the name.

What are Tools?

Tools (also called function calling) let the AI reach out to external data sources during a conversation to fetch real-time information.
  • Built-in web tools: Enabled automatically when you set a Website URL. The AI can read your site's pages and sitemap.
  • API tools: Custom integrations you configure to connect the AI to your own APIs.

Example flow

  1. User: "What's the price of product #1042?"
  2. AI decides to call your
    text
    get_product_price
    tool with
    text
    product_id = "1042"
  3. Gateway calls your API:
    text
    GET https://your-api.com/products/1042
  4. AI receives the response and answers: "Product #1042 costs $29.99."

Built-in Web Tools

  • list_site_pages (Sitemap Reader): Fetches and parses your site's
    text
    /sitemap.xml
    to build a list of all available pages. Result are cached for 12 hours.
  • fetch_page_content (Web Crawler): Fetches the content of a specific page on your site, strips away navigation, and passes the clean text to the AI. Results are cached for 2 hours.

Contact Lead Tool

Built-in capability that lets your chatbot collect visitor details conversationally.
  • Contact Tool Enabled: Toggle to activate lead capture. AI gains a
    text
    send_contact_lead
    tool.
  • Notification Email: Where new lead notifications are sent.
  • Fields to Collect: A list of field names the AI will ask for (e.g., name, email, phone_number, message).

Autonomous Learning

The Knowledge Flywheel automatically identifies gaps in your AI's knowledge and synthesis failures.
  • Autonomous Learning Enabled: Toggle in Site Settings to activate the flywheel.
  • Learning Pool: A dedicated dashboard where identified knowledge gaps appear for review.
  • Approval Flow: Review AI-drafted knowledge entries, refine them, and click Approve to instantly add them to your site's intelligence.
  • Effectiveness Tracking: The system monitors how well approved entries perform in real conversations, highlighting entries that may need further refinement.

API Tool Fields

  • Function Name (Required): Internal identifier (lowercase with underscores).
  • Description (Required): Plain-English explanation of what the tool does.
  • Method: HTTP method (
    text
    GET
    ,
    text
    POST
    ,
    text
    PUT
    ,
    text
    PATCH
    , or
    text
    DELETE
    ).
  • URL (Required): Full URL of the external API endpoint.
  • Response Path: Dot-notation path to extract a value from the JSON response.
  • Response Limit: Max characters from response passed to AI (100–5,000).
  • Cache Duration: How long to cache responses (in seconds).
  • Request Headers: Custom HTTP headers for authentication.
  • Parameters: Inputs the AI will pass to your API (name, type, description, required).
  • Requires Confirmation: Toggle this for tools that change data (Write actions).
  • Active: Toggle to enable/disable the tool.

Authenticating with External APIs

When connecting agents to internal systems (like school or hospital management software), you can securely authenticate the Gateway's requests to your server.

Secure Headers

To authenticate your tool calls:
  1. Go to the API Tools tab of your channel.
  2. In the Headers section, add your API credentials.
  3. Example for a Bearer Token:
    • Header Name:
      text
      Authorization
    • Header Value:
      text
      Bearer your_secret_internal_token

Why it is Secure

  • Server-Side Injection: Vindex Ai stores these headers on its backend. When the tool is called, the Gateway injects the header into the outgoing request to your API.
  • End-User Isolation: The person chatting with the AI never sees these headers. They are never sent to the user's browser or device.
  • Human-in-the-Loop: Use the Requires Confirmation toggle for sensitive actions. This ensures that even if an agent proposes a change to an authenticated system, it won't execute until you or your user manually approves it.

Tips & Best Practices

  • System prompt quality matters most. Spend time on it.
  • Knowledge base vs system prompt. Put behaviour in prompt, facts in knowledge base.
  • Tool descriptions are critical. The AI decides when to call a tool based on its description.
  • Add your Website URL for free web crawling.
  • Make sure your site has a sitemap.
  • Start with no API tools. Get the conversation right first.
  • Use the contact tool for lead capture.
  • Use rate limits to protect against traffic spikes.