AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | π Star if you like it!
Crawler Summary
Facilit_Bot is a WhatsApp Business automation server using CrewAI multi-agent orchestration. Implements a complete 14-step Portuguese (pt-BR) sales funnel for appliance wrapping and home services with Z-API messaging, Flask REST API + SSE streaming, factory-pattern crew/agent architecture, and thread-safe session management. π€ FacilitBot **WhatsApp Customer Service Automation Bot** powered by a multi-agent AI system --- <p align="center"> <strong>Python 3.12+</strong> | <strong>Flask</strong> | <strong>CrewAI</strong> | <strong>Z-API</strong> | <strong>SSE Real-Time</strong> </p> --- π Table of Contents - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 --- π― Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 10/9/2026.
Freshness
Last checked 10/9/2026
Best For
Facilit_Bot is best for crewai, multi-agent workflows where OpenClaw compatibility matters.
Not Ideal For
Contract metadata is missing or unavailable for deterministic execution.
Evidence Sources Checked
editorial-content, GITHUB REPOS, runtime-metrics, public facts pack
Facilit_Bot is a WhatsApp Business automation server using CrewAI multi-agent orchestration. Implements a complete 14-step Portuguese (pt-BR) sales funnel for appliance wrapping and home services with Z-API messaging, Flask REST API + SSE streaming, factory-pattern crew/agent architecture, and thread-safe session management. π€ FacilitBot **WhatsApp Customer Service Automation Bot** powered by a multi-agent AI system --- <p align="center"> <strong>Python 3.12+</strong> | <strong>Flask</strong> | <strong>CrewAI</strong> | <strong>Z-API</strong> | <strong>SSE Real-Time</strong> </p> --- π Table of Contents - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 --- π―
Public facts
5
Change events
1
Artifacts
0
Freshness
Oct 9, 2026
Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 10/9/2026.
Trust score
Unknown
Compatibility
OpenClaw
Freshness
Oct 9, 2026
Vendor
Vichagas07
Artifacts
0
Benchmarks
0
Last release
Unpublished
Key links, install path, and a quick operational read before the deeper crawl record.
Summary
Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 10/9/2026.
Setup snapshot
Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Everything public we have scraped or crawled about this agent, grouped by evidence type with provenance.
Vendor
Vichagas07
Protocol compatibility
OpenClaw
Adoption signal
1 GitHub stars
Handshake status
UNKNOWN
Crawlable docs
6 indexed pages on the official domain
Merged public release, docs, artifact, benchmark, pricing, and trust refresh events.
Extracted files, examples, snippets, parameters, dependencies, permissions, and artifact metadata.
Extracted files
0
Examples
6
Snippets
0
Languages
python
text
ββββββββββββββββββββββββββββ
β React Native App β
β (Companion Dashboard) β
ββββββββββββββ¬ββββββββββββββ
β SSE Stream + REST API
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Flask Server (port 5000) β
β β
β βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ β
β β /api/v1/* β β /webhook β β /health β β
β β REST API β β Z-API Callback β β Health Check β β
β β + SSE Stream β β β β β β
β ββββββββββ¬βββββββββ ββββββββββ¬ββββββββββ βββββββββββββββββββ β
β β β β
βββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CrewAI Multi-Agent System β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β AtendimentoCrew (Main Flow) β β
β β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β β
β β βOrchestr. β β Quote β β Sales β β Media β β β
β β β Agent βββΆβ Agent βββΆβ Agent βββΆβ Agent β β β
β β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ β
β β InterfaceCrew (Status) β β NotificacaoCrew (Alerts) β β
β β βββββββββββ ββββββββββtext
Step 0: WELCOME β Sends audio greeting + prompts for name βΌ Step 1: COLLECT NAME β Stores customer name + presents 9 product options βΌ Step 2: PRODUCT SELECTION β Routes to product-specific step based on customer choice βΌ Step 3-6: PRODUCT QUOTING β ββ Step 3: Fridge β Type (1-door/duplex) + Rust detection β ββ Step 4: Stove β Burner count (4/5/6) β ββ Step 5: Washing Mach β Type (front/top loader) β ββ Step 6: Microwave β Size (small/medium/large) βΌ Step 6.5: PROMOTION DECISION β Presents promotional offer β Yes/No βΌ Step 6.6: OFFER SELECTION (if accepted) β Two promotional bundles available βΌ Steps 7-9: YES/NO SERVICES β ββ Step 7: Window Film β Step 12 (measurement) β ββ Step 8: Door Film β Step 13 (measurement) β ββ Step 9: Box Sticker β Step 14 (measurement) βΌ Steps 10-11: DIRECT SERVICES β ββ Step 10: Wallpaper β Media gallery + human alert β ββ Step 11: Furniture β Media gallery + human alert βΌ Steps 12-14: MEASUREMENT β Collects size in meters β Media gallery + human alert βΌ Step 99: COMPLETED β Human attendant notified; session archived βΌ RETORNO_1H: FOLLOW-UP (after 60 min inactivity) β Offers restart/new service/inquiry options
text
Facilit_bot/ β βββ facilit_bot/ # Main application package β β β βββ main.py # π Entry point: Flask app factory, startup orchestration β βββ config.py # βοΈ Centralized configuration (env vars, media paths, constants) β βββ webhook_server.py # π₯ Z-API webhook receiver (/webhook, /health) β β β βββ api/ # π REST API layer β β βββ __init__.py # Module exports β β βββ routes.py # All REST endpoints + SSE stream β β βββ schemas.py # Pydantic request/response models β β βββ middleware.py # CORS setup + token authentication decorator β β β βββ agents/ # π€ Individual AI agents (single-responsibility) β β βββ __init__.py # Agent exports β β βββ orchestrator_agent.py # Routes messages based on conversation step β β βββ quote_agent.py # Collects product-specific data (type, size, etc.) β β βββ sales_agent.py # Manages promotions and offer selection β β βββ media_agent.py # Sends text/audio/image/video via Z-API β β βββ alert_agent.py # System notifications + SSE alerts β β βββ retry_agent.py # 1-hour inactivity follow-up monitor β β β βββ crews/ # π₯ CrewAI crew compositions β β βββ __init__.py # Crew factory exports β β βββ atendimento_crew.py # Main 14-step customer service crew β β βββ interface_crew.py # Bot state management + SSE broadcasting β β βββ notificacao_crew.py # Alert + retry notification crew β β β βββ integrations/ # π External service clients β β βββ __init__.py # Client exports β β βββ zapi_client.py # Z-API HTTP client (send text, media) β β β βββ state/ # πΎ Session
bash
git clone https://github.com/your-org/facilit_bot.git cd facilit_bot
bash
# Create virtual environment inside facilit_bot/ directory python -m venv facilit_bot/venv # Activate (Windows PowerShell) facilit_bot\venv\Scripts\Activate.ps1 # Activate (Linux/macOS) source facilit_bot/venv/bin/activate
bash
# Using pip pip install -r facilit_bot/requirements.txt # Or using Poetry cd facilit_bot poetry install
Full documentation captured from public sources, including the complete README when available.
Docs source
GITHUB REPOS
Editorial quality
ready
Facilit_Bot is a WhatsApp Business automation server using CrewAI multi-agent orchestration. Implements a complete 14-step Portuguese (pt-BR) sales funnel for appliance wrapping and home services with Z-API messaging, Flask REST API + SSE streaming, factory-pattern crew/agent architecture, and thread-safe session management. π€ FacilitBot **WhatsApp Customer Service Automation Bot** powered by a multi-agent AI system --- <p align="center"> <strong>Python 3.12+</strong> | <strong>Flask</strong> | <strong>CrewAI</strong> | <strong>Z-API</strong> | <strong>SSE Real-Time</strong> </p> --- π Table of Contents - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 - $1 --- π―
WhatsApp Customer Service Automation Bot powered by a multi-agent AI system
FacilitBot is a production-grade WhatsApp automation server that handles customer service conversations end-to-end. It replaces manual chat operators with an intelligent multi-agent system built on CrewAI, capable of guiding customers through a 14-step sales funnel β from greeting to product quoting, promotional offers, and final handoff to a human attendant.
The system integrates with WhatsApp via the Z-API service, provides a fully-featured REST API for a companion React Native mobile dashboard, and streams real-time updates through Server-Sent Events (SSE). All conversation state is persisted to disk with thread-safe access, making it resilient across restarts and concurrent webhook processing.
Target Audience: Small-to-medium businesses that want to automate WhatsApp customer service, generate quotes for products/services, and provide a seamless bridge between automated bots and human operators.
| Feature | Description |
|---|---|
| Multi-Agent AI | 6 specialized agents (Orchestrator, Quote, Sales, Media, Alert, Retry) working in concert |
| 14-Step Sales Funnel | Full conversation flow from greeting β product selection β quoting β promotion β human handoff |
| WhatsApp Integration | Send/receive text messages, audio, images, and video via Z-API |
| REST API | 10+ authenticated endpoints for a React Native companion app |
| Real-Time SSE | Push events to mobile client on new messages, bot status changes, and alerts |
| Inactivity Monitoring | Automatic 1-hour follow-up messages for abandoned conversations |
| System Notifications | Desktop alerts (via plyer) when human attention is required |
| Thread-Safe Persistence | All session state persisted to JSON with locking for concurrent access |
| Flexible Product Catalog | Supports 9 product categories with configurable options |
| Portuguese (pt-BR) | Native Brazilian Portuguese conversation flow and locale settings |
api/ β crews/ β agents/ β integrations/.env β zero hardcoded secrets ββββββββββββββββββββββββββββ
β React Native App β
β (Companion Dashboard) β
ββββββββββββββ¬ββββββββββββββ
β SSE Stream + REST API
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Flask Server (port 5000) β
β β
β βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ β
β β /api/v1/* β β /webhook β β /health β β
β β REST API β β Z-API Callback β β Health Check β β
β β + SSE Stream β β β β β β
β ββββββββββ¬βββββββββ ββββββββββ¬ββββββββββ βββββββββββββββββββ β
β β β β
βββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CrewAI Multi-Agent System β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β AtendimentoCrew (Main Flow) β β
β β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β β
β β βOrchestr. β β Quote β β Sales β β Media β β β
β β β Agent βββΆβ Agent βββΆβ Agent βββΆβ Agent β β β
β β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ β
β β InterfaceCrew (Status) β β NotificacaoCrew (Alerts) β β
β β βββββββββββ ββββββββββ β β ββββββββββββ ββββββββββββ β β
β β β GUI β β Status β β β β Alert β β Retry β β β
β β β Agent β β Agent β β β β Agent β β Agent β β β
β β βββββββββββ ββββββββββ β β ββββββββββββ ββββββββββββ β β
β ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββ ββββββββββββββββββββββββ
β ZAPI Client β β SessionManager β
β (HTTP β WhatsApp) β β (Thread-Safe JSON) β
ββββββββββββββββββββββββ ββββββββββββββββββββββββ
/webhookAtendimentoCrew.process_message() routes to the correct step handler via OrchestratorAgentQuoteAgent, SalesAgent, and MediaAgent to process data and send repliesMediaAgent calls ZAPIClient to dispatch messages/media through Z-API back to WhatsAppSessionManager after every stepThe bot follows a deterministic 14-step conversation funnel. Each step corresponds to a stage in the customer journey:
Step 0: WELCOME
β Sends audio greeting + prompts for name
βΌ
Step 1: COLLECT NAME
β Stores customer name + presents 9 product options
βΌ
Step 2: PRODUCT SELECTION
β Routes to product-specific step based on customer choice
βΌ
Step 3-6: PRODUCT QUOTING
β ββ Step 3: Fridge β Type (1-door/duplex) + Rust detection
β ββ Step 4: Stove β Burner count (4/5/6)
β ββ Step 5: Washing Mach β Type (front/top loader)
β ββ Step 6: Microwave β Size (small/medium/large)
βΌ
Step 6.5: PROMOTION DECISION
β Presents promotional offer β Yes/No
βΌ
Step 6.6: OFFER SELECTION (if accepted)
β Two promotional bundles available
βΌ
Steps 7-9: YES/NO SERVICES
β ββ Step 7: Window Film β Step 12 (measurement)
β ββ Step 8: Door Film β Step 13 (measurement)
β ββ Step 9: Box Sticker β Step 14 (measurement)
βΌ
Steps 10-11: DIRECT SERVICES
β ββ Step 10: Wallpaper β Media gallery + human alert
β ββ Step 11: Furniture β Media gallery + human alert
βΌ
Steps 12-14: MEASUREMENT
β Collects size in meters β Media gallery + human alert
βΌ
Step 99: COMPLETED
β Human attendant notified; session archived
βΌ
RETORNO_1H: FOLLOW-UP (after 60 min inactivity)
β Offers restart/new service/inquiry options
| Code | Product | |---|---| | 01 | Plotagem Geladeira (Fridge Wrapping) | | 02 | Plotagem FogΓ£o (Stove Wrapping) | | 03 | Plotagem MΓ‘quina de Lavar (Washing Machine Wrapping) | | 04 | Plotagem Micro-ondas (Microwave Wrapping) | | 05 | PelΓcula Janela (Window Film) | | 06 | PelΓcula Porta (Door Film) | | 07 | Adesivo Box (Box Sticker) | | 08 | Papel de Parede (Wallpaper) | | 09 | Plotagem de MΓ³veis (Furniture Wrapping) |
| Technology | Version | Purpose | |---|---|---| | Python | 3.12+ | Core language | | Flask | 3.0+ | Web framework (API + webhooks) | | Flask-CORS | 4.0+ | Cross-origin support for mobile app | | CrewAI | 0.80+ | Multi-agent AI orchestration framework | | Pydantic | 2.0+ | Data validation & API schemas | | Requests | 2.31+ | HTTP client for Z-API integration | | python-dotenv | 1.0+ | Environment variable management | | plyer | 2.1+ | System desktop notifications | | python-dateutil | 2.8+ | Date/time parsing utilities |
| Service | Purpose | |---|---| | Z-API | WhatsApp Business API gateway (message send/receive) | | React Native (companion app) | Mobile dashboard consuming REST API + SSE |
Facilit_bot/
β
βββ facilit_bot/ # Main application package
β β
β βββ main.py # π Entry point: Flask app factory, startup orchestration
β βββ config.py # βοΈ Centralized configuration (env vars, media paths, constants)
β βββ webhook_server.py # π₯ Z-API webhook receiver (/webhook, /health)
β β
β βββ api/ # π REST API layer
β β βββ __init__.py # Module exports
β β βββ routes.py # All REST endpoints + SSE stream
β β βββ schemas.py # Pydantic request/response models
β β βββ middleware.py # CORS setup + token authentication decorator
β β
β βββ agents/ # π€ Individual AI agents (single-responsibility)
β β βββ __init__.py # Agent exports
β β βββ orchestrator_agent.py # Routes messages based on conversation step
β β βββ quote_agent.py # Collects product-specific data (type, size, etc.)
β β βββ sales_agent.py # Manages promotions and offer selection
β β βββ media_agent.py # Sends text/audio/image/video via Z-API
β β βββ alert_agent.py # System notifications + SSE alerts
β β βββ retry_agent.py # 1-hour inactivity follow-up monitor
β β
β βββ crews/ # π₯ CrewAI crew compositions
β β βββ __init__.py # Crew factory exports
β β βββ atendimento_crew.py # Main 14-step customer service crew
β β βββ interface_crew.py # Bot state management + SSE broadcasting
β β βββ notificacao_crew.py # Alert + retry notification crew
β β
β βββ integrations/ # π External service clients
β β βββ __init__.py # Client exports
β β βββ zapi_client.py # Z-API HTTP client (send text, media)
β β
β βββ state/ # πΎ Session persistence
β β βββ __init__.py # Module exports
β β βββ models.py # SessionState dataclass with serialization
β β βββ session_manager.py # Thread-safe JSON file persistence
β β
β βββ .env # π Environment variables (secrets β NOT committed)
β βββ .env.example # π Environment template with documentation
β βββ requirements.txt # π¦ pip dependency list
β βββ pyproject.toml # π¦ Poetry project configuration
β
βββ midia_facilit/ # π¬ Media assets (local only, gitignored)
β βββ audio_boas_vindas.ogg # Welcome audio
β βββ ploategm_uma_porta.ogg # 1-door fridge audio
β βββ plotagem_duplex.ogg # Duplex fridge audio
β βββ tratamento_ferrugem.ogg # Rust treatment audio
β βββ plotagem_fogΓ£o.ogg # Stove audio
β βββ plotagem_mΓ‘quina_lavar.ogg # Washing machine audio
β βββ plotagem_microondas.ogg # Microwave audio
β βββ promocao_*.ogg # Promotional audios (5 files)
β βββ imagem_*.jpeg # Service images (5 files)
β βββ video_facilit*.mp4 # Demo videos (3 files)
β βββ logo_facilit.jpg # Brand logo
β βββ fonts/ # Emoji font assets
β
βββ venv/ # π Python virtual environment (gitignored)
βββ node_modules/ # π¦ Node dependencies (gitignored)
βββ package.json # π¦ Node.js config (expo-splash-screen)
βββ package-lock.json # π Node.js lockfile
βββ .vscode/ # π₯οΈ VS Code workspace settings
βββ .gitignore # π« Git ignore rules
βββ README.md # π This documentation
Before installing FacilitBot, ensure you have:
| Requirement | Version | Notes |
|---|---|---|
| Python | 3.12 - 3.13 | Using match statements and modern type hints |
| pip | 23+ | For dependency installation |
| Z-API Account | β | app.z-api.io β Instance ID + Token required |
| Media Files | β | Audio, images, and videos in midia_facilit/ (gitignored) |
| Git | 2.x+ | For version control |
git clone https://github.com/your-org/facilit_bot.git
cd facilit_bot
# Create virtual environment inside facilit_bot/ directory
python -m venv facilit_bot/venv
# Activate (Windows PowerShell)
facilit_bot\venv\Scripts\Activate.ps1
# Activate (Linux/macOS)
source facilit_bot/venv/bin/activate
# Using pip
pip install -r facilit_bot/requirements.txt
# Or using Poetry
cd facilit_bot
poetry install
# Copy the example file
cp facilit_bot/.env.example facilit_bot/.env
# Edit with your actual values
Fill in the .env file:
# Z-API Credentials (REQUIRED)
ZAPI_INSTANCE_ID=inst-xxxxxxxx
ZAPI_TOKEN=your_zapi_token_here
# Server Settings
FLASK_HOST=0.0.0.0
FLASK_PORT=5000
# Security
BOT_API_TOKEN=facilit-dev-token # Change in production!
ALLOWED_ORIGINS=*
Place your media assets in the midia_facilit/ directory:
midia_facilit/
βββ audio_boas_vindas.ogg
βββ ploategm_uma_porta.ogg
βββ plotagem_duplex.ogg
βββ tratamento_ferrugem.ogg
βββ plotagem_fogΓ£o.ogg
βββ plotagem_mΓ‘quina_lavar.ogg
βββ plotagem_microondas.ogg
βββ promocao_uma_porta.ogg
βββ promocao_duplex.ogg
βββ promocao_fogao.ogg
βββ promocao_maquina_lavar.ogg
βββ promocao_microondas.ogg
βββ imagem_movel.jpeg
βββ imagem_facilit_geladeira.jpeg
βββ imagem_facilit_geladeira2.jpeg
βββ imagem_porta.jpeg
βββ video_facilit.mp4
βββ video_facilit2.mp4
βββ video_facilit3.mp4
βββ logo_facilit.jpg
βββ fonts/NotoEmoji-VariableFont_wght.ttf
Note: Media files are gitignored. The exact filenames must match those referenced in
config.py.
cd facilit_bot
python main.py
Expected output:
============================================================
FACILITBOT - WhatsApp Automation Server
============================================================
Local IP: http://192.168.1.100:5000
Webhook: http://192.168.1.100:5000/webhook
API: http://192.168.1.100:5000/api/v1
SSE Stream: http://192.168.1.100:5000/api/v1/stream
------------------------------------------------------------
React Native .env configuration:
EXPO_PUBLIC_API_URL=http://192.168.1.100:5000/api/v1
EXPO_PUBLIC_BOT_TOKEN=facilit-dev-token
------------------------------------------------------------
Press Ctrl+C to stop the server
All configuration is managed through environment variables loaded from .env.
| Variable | Default | Description |
|---|---|---|
| ZAPI_INSTANCE_ID | instancia_id | Your Z-API instance ID from app.z-api.io |
| ZAPI_TOKEN | token_id | Your Z-API authentication token |
| Variable | Default | Description |
|---|---|---|
| FLASK_HOST | 0.0.0.0 | Bind address (0.0.0.0 = all interfaces) |
| FLASK_PORT | 5000 | Server port |
| Variable | Default | Description |
|---|---|---|
| BOT_API_TOKEN | facilit-dev-token | API authentication token for mobile app |
| ALLOWED_ORIGINS | * | CORS origins (* = development only, restrict in production) |
| Variable | Default | Description |
|---|---|---|
| SESSIONS_FILE | conversas.json | Path to session persistence file |
| MEDIA_DIR | midia_facilit | Directory containing audio/images/videos |
| Variable | Default | Description |
|---|---|---|
| INACTIVITY_TIMEOUT_MINUTES | 60 | Minutes before 1-hour follow-up (commented out in .env.example, hardcoded in config) |
Product options are configured in config.py as a PRODUCT_OPTIONS dictionary. Each product maps a numeric code (string) to a name and conversation step:
PRODUCT_OPTIONS = {
"01": {"name": "Plotagem Geladeira", "step": 3},
"02": {"name": "Plotagem FogΓ£o", "step": 4},
# ... more options
}
The promotional message (PROMOTIONAL_TEXT) and offer options (OFFER_1, OFFER_2) can be customized in config.py.
cd facilit_bot
python main.py
The server starts with:
http://<local-ip>:5000/webhook β Z-API sends incoming messages herehttp://<local-ip>:5000/api/v1/ β Used by the React Native companion apphttp://<local-ip>:5000/api/v1/stream β Real-time event pushhttp://<local-ip>:5000/healthhttp://<your-server-ip>:5000/webhook{
"phone": "5511999999999",
"message": "OlΓ‘, quero plotar minha geladeira"
}
Configure your mobile app's .env:
EXPO_PUBLIC_API_URL=http://<server-ip>:5000/api/v1
EXPO_PUBLIC_BOT_TOKEN=facilit-dev-token
The bot starts inactive. Activate it via the API:
# Activate
curl -X POST http://localhost:5000/api/v1/bot/activate \
-H "X-Bot-Token: facilit-dev-token"
# Deactivate
curl -X POST http://localhost:5000/api/v1/bot/deactivate \
-H "X-Bot-Token: facilit-dev-token"
# Check status
curl http://localhost:5000/api/v1/status \
-H "X-Bot-Token: facilit-dev-token"
During conversation, customers can type "reiniciar" to restart their session from Step 1.
Base URL: http://<host>:5000/api/v1
Authentication: All endpoints require the X-Bot-Token header with the value of BOT_API_TOKEN.
| Method | Endpoint | Description |
|---|---|---|
| GET | /status | Bot status (active, uptime, version) |
| POST | /bot/activate | Activate the bot |
| POST | /bot/deactivate | Deactivate the bot |
| GET | /sessions | List sessions (paginated, filterable) |
| GET | /sessions/:number | Get session details |
| DELETE | /sessions/:number | Delete a session |
| PATCH | /sessions/:number/resolve | Mark session as resolved (step 99) |
| GET | /metrics | System metrics (active/completed counts, messages today) |
| GET | /stream | SSE real-time event stream |
GET /statuscurl http://localhost:5000/api/v1/status \
-H "X-Bot-Token: facilit-dev-token"
Response:
{
"active": true,
"uptime_seconds": 4238,
"version": "1.0.0"
}
GET /sessionscurl "http://localhost:5000/api/v1/sessions?page=1&limit=10&status=active" \
-H "X-Bot-Token: facilit-dev-token"
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | int | 1 | Page number |
| limit | int | 20 (max 50) | Items per page |
| status | string | all | Filter: active, completed, all |
Response:
{
"sessions": [
{
"number": "5511999999999",
"name": "JoΓ£o",
"step": 3,
"last_contact": "2026-06-30T14:30:00",
"status": "active"
}
],
"total": 42,
"page": 1
}
GET /sessions/:number (Session Detail)curl http://localhost:5000/api/v1/sessions/5511999999999 \
-H "X-Bot-Token: facilit-dev-token"
Response:
{
"number": "5511999999999",
"name": "JoΓ£o",
"step": 6.5,
"last_contact": "2026-06-30T14:30:00",
"status": "active",
"geladeira_ok": true,
"fogao_ok": false,
"maquina_ok": false,
"micro_ok": false,
"retorno_apos_1h": false,
"tamanho_item": null
}
PATCH /sessions/:number/resolvecurl -X PATCH http://localhost:5000/api/v1/sessions/5511999999999/resolve \
-H "X-Bot-Token: facilit-dev-token"
Response:
{ "success": true }
DELETE /sessions/:numbercurl -X DELETE http://localhost:5000/api/v1/sessions/5511999999999 \
-H "X-Bot-Token: facilit-dev-token"
Response:
{ "success": true }
GET /metricscurl http://localhost:5000/api/v1/metrics \
-H "X-Bot-Token: facilit-dev-token"
Response:
{
"active_sessions": 15,
"completed_sessions": 128,
"last_message_at": "2026-06-30T14:30:00",
"messages_today": 47
}
All errors follow a consistent format:
{
"error": "Description of the error"
}
| Status Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Missing or invalid X-Bot-Token |
| 404 | Session not found |
| 500 | Internal server error |
The SSE stream at /api/v1/stream pushes real-time events to connected clients (e.g., the React Native companion app). No authentication is required for the SSE connection itself.
// React Native / JavaScript
const eventSource = new EventSource('http://<server>:5000/api/v1/stream');
eventSource.addEventListener('bot_status', (e) => {
const { active } = JSON.parse(e.data);
console.log('Bot status:', active);
});
eventSource.addEventListener('alert', (e) => {
const { name, number } = JSON.parse(e.data);
console.log(`Alert: ${name} (${number}) needs attention!`);
});
| Event Name | Payload | Trigger |
|---|---|---|
| connected | { request_id: string } | Client first connects |
| bot_status | { active: bool } | Bot activated/deactivated |
| new_message | { number: string, name: string, step: int } | New message processed |
| session_update | { number: string, step: int } | Session state changed or deleted |
| alert | { name: string, number: string } | Customer requires human attention |
connected event immediatelyFacilitBot uses CrewAI to orchestrate 6 specialized agents. Each agent has a distinct role, goal, and backstory defined using CrewAI's agent framework.
| Agent | Role | Responsibility | |---|---|---| | OrchestratorAgent | Orquestrador de Atendimento | Analyzes session state + incoming message β determines next step | | QuoteAgent | Agente de CotaΓ§Γ£o | Collects product-specific data (fridge type, stove burners, machine type, microwave size) | | SalesAgent | Agente de Vendas | Presents promotions, handles yes/no decisions, processes offer selection | | MediaAgent | Agente de MΓdia | Executes text/audio/image/video sends via Z-API | | AlertAgent | Agente de Alerta | Triggers system notifications + SSE alerts when human attention required | | RetryAgent | Agente de Retorno | Monitors inactivity; sends 1-hour follow-up messages |
While CrewAI agents are defined with roles/goals/backstories (LLM-ready), the current implementation is fully deterministic β all step routing logic is hardcoded in OrchestratorAgent.determine_next_step() and step handlers in AtendimentoCrew. This ensures:
To enable LLM-powered conversations, add an OpenAI API key and configure the agents' llm parameter:
# In agent create() methods:
Agent(
role="...",
goal="...",
backstory="...",
llm="gpt-4o-mini", # Add this line
verbose=True,
)
create_*_crew() functions enable testable component creationSessionManager with locking.py file has a module-level docstring explaining its responsibilityAdd the product entry to PRODUCT_OPTIONS in config.py:
PRODUCT_OPTIONS = {
# ... existing ...
"10": {"name": "Novo ServiΓ§o", "step": 15},
}
Implement the step handler in atendimento_crew.py's process_message():
elif current_step == 15:
self._handle_new_service(phone, message, state)
Add the route mapping in orchestrator_agent.py's determine_next_step():
step_map = {
# ... existing ...
15: "new_service",
}
Add any new media files to config.py and midia_facilit/
# Run tests (when added)
pytest
# Type checking
mypy facilit_bot/
msg, prefer message)The application uses Python's logging module with DEBUG level by default:
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
datefmt="%Y-%m-%d %H:%M:%S"
)
Werkzeug's HTTP logs are suppressed to WARNING level to reduce noise.
ZAPI_INSTANCE_ID and ZAPI_TOKEN in .envhttp://<server-ip>:5000/webhookX-Bot-Token API call or via companion app)GET /api/v1/statusInterfaceCrew.get_bot_status() returns Truemidia_facilit/facilit_bot/ directorypip install -r requirements.txt to ensure all deps are installedThe code uses sys.path.insert() to add the project root. If import errors persist:
# Install the package in development mode
cd facilit_bot
pip install -e .
SESSIONS_FILE path is writablept_BR.UTF-8. If unavailable, it falls back gracefully.Logs are output to stdout. For persistent logging, redirect:
python main.py > facilit.log 2>&1
This project is proprietary software. All rights reserved by the Facilit Team.
Contributions are welcome! Please follow the development guide and ensure:
Machine endpoints, protocol fit, contract coverage, invocation examples, and guardrails for agent-to-agent use.
Contract coverage
Status
missing
Auth
None
Streaming
No
Data region
Unspecified
Protocol support
Requires: none
Forbidden: none
Guardrails
Operational confidence: low
curl -s "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/snapshot"
curl -s "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/contract"
curl -s "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/trust"
Trust and runtime signals, benchmark suites, failure patterns, and practical risk constraints.
Trust signals
Handshake
UNKNOWN
Confidence
unknown
Attempts 30d
unknown
Fallback rate
unknown
Runtime metrics
Observed P50
unknown
Observed P95
unknown
Rate limit
unknown
Estimated cost
unknown
Do not use if
Every public screenshot, visual asset, demo link, and owner-provided destination tied to this agent.
Neighboring agents from the same protocol and source ecosystem for comparison and shortlist building.
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | π Star if you like it!
AI Agents & MCPs & AI Workflow Automation β’ (~400 MCP servers for AI agents) β’ AI Automation / AI Agent with MCPs β’ AI Workflows & AI Agents β’ MCPs for AI Agents
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
The Frontend for Agents & Generative UI. React + Angular
Contract JSON
{
"contractStatus": "missing",
"authModes": [],
"requires": [],
"forbidden": [],
"supportsMcp": false,
"supportsA2a": false,
"supportsStreaming": false,
"inputSchemaRef": null,
"outputSchemaRef": null,
"dataRegion": null,
"contractUpdatedAt": null,
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Invocation Guide
{
"preferredApi": {
"snapshotUrl": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/snapshot",
"contractUrl": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/contract",
"trustUrl": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/trust"
},
"curlExamples": [
"curl -s \"https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/snapshot\"",
"curl -s \"https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/contract\"",
"curl -s \"https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/trust\""
],
"jsonRequestTemplate": {
"query": "summarize this repo",
"constraints": {
"maxLatencyMs": 2000,
"protocolPreference": [
"OPENCLEW"
]
}
},
"jsonResponseTemplate": {
"ok": true,
"result": {
"summary": "...",
"confidence": 0.9
},
"meta": {
"source": "GITHUB_REPOS",
"generatedAt": "2026-10-09T23:50:22.174Z"
}
},
"retryPolicy": {
"maxAttempts": 3,
"backoffMs": [
500,
1500,
3500
],
"retryableConditions": [
"HTTP_429",
"HTTP_503",
"NETWORK_TIMEOUT"
]
}
}Trust JSON
{
"status": "unavailable",
"handshakeStatus": "UNKNOWN",
"verificationFreshnessHours": null,
"reputationScore": null,
"p95LatencyMs": null,
"successRate30d": null,
"fallbackRate": null,
"attempts30d": null,
"trustUpdatedAt": null,
"trustConfidence": "unknown",
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Capability Matrix
{
"rows": [
{
"key": "OPENCLEW",
"type": "protocol",
"support": "unknown",
"confidenceSource": "profile",
"notes": "Listed on profile"
},
{
"key": "crewai",
"type": "capability",
"support": "supported",
"confidenceSource": "profile",
"notes": "Declared in agent profile metadata"
},
{
"key": "multi-agent",
"type": "capability",
"support": "supported",
"confidenceSource": "profile",
"notes": "Declared in agent profile metadata"
}
],
"flattenedTokens": "protocol:OPENCLEW|unknown|profile capability:crewai|supported|profile capability:multi-agent|supported|profile"
}Facts JSON
[
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Vichagas07",
"href": "https://github.com/ViChagas07/Facilit_Bot",
"sourceUrl": "https://github.com/ViChagas07/Facilit_Bot",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T18:14:39.726Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T18:14:39.726Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1 GitHub stars",
"href": "https://github.com/ViChagas07/Facilit_Bot",
"sourceUrl": "https://github.com/ViChagas07/Facilit_Bot",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T18:14:39.726Z",
"isPublic": true
},
{
"factKey": "docs_crawl",
"category": "integration",
"label": "Crawlable docs",
"value": "6 indexed pages on the official domain",
"href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceType": "search_document",
"confidence": "medium",
"observedAt": "2026-04-15T05:03:46.393Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/crewai-vichagas07-facilit-bot/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
]Change Events JSON
[
{
"eventType": "docs_update",
"title": "Docs refreshed: Sign in to GitHub Β· GitHub",
"description": "Fresh crawlable documentation was indexed for the official domain.",
"href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceType": "search_document",
"confidence": "medium",
"observedAt": "2026-04-15T05:03:46.393Z",
"isPublic": true
}
]Sponsored
Ads related to Facilit_Bot and adjacent AI workflows.