🌱 Plano de Implementação: Agentes de Canal
Objetivo: Implementar 5 novos agentes para gerenciamento completo do ciclo de vida do canal de revenda.
Base conceitual: Ver
📘books & chats/Partes do processo de Plantação.md
📋 Visão Geral
Agentes a Implementar
| # | Agente | Código | Propósito |
|---|---|---|---|
| 1 | Account State Agent | account-state |
Batimento cardíaco do canal - declara estado de cada conta |
| 2 | Onboarding Agent | onboarding |
Engenharia de sobrevivência - primeiros 30-60 dias |
| 3 | Reactivation Agent | reactivation |
Estratégias de recuperação de contas paradas |
| 4 | Qualification Agent | qualification |
Gate de entrada - decide se vale cultivar |
| 5 | Channel Performance Agent | channel-performance |
Aprendizado e evolução de políticas |
Ordem de Implementação (Dependências)
1. Account State Agent (sem dependências - FUNDAÇÃO)
↓
2. Onboarding Agent (depende de Account State)
↓
3. Reactivation Agent (depende de Account State)
↓
4. Qualification Agent (usa estados para feedback)
↓
5. Channel Performance (consome dados de todos)
📐 Estrutura Padrão de Cada Agente
Seguindo o padrão existente (nba, scia, pricing):
c-suite/agents/{agent-name}/
├── .env.example # Variáveis de ambiente
├── Dockerfile # Container definition
├── README.md # Documentação do agente
├── docker-stack.yml # Deploy Swarm
├── deploy.sh # Script de deploy
├── requirements.txt # Dependências Python
├── main.py # Entry point FastAPI
├── app/
│ ├── __init__.py
│ ├── models.py # Pydantic models
│ ├── database.py # Conexão DB
│ ├── repository.py # Queries SQL
│ ├── heuristics.py # Lógica de decisão
│ └── settings.py # Configurações
├── routes/
│ ├── __init__.py
│ ├── core.py # Health, info endpoints
│ └── {agent}.py # Endpoints específicos
├── policies/
│ └── {agent}.py # Definições de policy
└── sql/
├── schema.sql # DDL tables
└── views.sql # Views de monitoramento
🔗 Integração com Seller Cockpit e Outros Clientes
Endpoints Padronizados
Todos os agentes seguem o mesmo padrão de API:
| Endpoint | Método | Descrição |
|---|---|---|
/ |
GET | Info do serviço |
/health |
GET | Health check |
/v1/{agent}/evaluate |
POST | Avaliar situação |
/v1/{agent}/decide |
POST | Tomar decisão |
/v1/{agent}/outcome |
POST | Registrar resultado |
/v1/{agent}/history/{entity_id} |
GET | Histórico de decisões |
Consumo pelo Seller Cockpit
// seller-cockpit/backend/src/services/{agent}.service.js
const {agent}Service = {
evaluate: (data) => axios.post(`${BASE_URL}/v1/{agent}/evaluate`, data),
decide: (data) => axios.post(`${BASE_URL}/v1/{agent}/decide`, data),
getHistory: (id) => axios.get(`${BASE_URL}/v1/{agent}/history/${id}`)
};
📑 CHECKLISTS DE IMPLEMENTAÇÃO
1️⃣ Account State Agent
Propósito: Declarar o estado atual de cada conta/revenda baseado em dados objetivos.
📍 Localização
c-suite/agents/account-state/
📊 Estados Gerenciados
| Estado | Trigger | Duração Típica |
|---|---|---|
NEW |
Cadastro criado | 0-7 dias |
ACTIVATING |
Primeira compra | 7-60 dias |
ACTIVE |
Segunda compra confirmada | Indefinido |
STALLED |
Sem compra > ciclo esperado × 1.5 | Até ação |
AT_RISK |
Stalled + 2+ contatos falharam | Até ação |
CHURN |
At Risk + tempo sem resposta | Permanente |
✅ Checklist de Implementação
Fase 1: Estrutura Base
- [ ] Criar diretório
c-suite/agents/account-state/ - [ ] Criar
requirements.txt(fastapi, uvicorn, mysql-connector, pydantic) - [ ] Criar
.env.examplecom variáveis necessárias - [ ] Criar
main.pycom FastAPI app - [ ] Criar
app/settings.pypara configuração - [ ] Criar
app/database.pypara conexão MySQL
Fase 2: Schema SQL
- [ ] Criar
sql/schema.sql:
sql CREATE TABLE IF NOT EXISTS channel_account_states ( id BIGINT AUTO_INCREMENT PRIMARY KEY, org_id INT NOT NULL DEFAULT 1, account_id VARCHAR(100) NOT NULL, account_type ENUM('customer', 'reseller', 'lead') NOT NULL, current_state ENUM('NEW','ACTIVATING','ACTIVE','STALLED','AT_RISK','CHURN') NOT NULL, previous_state ENUM('NEW','ACTIVATING','ACTIVE','STALLED','AT_RISK','CHURN'), health_score INT DEFAULT 100, last_order_at DATETIME, last_contact_at DATETIME, expected_cycle_days INT DEFAULT 30, days_since_order INT, failed_contact_attempts INT DEFAULT 0, state_changed_at DATETIME NOT NULL, evaluated_at DATETIME NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY uk_account (org_id, account_id, account_type), INDEX idx_state (current_state), INDEX idx_health (health_score) ); - [ ] Criar
sql/views.sqlcom views de monitoramento - [ ] Executar schema no RDS DEV
Fase 3: Modelos e Lógica
- [ ] Criar
app/models.py: - [ ]
AccountStateEnum- Enum de estados - [ ]
EvaluateRequest- Input para avaliação - [ ]
StateResult- Output com estado + health score - [ ]
StateHistory- Histórico de transições - [ ] Criar
app/repository.py: - [ ]
get_account_state(account_id) - [ ]
update_account_state(account_id, new_state) - [ ]
get_state_history(account_id) - [ ]
get_accounts_by_state(state) - [ ] Criar
app/heuristics.py: - [ ]
calculate_state(account_data)- Regras determinísticas - [ ]
calculate_health_score(account_data)- Score 0-100 - [ ]
should_transition(current, calculated)- Anti-flap
Fase 4: Routes/API
- [ ] Criar
routes/core.py(health, info) - [ ] Criar
routes/state.py: - [ ]
POST /v1/state/evaluate- Avaliar e atualizar estado - [ ]
GET /v1/state/account/{account_id}- Consultar estado - [ ]
GET /v1/state/by-state/{state}- Listar por estado - [ ]
GET /v1/state/history/{account_id}- Histórico - [ ]
GET /v1/state/summary- Dashboard: contagem por estado
Fase 5: Policies
- [ ] Criar
policies/state_transitions.py: - [ ] Regras de transição permitidas
- [ ] Janelas mínimas entre transições (anti-flap)
- [ ] Limites de health score por estado
Fase 6: Docker & Deploy
- [ ] Criar
Dockerfile - [ ] Criar
docker-stack.yml - [ ] Criar
deploy.sh - [ ] Adicionar ao
docker-stack-dev.ymlprincipal - [ ] Deploy em DEV
Fase 7: Integração Seller Cockpit
- [ ] Criar
seller-cockpit/backend/src/services/state.service.js - [ ] Atualizar
aggregator.service.jspara incluir estado - [ ] Criar componente
AccountStateBadge.jsx - [ ] Adicionar badge em
InboxPage.jsx - [ ] Adicionar resumo em
DashboardPage.jsx
Fase 8: Testes & Documentação
- [ ] Criar
README.md - [ ] Testar endpoints via curl/Postman
- [ ] Verificar integração end-to-end
2️⃣ Onboarding Agent
Propósito: Gerenciar os primeiros 30-60 dias de uma nova revenda.
📍 Localização
c-suite/agents/onboarding/
✅ Checklist de Implementação
Fase 1: Estrutura Base
- [ ] Criar diretório
c-suite/agents/onboarding/ - [ ] Criar
requirements.txt - [ ] Criar
.env.example - [ ] Criar
main.py - [ ] Criar
app/settings.py - [ ] Criar
app/database.py
Fase 2: Schema SQL
-
[ ] Criar
sql/schema.sql:
```sql
CREATE TABLE IF NOT EXISTS channel_onboarding_plans (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
org_id INT NOT NULL DEFAULT 1,
account_id VARCHAR(100) NOT NULL,
plan_type ENUM('STANDARD_30', 'STRATEGIC_60', 'LIMITED_14') NOT NULL,
tier ENUM('STRATEGIC', 'OPPORTUNISTIC', 'TRANSACTIONAL', 'LIMITED') NOT NULL,
start_date DATE NOT NULL,
target_end_date DATE NOT NULL,
actual_end_date DATE,
status ENUM('ACTIVE', 'COMPLETED_SUCCESS', 'COMPLETED_FAILED', 'CANCELLED') NOT NULL DEFAULT 'ACTIVE',-- Goals
first_order_target_days INT DEFAULT 7,
first_order_actual_date DATE,
second_order_target_days INT DEFAULT 30,
second_order_actual_date DATE,
activation_target_value DECIMAL(15,2),
activation_actual_value DECIMAL(15,2) DEFAULT 0,-- Suggested Kit
suggested_kit_json JSON,
actual_first_order_json JSON,-- Tracking
cadence_pattern VARCHAR(50) DEFAULT 'DAY1,DAY3,DAY7,DAY14,DAY30',
contacts_scheduled INT DEFAULT 0,
contacts_made INT DEFAULT 0,
onboarding_risk ENUM('LOW', 'MEDIUM', 'HIGH') DEFAULT 'MEDIUM',created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,UNIQUE KEY uk_account (org_id, account_id),
INDEX idx_status (status),
INDEX idx_dates (start_date, target_end_date)
);
CREATE TABLE IF NOT EXISTS channel_onboarding_activities (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
plan_id BIGINT NOT NULL,
activity_type ENUM('WELCOME', 'TRAINING', 'FIRST_ORDER', 'FOLLOW_UP', 'CHECK_IN', 'SECOND_ORDER') NOT NULL,
scheduled_date DATE,
completed_date DATE,
status ENUM('PENDING', 'COMPLETED', 'SKIPPED', 'FAILED') DEFAULT 'PENDING',
notes TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
INDEX idx_plan (plan_id),
INDEX idx_scheduled (scheduled_date, status)
);
```
- [ ] Executar schema no RDS DEV
Fase 3: Modelos e Lógica
- [ ] Criar
app/models.py: - [ ]
OnboardingPlan- Plano completo - [ ]
OnboardingActivity- Atividade individual - [ ]
CreatePlanRequest- Input para criar plano - [ ]
OnboardingProgress- Progresso atual - [ ] Criar
app/repository.py: - [ ]
create_plan(account_id, tier) - [ ]
get_plan(account_id) - [ ]
update_progress(plan_id, activity) - [ ]
get_pending_activities(date) - [ ] Criar
app/heuristics.py: - [ ]
determine_plan_type(account_data)- Qual plano usar - [ ]
suggest_initial_kit(account_data)- Mix ideal - [ ]
calculate_risk(plan)- Risco de falha - [ ]
generate_cadence(plan_type)- Cronograma
Fase 4: Routes/API
- [ ] Criar
routes/core.py - [ ] Criar
routes/onboarding.py: - [ ]
POST /v1/onboarding/create- Criar plano - [ ]
GET /v1/onboarding/plan/{account_id}- Consultar plano - [ ]
POST /v1/onboarding/activity/{plan_id}- Registrar atividade - [ ]
GET /v1/onboarding/pending- Atividades pendentes hoje - [ ]
GET /v1/onboarding/at-risk- Planos em risco - [ ]
GET /v1/onboarding/metrics- Métricas gerais
Fase 5: Integração Account State
- [ ] Consumir Account State Agent para verificar estado
- [ ] Atualizar estado para ACTIVATING quando plano criado
- [ ] Atualizar estado para ACTIVE quando plano concluído com sucesso
Fase 6: Docker & Deploy
- [ ] Criar
Dockerfile - [ ] Criar
docker-stack.yml - [ ] Criar
deploy.sh - [ ] Deploy em DEV
Fase 7: Integração Seller Cockpit
- [ ] Criar
state.service.jsno backend - [ ] Criar componente
OnboardingPanel.jsx - [ ] Criar componente
OnboardingProgress.jsx - [ ] Adicionar seção no
DashboardPage.jsx - [ ] Criar página
OnboardingDetailPage.jsx(opcional)
Fase 8: Testes & Documentação
- [ ] Criar
README.md - [ ] Testar fluxo completo
- [ ] Validar integração com Account State
3️⃣ Reactivation Agent
Propósito: Estratégias controladas para recuperar contas STALLED/AT_RISK.
📍 Localização
c-suite/agents/reactivation/
✅ Checklist de Implementação
Fase 1: Estrutura Base
- [ ] Criar diretório
c-suite/agents/reactivation/ - [ ] Criar arquivos base (requirements, env, main, settings, database)
Fase 2: Schema SQL
-
[ ] Criar
sql/schema.sql:
```sql
CREATE TABLE IF NOT EXISTS channel_reactivation_attempts (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
org_id INT NOT NULL DEFAULT 1,
account_id VARCHAR(100) NOT NULL,
attempt_number INT NOT NULL DEFAULT 1,-- Trigger info
trigger_state ENUM('STALLED', 'AT_RISK') NOT NULL,
trigger_reason VARCHAR(255),
days_inactive INT,
risk_value DECIMAL(15,2),-- Strategy
strategy ENUM('INCENTIVE_DISCOUNT', 'PRODUCT_MIX', 'PERSONAL_CONTACT', 'SPECIAL_CONDITION', 'WAIT') NOT NULL,
strategy_params JSON,
max_discount_allowed DECIMAL(5,2),
suggested_products JSON,-- Execution
status ENUM('PLANNED', 'IN_PROGRESS', 'WON', 'LOST', 'CANCELLED') NOT NULL DEFAULT 'PLANNED',
started_at DATETIME,
completed_at DATETIME,-- Outcome
outcome_type ENUM('REACTIVATED', 'PARTIAL', 'NO_RESPONSE', 'DECLINED', 'CHURNED'),
next_order_at DATE,
next_order_value DECIMAL(15,2),created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,INDEX idx_account (account_id),
INDEX idx_status (status),
INDEX idx_strategy (strategy)
);
```
- [ ] Executar schema no RDS DEV
Fase 3: Modelos e Lógica
- [ ] Criar
app/models.py: - [ ]
ReactivationStrategy- Enum de estratégias - [ ]
ReactivationAttempt- Tentativa completa - [ ]
CreateReactivationRequest- Input - [ ]
ReactivationOutcome- Resultado - [ ] Criar
app/repository.py - [ ] Criar
app/heuristics.py: - [ ]
select_strategy(account_data, history)- Qual estratégia usar - [ ]
calculate_max_discount(account_value, margin)- Limite de incentivo - [ ]
should_attempt(account, previous_attempts)- Vale tentar? - [ ]
evaluate_outcome(attempt)- Funcionou?
Fase 4: Routes/API
- [ ] Criar
routes/reactivation.py: - [ ]
POST /v1/reactivation/create- Criar tentativa - [ ]
GET /v1/reactivation/candidates- Listar candidatos - [ ]
POST /v1/reactivation/{attempt_id}/start- Iniciar - [ ]
POST /v1/reactivation/{attempt_id}/outcome- Registrar resultado - [ ]
GET /v1/reactivation/metrics- KPIs de reativação
Fase 5: Integração com Outros Agentes
- [ ] Consumir Account State para candidatos (STALLED, AT_RISK)
- [ ] Consumir Pricing para limites de desconto
- [ ] Consumir NBA para orquestrar ação
- [ ] Atualizar Account State após outcome
Fase 6: Docker & Deploy
- [ ] Criar Dockerfile, docker-stack.yml, deploy.sh
- [ ] Deploy em DEV
Fase 7: Integração Seller Cockpit
- [ ] Criar
reactivation.service.js - [ ] Adicionar actionType 'REACTIVATION' no aggregator
- [ ] Criar componente
ReactivationCard.jsx - [ ] Exibir estratégia sugerida no
InboxPage.jsx
Fase 8: Testes & Documentação
- [ ] Criar
README.md - [ ] Testar fluxo completo
- [ ] Validar métricas
4️⃣ Qualification Agent
Propósito: Gate de entrada - decide se vale cultivar uma revenda.
📍 Localização
c-suite/agents/qualification/
✅ Checklist de Implementação
Fase 1: Estrutura Base
- [ ] Criar diretório e arquivos base
Fase 2: Schema SQL
-
[ ] Criar
sql/schema.sql:
```sql
CREATE TABLE IF NOT EXISTS channel_qualifications (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
org_id INT NOT NULL DEFAULT 1,
account_id VARCHAR(100) NOT NULL,-- Input Data
cnpj VARCHAR(20),
region VARCHAR(50),
segment VARCHAR(100),
estimated_potential DECIMAL(15,2),
credit_score INT,
operational_capacity ENUM('LOW', 'MEDIUM', 'HIGH'),-- Scores
strategic_fit_score INT, -- 0-100
potential_value_score INT, -- 0-100
operational_readiness_score INT, -- 0-100
overall_score INT, -- 0-100-- Decision
decision ENUM('APPROVE_STRATEGIC', 'APPROVE_LIMITED', 'HOLD', 'DO_NOT_CULTIVATE') NOT NULL,
tier_assigned ENUM('STRATEGIC', 'OPPORTUNISTIC', 'TRANSACTIONAL', 'LIMITED'),
decision_reasons JSON,-- Limits
initial_credit_limit DECIMAL(15,2),
initial_discount_limit DECIMAL(5,2),-- Metadata
evaluated_by VARCHAR(50), -- 'system' or user_id
evaluated_at DATETIME NOT NULL,
expires_at DATETIME,created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY uk_account (org_id, account_id),
INDEX idx_decision (decision),
INDEX idx_tier (tier_assigned)
);
```
- [ ] Executar schema no RDS DEV
Fase 3: Modelos e Lógica
- [ ] Criar
app/models.py: - [ ]
QualificationDecision- Enum de decisões - [ ]
QualifyRequest- Input para qualificação - [ ]
QualificationResult- Output com scores e decisão - [ ] Criar
app/heuristics.py: - [ ]
calculate_strategic_fit(account_data)- Alinhamento estratégico - [ ]
calculate_potential_value(account_data)- Valor potencial - [ ]
calculate_operational_readiness(account_data)- Capacidade - [ ]
determine_tier(scores)- Qual tier - [ ]
determine_initial_limits(tier, scores)- Limites iniciais
Fase 4: Routes/API
- [ ] Criar
routes/qualification.py: - [ ]
POST /v1/qualification/evaluate- Avaliar nova revenda - [ ]
GET /v1/qualification/{account_id}- Consultar qualificação - [ ]
POST /v1/qualification/{account_id}/override- Override manual - [ ]
GET /v1/qualification/metrics- Métricas
Fase 5: Integração
- [ ] Consumir Credit Agent para score de crédito
- [ ] Disparar Onboarding Agent quando aprovado
- [ ] Criar estado NEW no Account State
Fase 6: Docker & Deploy
- [ ] Deploy em DEV
Fase 7: Integração (Admin/Backend)
- [ ] Este agente não aparece diretamente no Seller Cockpit
- [ ] Integrar com processo de cadastro de revendas
- [ ] Exibir resultado no admin panel (se existir)
Fase 8: Testes & Documentação
- [ ] Criar
README.md - [ ] Testar fluxo de qualificação
5️⃣ Channel Performance Agent
Propósito: Aprender padrões e propor ajustes de políticas.
📍 Localização
c-suite/agents/channel-performance/
✅ Checklist de Implementação
Fase 1: Estrutura Base
- [ ] Criar diretório e arquivos base
Fase 2: Schema SQL
-
[ ] Criar
sql/schema.sql:
```sql
CREATE TABLE IF NOT EXISTS channel_performance_insights (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
org_id INT NOT NULL DEFAULT 1,-- Insight Classification
insight_type ENUM('POLICY_GAP', 'POLICY_TOO_RESTRICTIVE', 'POLICY_TOO_LAX', 'EXECUTION_DRIFT', 'CHANNEL_MISALIGNMENT') NOT NULL,
severity ENUM('LOW', 'MEDIUM', 'HIGH', 'CRITICAL') NOT NULL,-- Context
affected_segment VARCHAR(100),
affected_region VARCHAR(50),
affected_policy VARCHAR(100),-- Analysis
observation TEXT NOT NULL,
evidence JSON,
impact_estimate JSON,-- Recommendation
recommendation TEXT,
suggested_action ENUM('ADJUST_PARAMETER', 'CHANGE_POLICY', 'RUN_EXPERIMENT', 'ESCALATE', 'MONITOR'),
suggested_params JSON,-- Status
status ENUM('NEW', 'REVIEWED', 'IMPLEMENTED', 'DISMISSED') DEFAULT 'NEW',
reviewed_by VARCHAR(50),
reviewed_at DATETIME,-- Period
analysis_period_start DATE,
analysis_period_end DATE,created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
INDEX idx_type (insight_type),
INDEX idx_severity (severity),
INDEX idx_status (status)
);
CREATE TABLE IF NOT EXISTS channel_performance_metrics (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
org_id INT NOT NULL DEFAULT 1,
period_date DATE NOT NULL,
period_type ENUM('DAILY', 'WEEKLY', 'MONTHLY') NOT NULL,
-- Onboarding Metrics
onboarding_started INT DEFAULT 0,
onboarding_completed INT DEFAULT 0,
onboarding_failed INT DEFAULT 0,
onboarding_rate DECIMAL(5,2),
avg_activation_days DECIMAL(5,1),
-- Reactivation Metrics
reactivation_attempts INT DEFAULT 0,
reactivation_won INT DEFAULT 0,
reactivation_rate DECIMAL(5,2),
avg_reactivation_cost DECIMAL(10,2),
-- State Metrics
accounts_new INT DEFAULT 0,
accounts_activating INT DEFAULT 0,
accounts_active INT DEFAULT 0,
accounts_stalled INT DEFAULT 0,
accounts_at_risk INT DEFAULT 0,
accounts_churned INT DEFAULT 0,
-- Revenue Metrics
total_revenue DECIMAL(15,2),
avg_margin DECIMAL(5,2),
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY uk_period (org_id, period_date, period_type),
INDEX idx_date (period_date)
);
```
- [ ] Executar schema no RDS DEV
Fase 3: Modelos e Lógica
- [ ] Criar
app/models.py: - [ ]
PerformanceInsight- Insight detectado - [ ]
PolicyChangeProposal- Proposta de mudança - [ ]
ChannelMetrics- Métricas agregadas - [ ] Criar
app/heuristics.py: - [ ]
analyze_onboarding_patterns()- Padrões de onboarding - [ ]
analyze_reactivation_effectiveness()- Eficácia de reativação - [ ]
detect_policy_gaps()- Gaps de política - [ ]
generate_recommendations()- Gerar recomendações
Fase 4: Routes/API
- [ ] Criar
routes/performance.py: - [ ]
GET /v1/performance/insights- Listar insights - [ ]
GET /v1/performance/metrics- Métricas atuais - [ ]
GET /v1/performance/trends- Tendências - [ ]
POST /v1/performance/analyze- Disparar análise - [ ]
POST /v1/performance/insight/{id}/action- Ação sobre insight
Fase 5: Integração
- [ ] Consumir dados de Account State
- [ ] Consumir dados de Onboarding
- [ ] Consumir dados de Reactivation
- [ ] Enviar proposals para Policy Engine
Fase 6: Docker & Deploy
- [ ] Deploy em DEV
Fase 7: Integração Seller Cockpit
- [ ] Criar
performance.service.js - [ ] Criar nova página
PerformancePage.jsx - [ ] Adicionar rota
/performanceno App - [ ] Criar componentes de visualização de insights
Fase 8: Testes & Documentação
- [ ] Criar
README.md - [ ] Testar geração de insights
- [ ] Validar recomendações
📅 Cronograma Sugerido
| Semana | Agente | Foco |
|---|---|---|
| 1 | Account State | Estrutura + Schema + API |
| 2 | Account State | Integração Seller Cockpit |
| 3 | Onboarding | Estrutura + Schema + API |
| 4 | Onboarding | Integração + Testes |
| 5 | Reactivation | Estrutura + Schema + API |
| 6 | Reactivation | Integração + Testes |
| 7 | Qualification | Implementação completa |
| 8 | Channel Performance | Implementação completa |
🔧 Comandos Úteis
Criar estrutura de um agente
cd /home/ec2-user/enviroment/apps/c-suite-ecosystem/c-suite/agents
mkdir -p {agent-name}/{app,routes,policies,sql}
touch {agent-name}/{main.py,requirements.txt,.env.example,Dockerfile,README.md}
touch {agent-name}/app/{__init__.py,models.py,database.py,repository.py,heuristics.py,settings.py}
touch {agent-name}/routes/{__init__.py,core.py}
touch {agent-name}/sql/{schema.sql,views.sql}
Deploy de um agente
cd /home/ec2-user/enviroment/apps/c-suite-ecosystem/c-suite/agents/{agent-name}
./deploy.sh
Executar SQL
mysql -h vallery.catmgckfixum.sa-east-1.rds.amazonaws.com -u robsonrr -p csuite_context < sql/schema.sql
📚 Referências
- Partes do Processo de Plantação - Base conceitual
- AI_CONTEXT.md - Estado atual do ecosistema
- NBA Agent - Referência de estrutura
- SCIA Agent - Referência de estrutura
Documento criado: 2026-01-24
Última atualização: 2026-01-24