Pilares Estratégicos
Quatro eixos que guiaram todas as entregas do trimestre.
Arquitetura Multi-Agent
Refatoração de agente único (336 linhas de prompt, 24 tools) para 10 agentes especializados com orquestrador inteligente. Redução de ~70% em tokens por turno.
Integração Multi-Canal
Framework de messaging extensível com 6 adaptadores. Adicionar novo canal leva ~2h vs ~16h antes. Suporte a Slack, WhatsApp, Telegram, WebChat e SSE Streaming.
Segurança (JWT)
Autenticação JWT em todos os canais (5 fases). Contexto de usuário (roles, email, empresa) propagado para tools e agentes. Security Audit completo.
Experiência do Usuário
Generative UI com cards visuais de produtos e guias. Whitelabel com detecção automática de domínio. Streaming SSE com feedback de tool calls em tempo real.
Evolução da Arquitetura
De bot Slack monolítico a plataforma multi-agente completa em um trimestre.
graph LR
subgraph "v1.0 — Dez/2025"
A1["1 Bot Slack\n1 Agente\n24 Tools\n336 linhas prompt"]
end
subgraph "v2.0 — Jan/2026"
A2["Unified Bot\n6 Canais\n1 Agente\nMessaging Framework"]
end
subgraph "v2.3 — Fev/2026"
A3["+ JWT Auth\n+ OpenWebUI\n+ API Client\n+ SendGrid"]
end
subgraph "v2.5 — Mar/2026"
A4["+ Whitelabel\n+ Temporal Logic\n+ Metadata"]
end
subgraph "v3.0 — Mar/2026"
A5["Multi-Agent\n10 Agentes\n25 Tools\nFeature Flags\nMemory v2\nGenerative UI"]
end
subgraph "v3.1 — Abr/2026"
A6["+ Custom Tour\n+ Itinerary\n+ Perf Tuning\n+ Salesforce"]
end
A1 --> A2 --> A3 --> A4 --> A5 --> A6
style A1 fill:#ff6b6b,color:#fff
style A2 fill:#ff922b,color:#fff
style A3 fill:#fcc419,color:#333
style A4 fill:#94d82d,color:#333
style A5 fill:#51cf66,color:#fff
style A6 fill:#4263eb,color:#fff
Timeline de Releases
31 releases entregues em 3 meses.
Janeiro 2026
Multi-Platform Messaging Framework
Refatoração completa: unified_bot.py, AdapterFactory, 6 adaptadores, webhook unificado.
Email, Booking e Avaliação
Gmail API OAuth 2.0, MailerSend, tools de booking para agências, evaluation tests.
SSE Streaming, Search Agent e Telegram
Server-Sent Events com feedback em tempo real, Research Agent com Google Search, adaptador Telegram.
Fevereiro 2026
JWT Authentication e OpenWebUI
Autenticação JWT em 5 fases, OpenWebUI integration, SendGrid, IFriendAPIClient, CORS regex.
Refatoração de Tools e CORS
Remoção de wrappers, renomeação padronizada, middleware CORS com regex.
Março 2026
Whitelabel e Lógica Temporal
Detecção automática de whitelabel via Origin/Referer, substituição de URLs, lógica temporal.
Arquitetura Multi-Agent
10 agentes especializados, AgentBuilder, Feature Flags, CloudSQL Memory v2, Generative UI, anti-flood guardrails. A maior entrega do trimestre.
Abril 2026
Estabilização, Discovery e Itinerary
Discovery Agent com recomendação inteligente, Experience/Guide Cards com fotos, Itinerary Agent textual, 11 patches.
Custom Tour Agent, Performance e Feature Flags
Qualificação de tours personalizados, feature flag ENABLE_ITINERARY (JWT role-based), otimização de performance, plano Salesforce.
Arquitetura Multi-Agent (v3.1.0)
Orquestrador inteligente com 10 agentes especializados e 25+ tools.
graph TB
ROOT["root_agent\n(Orquestrador)"]
ROOT -->|transfer| DISC["discovery_agent\nBusca de Produtos\n6 tools"]
ROOT -->|transfer| ITIN["itinerary_agent\nRoteiros Multi-Destino\n5 tools"]
ROOT -->|transfer| QUOT["quote_agent\nCotação e Preços\n4 tools"]
ROOT -->|transfer| BOOK["booking_agent\nReservas\n8 tools"]
ROOT -->|transfer| PAY["payment_agent\nPagamentos\n3 tools"]
ROOT -->|transfer| UTIL["utils_agent\nEmail e CSV\n2 tools"]
ROOT -->|transfer| SUPP["support_agent\nAtendimento Humano\n1 tool"]
ROOT -->|transfer| CTOUR["custom_tour_agent\nTours Personalizados\n2 tools"]
ROOT -.->|AgentTool| RES["research_agent\nGoogle Search\n1 tool"]
ROOT -.->|AgentTool| FAQ["faq_agent\nFAQ iFriend\n0 tools"]
style ROOT fill:#4263eb,color:#fff,stroke-width:2px
style DISC fill:#51cf66,color:#fff
style ITIN fill:#51cf66,color:#fff
style QUOT fill:#fcc419,color:#333
style BOOK fill:#ff922b,color:#fff
style PAY fill:#ff6b6b,color:#fff
style UTIL fill:#845ef7,color:#fff
style SUPP fill:#20c997,color:#fff
style CTOUR fill:#f06595,color:#fff
style RES fill:#868e96,color:#fff
style FAQ fill:#868e96,color:#fff
Arquitetura Completa — Cloud Run
graph TB
subgraph Canais["Canais de Entrada"]
WA["WhatsApp\nEvolution API"]
WA2["WhatsApp\nOfficial Meta"]
SL["Slack"]
TG["Telegram"]
WC["WebChat Widget"]
SSE_C["SSE Streaming"]
end
subgraph CR["Cloud Run — unified_bot.py"]
WEBHOOK["/webhook/*"]
WEBCHAT_EP["/webchat/message"]
SSE_EP["/sse/chat + /sse/stream"]
WA & WA2 & SL & TG --> WEBHOOK
WC --> WEBCHAT_EP
SSE_C --> SSE_EP
AF["AdapterFactory"]
WEBHOOK --> AF
AF --> CP["ConversationProcessor"]
WEBCHAT_EP --> CP
SSE_EP --> SM["StreamManager"]
SM --> CP
end
subgraph ADK["Google ADK Runner"]
CP --> RUNNER["Runner"]
RUNNER --> ROOTAG["root_agent"]
ROOTAG --> AGENTS["10 sub-agents\n25 tools"]
end
subgraph Infra["Infraestrutura"]
RUNNER --> SESS[("CloudSQL\nSessions")]
RUNNER --> MEM[("CloudSQL\nMemory v2")]
RUNNER --> REDIS[("Redis\nCache + JWT")]
end
subgraph External["Serviços Externos"]
AGENTS --> API["iFriend API"]
AGENTS --> GS["Google Search"]
AGENTS --> SGR["SendGrid"]
end
style ROOTAG fill:#4263eb,color:#fff
style RUNNER fill:#4263eb,color:#fff
style CR fill:#eef2ff
style ADK fill:#e0e7ff
SSE Streaming — Experiência em Tempo Real
Feedback progressivo de tool calls e text chunks via Server-Sent Events.
sequenceDiagram
participant U as Usuário (Browser)
participant S as Cloud Run (SSE)
participant A as Agente IA
participant T as Tool (ex: busca)
U->>S: POST /sse/chat
S-->>U: { stream_id }
U->>S: GET /sse/stream/{id} (EventSource)
S->>A: run_async()
A->>T: busca_produtos()
S-->>U: event: tool_call_start 🔍
T-->>A: resultados
S-->>U: event: tool_call_complete ✅
A-->>S: texto em chunks
S-->>U: event: text_chunk (1)
S-->>U: event: text_chunk (2)
S-->>U: event: complete 🏁
Feature Flags — Configurabilidade por Cliente
Composição dinâmica de agentes e funcionalidades sem alterar código.
graph TD
FF["Feature Flags Engine"]
FF --> EB["ENABLE_BOOKING\n(default: true)"]
FF --> EP["ENABLE_PAYMENT\n(default: true)"]
FF --> EM["ENABLE_MEMORY\n(default: true)"]
FF --> ECT["ENABLE_CUSTOM_TOUR\n(default: true)"]
FF --> EI["ENABLE_ITINERARY\n(JWT role-based)"]
EB --> BOOK["booking_agent"]
EP --> PAY["payment_agent"]
EM --> MEMAG["Memory v2\n+ PreloadMemoryTool"]
ECT --> CT["custom_tour_agent"]
EI --> IT["itinerary_agent"]
EP -.->|requer| EB
style FF fill:#4263eb,color:#fff
Cenários de Configuração
| Cenário | Agents | Tools | Uso |
|---|---|---|---|
| Completo | 8 | 31 | Full B2C |
| Sem payment | 7 | 28 | Reserva offline |
| Sem booking | 6 | 20 | Orçamento (Whitelabel) |
| Mínimo | 5 | 18 | Vitrine |
Economia de Tokens
A arquitetura multi-agent com feature flags reduz drasticamente o uso de tokens por turno.
Métricas Detalhadas
Números que refletem a escala e qualidade das entregas.
Código
Qualidade
Plataforma
Cobertura de Testes por Categoria
Canais de Atendimento
6 canais suportados, com arquitetura pronta para novos.
Stack Tecnológico
Tecnologias que sustentam a plataforma.
Próximos Passos — Q2 2026
Iniciativas planejadas para o próximo trimestre.
Salesforce Integration
Einstein Bot ↔ Cloud Run via Apex Action. Plano detalhado já disponível.
Usage Tracking
Métricas de uso por cliente, canal e agente para analytics e billing.
Whitelabel v2
Personalização de persona, idioma e catálogo por tenant.