Empfio Docs

AI Agent Overview

How Empfio's AI agent works — conversation flow, industry awareness, and booking logic.

What the agent does

The AI agent is a conversational assistant that handles the full inquiry-to-booking flow:

  1. Greets the customer and identifies what they need
  2. Selects the right service from your configured service menu
  3. Collects contact details — name, email, and optionally phone number
  4. Checks your calendar for available appointment slots via Cal.com
  5. Presents time options as interactive buttons the customer can tap
  6. Books the appointment after explicit customer confirmation
  7. Notifies you via email and the dashboard

The agent never fabricates availability or bookings — every action is backed by a real API call.

Industry templates

The agent adapts its conversation style and questions based on your industry. Each template defines a different set of steps optimised for that business type:

  • Salon (6 steps) — service selection, optional staff preference, booking
  • Trades (11 steps) — problem diagnosis, urgency triage, address collection, booking
  • Generic (6 steps) — works for any appointment-based business

See Industry Templates for the full breakdown.

How it's built

The agent runs as a separate microservice using LangGraph, a framework for building stateful AI agents. Key architecture decisions:

  • Step-aware prompting — only the current step's instructions are injected into the prompt (~300-500 characters), not all steps at once. This keeps the context window small and responses focused.
  • Deterministic step advancement — the agent advances to the next step based on tool calls (e.g. calling update_lead_status with a name), not based on what the LLM writes in text. This prevents skipping steps.
  • Tool calling — the agent uses 7 shared tools to interact with the backend (create leads, check slots, book appointments). See Agent Tools.
  • State persistence — conversation state is stored in PostgreSQL per conversation, so the agent remembers context across messages.

Supported languages

The agent converses in the language the customer writes in. It automatically detects and matches the customer's language — if a customer writes in German, the agent replies in German. If they switch to English mid-conversation, the agent follows.

The dashboard language is set separately in your account settings.

Supported AI models

The agent supports multiple LLM providers. The default is OpenAI GPT-4o, but you can also use:

  • Anthropic Claude (Claude Sonnet or Opus)
  • Groq (for faster inference)
  • Ollama (for self-hosted models)

The model can be configured per organization.

On this page