atendentepro 0.3.0__tar.gz → 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. atendentepro-0.5.1/CHANGELOG.md +133 -0
  2. {atendentepro-0.3.0 → atendentepro-0.5.1}/PKG-INFO +52 -38
  3. {atendentepro-0.3.0 → atendentepro-0.5.1}/README.md +51 -37
  4. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/README.md +649 -72
  5. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/__init__.py +15 -1
  6. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/__init__.py +11 -0
  7. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/answer.py +1 -2
  8. atendentepro-0.5.1/atendentepro/agents/escalation.py +510 -0
  9. atendentepro-0.5.1/atendentepro/agents/feedback.py +961 -0
  10. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/network.py +115 -15
  11. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/__init__.py +10 -0
  12. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/answer.py +2 -3
  13. atendentepro-0.5.1/atendentepro/prompts/escalation.py +190 -0
  14. atendentepro-0.5.1/atendentepro/prompts/feedback.py +232 -0
  15. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro.egg-info/SOURCES.txt +4 -0
  16. {atendentepro-0.3.0 → atendentepro-0.5.1}/pyproject.toml +1 -1
  17. atendentepro-0.3.0/CHANGELOG.md +0 -57
  18. {atendentepro-0.3.0 → atendentepro-0.5.1}/LICENSE +0 -0
  19. {atendentepro-0.3.0 → atendentepro-0.5.1}/MANIFEST.in +0 -0
  20. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/confirmation.py +0 -0
  21. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/flow.py +0 -0
  22. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/interview.py +0 -0
  23. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/knowledge.py +0 -0
  24. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/onboarding.py +0 -0
  25. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/triage.py +0 -0
  26. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/agents/usage.py +0 -0
  27. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/config/__init__.py +0 -0
  28. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/config/settings.py +0 -0
  29. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/guardrails/__init__.py +0 -0
  30. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/guardrails/manager.py +0 -0
  31. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/license.py +0 -0
  32. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/models/__init__.py +0 -0
  33. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/models/context.py +0 -0
  34. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/models/outputs.py +0 -0
  35. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/confirmation.py +0 -0
  36. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/flow.py +0 -0
  37. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/interview.py +0 -0
  38. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/knowledge.py +0 -0
  39. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/onboarding.py +0 -0
  40. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/prompts/triage.py +0 -0
  41. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/templates/__init__.py +0 -0
  42. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/templates/manager.py +0 -0
  43. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/utils/__init__.py +0 -0
  44. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/utils/openai_client.py +0 -0
  45. {atendentepro-0.3.0 → atendentepro-0.5.1}/atendentepro/utils/tracing.py +0 -0
  46. {atendentepro-0.3.0 → atendentepro-0.5.1}/requirements.txt +0 -0
  47. {atendentepro-0.3.0 → atendentepro-0.5.1}/setup.cfg +0 -0
  48. {atendentepro-0.3.0 → atendentepro-0.5.1}/setup.py +0 -0
@@ -0,0 +1,133 @@
1
+ # Changelog
2
+
3
+ All notable changes to AtendentePro will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.5.1] - 2025-01-06
9
+
10
+ ### Changed
11
+ - **Documentation**: Updated all diagrams and READMEs
12
+ - Added prompts files for Escalation and Feedback agents (`prompts/escalation.py`, `prompts/feedback.py`)
13
+ - Moved `templates/standard/` out of `client_templates/` (now included in repository)
14
+ - Removed unnecessary Answer → Interview handoff
15
+ - Fixed inconsistencies in handoff diagrams
16
+ - Improved YAML configuration documentation
17
+
18
+ ### Fixed
19
+ - Removed circular handoff from Answer Agent to Interview Agent
20
+ - Fixed docstrings and diagrams referencing old handoff structure
21
+
22
+ ## [0.5.0] - 2025-01-06
23
+
24
+ ### Added
25
+ - **Feedback Agent**: New module for ticket-based user feedback
26
+ - `create_feedback_agent()` factory function
27
+ - `FEEDBACK_TOOLS` with ticket creation and management tools:
28
+ - `criar_ticket` - Create feedback tickets (dúvida, feedback, reclamação, sugestão, elogio, problema)
29
+ - `enviar_email_confirmacao` - Send confirmation email to user
30
+ - `consultar_ticket` - Query ticket status by protocol
31
+ - `listar_meus_tickets` - List user's tickets by email
32
+ - `atualizar_ticket` - Update ticket status or add response
33
+ - Protocol generation with customizable prefix (TKT, SAC, SUP)
34
+ - Email templates with brand customization
35
+ - Priority auto-classification (reclamações = alta)
36
+ - Team notification support
37
+ - **Network Integration**: Feedback Agent added to standard network
38
+ - `include_feedback` parameter in `create_standard_network()`
39
+ - `feedback_protocol_prefix`, `feedback_brand_color`, `feedback_brand_name` parameters
40
+ - `add_feedback_to_all()` method in AgentNetwork
41
+ - Feedback added as handoff to ALL agents by default
42
+ - **Template Configuration**: New `feedback_config.yaml` template
43
+ - Ticket types configuration
44
+ - Priority levels and SLA
45
+ - Email branding options
46
+ - Auto-priority rules
47
+ - **Configuration Function**: `configure_feedback_storage()` for runtime config
48
+
49
+ ### Changed
50
+ - `AgentNetwork` now includes `feedback` attribute
51
+ - Network handoffs updated to include feedback option
52
+ - README updated with Feedback Agent documentation
53
+ - Version bump to 0.5.0
54
+
55
+ ## [0.4.0] - 2025-01-06
56
+
57
+ ### Added
58
+ - **Escalation Agent**: New module for human support transfer
59
+ - `create_escalation_agent()` factory function
60
+ - `ESCALATION_TOOLS` with registration and consultation tools
61
+ - Automatic activation triggers (explicit request, frustration, out-of-scope topics)
62
+ - Business hours verification
63
+ - Protocol generation and tracking
64
+ - Priority auto-classification (urgent, high, normal, low)
65
+ - Webhook notification support
66
+ - **Network Integration**: Escalation Agent added to standard network
67
+ - `include_escalation` parameter in `create_standard_network()`
68
+ - `escalation_channels` parameter for channel description
69
+ - `add_escalation_to_all()` method in AgentNetwork
70
+ - Escalation added as handoff to ALL agents by default
71
+ - **Template Configuration**: New `escalation_config.yaml` template
72
+ - Customizable triggers, channels, and business hours
73
+ - Priority classification rules
74
+ - Custom messages
75
+ - **Client Updates**: Vivo and EasyDr networks support Escalation Agent
76
+ - **Examples**: New `main_escalation()` demo in `run_vivo.py`
77
+
78
+ ### Changed
79
+ - `AgentNetwork` now includes `escalation` attribute
80
+ - Network handoffs updated to include escalation option
81
+ - README updated with Escalation Agent documentation
82
+ - Version bump to 0.4.0
83
+
84
+ ## [0.3.0] - 2025-01-04
85
+
86
+ ### Added
87
+ - **License System**: New token-based licensing system
88
+ - `activate()` function to activate the library
89
+ - Auto-activation via `ATENDENTEPRO_LICENSE_KEY` environment variable
90
+ - `atendentepro-generate-token` CLI command for administrators
91
+ - License expiration support
92
+ - Feature-based licensing
93
+ - **CLI Tools**: Command-line interface for token generation
94
+ - **Improved Documentation**: Enhanced README with activation instructions
95
+
96
+ ### Changed
97
+ - Library now requires activation before use
98
+ - Version bump to 0.3.0
99
+ - Updated pyproject.toml with new metadata
100
+
101
+ ### Security
102
+ - Added HMAC-SHA256 token validation
103
+ - Proprietary license enforcement
104
+
105
+ ## [0.2.0] - 2025-01-03
106
+
107
+ ### Added
108
+ - **Modular Architecture**: Complete refactoring into independent library
109
+ - **Agent Network**: Configurable multi-agent system
110
+ - Triage Agent - Intent classification
111
+ - Flow Agent - Options presentation
112
+ - Interview Agent - Information collection
113
+ - Answer Agent - Response synthesis
114
+ - Knowledge Agent - RAG and structured data queries
115
+ - Confirmation Agent - Yes/no validation
116
+ - Usage Agent - System help
117
+ - Onboarding Agent - User registration
118
+ - **Template System**: YAML-based client configuration
119
+ - **Guardrails**: Scope validation and forbidden topics
120
+ - **Custom Tools**: Support for function_tool integrations
121
+ - **Multiple Data Sources**: CSV, database, API support
122
+
123
+ ### Changed
124
+ - Extracted from monkai monorepo into standalone package
125
+ - Standardized configuration format
126
+
127
+ ## [0.1.0] - 2024-12-01
128
+
129
+ ### Added
130
+ - Initial release
131
+ - Basic multi-agent functionality
132
+ - OpenAI Agents SDK integration
133
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atendentepro
3
- Version: 0.3.0
3
+ Version: 0.5.1
4
4
  Summary: Sistema de Atendimento Inteligente com Múltiplos Agentes IA - Biblioteca independente e modular baseada no OpenAI Agents SDK
5
5
  Author-email: BeMonkAI <contato@bemonkai.com>
6
6
  Maintainer-email: BeMonkAI <contato@bemonkai.com>
@@ -58,7 +58,7 @@ Dynamic: license-file
58
58
 
59
59
  [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
60
60
  [![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)
61
- [![Version](https://img.shields.io/badge/version-0.3.0-green.svg)](CHANGELOG.md)
61
+ [![Version](https://img.shields.io/badge/version-0.5.0-green.svg)](CHANGELOG.md)
62
62
 
63
63
  **Sistema de Atendimento Inteligente com Múltiplos Agentes IA**
64
64
 
@@ -157,9 +157,9 @@ from agents import Runner
157
157
  activate("ATP_seu-token")
158
158
 
159
159
  async def main():
160
- # 2. Criar rede de agentes
160
+ # 2. Criar rede de agentes usando template standard
161
161
  network = create_standard_network(
162
- templates_root=Path("./client_templates"),
162
+ templates_root=Path("./templates"), # Template genérico de exemplo
163
163
  client="standard"
164
164
  )
165
165
 
@@ -179,34 +179,40 @@ asyncio.run(main())
179
179
  ## 🏗️ Arquitetura
180
180
 
181
181
  ```
182
- ┌─────────────────────────────────────────────────────────────────┐
183
- ATENDENTEPRO
184
- ├─────────────────────────────────────────────────────────────────┤
185
-
186
- │ 👤 Usuário
187
- │ │
188
- │ ▼
189
- │ ┌─────────────┐
190
- │ │ Triage │──► Classifica intenção
191
- │ └─────────────┘
192
- │ │
193
- ├──────────┬──────────┬──────────┬──────────┐
194
- │ ▼
195
- ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
196
- Flow │ │Knowledge│ │Confirm │ │ Usage │ │Onboard
197
- └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘
198
- │ │
199
-
200
- ┌─────────────┐
201
- Interview │──► Coleta informações │
202
- └─────────────┘
203
-
204
-
205
- ┌─────────────┐
206
- Answer │──► Resposta final │
207
- └─────────────┘
208
-
209
- └─────────────────────────────────────────────────────────────────┘
182
+ ┌────────────────────────────────────────────────────────────────────────────┐
183
+ ATENDENTEPRO
184
+ ├────────────────────────────────────────────────────────────────────────────┤
185
+
186
+ │ 👤 Usuário
187
+ │ │
188
+ │ ▼
189
+ │ ┌─────────────┐
190
+ │ │ Triage │──► Classifica intenção
191
+ │ └─────────────┘
192
+ │ │
193
+ ┌────┴────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┐
194
+ ▼ ▼
195
+ ┌──────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐
196
+ Flow │ │Knowl. │ │Confirm│ │ Usage │ │Onboard│ Escala.│ │Feedbk.│ │
197
+ └──────┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘
198
+ │ │
199
+ Todos os agentes podem escalar ─────────►│
200
+ ou registrar feedback ──────────────────────────────► │
201
+
202
+ ┌─────────────┐
203
+ Interview │──► Coleta informações
204
+ └─────────────┘
205
+
206
+
207
+ ┌─────────────┐
208
+ Answer │──► Resposta final │
209
+ │ └─────────────┘ │
210
+ │ │
211
+ │ ═══════════════════════════════════════════════════════════════════════ │
212
+ │ 📞 Escalation ──► Transfere para atendimento humano IMEDIATO │
213
+ │ 📝 Feedback ──► Registra tickets para resposta POSTERIOR │
214
+ │ │
215
+ └────────────────────────────────────────────────────────────────────────────┘
210
216
  ```
211
217
 
212
218
  ---
@@ -223,6 +229,8 @@ asyncio.run(main())
223
229
  | **Confirmation** | Valida com respostas sim/não |
224
230
  | **Usage** | Responde dúvidas sobre o sistema |
225
231
  | **Onboarding** | Cadastro de novos usuários |
232
+ | **Escalation** | Transfere para atendimento humano quando necessário |
233
+ | **Feedback** | Registra dúvidas, feedbacks, reclamações e sugestões |
226
234
 
227
235
  ---
228
236
 
@@ -231,18 +239,24 @@ asyncio.run(main())
231
239
  Templates são configurações YAML que personalizam o comportamento dos agentes:
232
240
 
233
241
  ```
234
- client_templates/
235
- ├── standard/ # Template base
236
- ├── triage_config.yaml
237
- ├── flow_config.yaml
238
- ├── interview_config.yaml
239
- │ └── ...
242
+ templates/ # ✅ Templates genéricos (incluídos no repositório)
243
+ └── standard/ # Template de exemplo
244
+ ├── triage_config.yaml
245
+ ├── flow_config.yaml
246
+ ├── escalation_config.yaml
247
+ ├── feedback_config.yaml
248
+ └── ...
249
+
250
+ client_templates/ # 🔒 Templates de clientes (não incluídos no repositório)
240
251
  └── meu_cliente/ # Template customizado
241
252
  ├── triage_config.yaml
242
253
  ├── tools.py # Tools customizadas
243
254
  └── network.py # Rede específica
244
255
  ```
245
256
 
257
+ > **Nota:** A pasta `templates/` contém exemplos genéricos e é incluída no repositório.
258
+ > A pasta `client_templates/` contém configurações de clientes e está no `.gitignore`.
259
+
246
260
  Veja a [documentação completa](atendentepro/README.md) para criar templates.
247
261
 
248
262
  ---
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
4
4
  [![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)
5
- [![Version](https://img.shields.io/badge/version-0.3.0-green.svg)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-0.5.0-green.svg)](CHANGELOG.md)
6
6
 
7
7
  **Sistema de Atendimento Inteligente com Múltiplos Agentes IA**
8
8
 
@@ -101,9 +101,9 @@ from agents import Runner
101
101
  activate("ATP_seu-token")
102
102
 
103
103
  async def main():
104
- # 2. Criar rede de agentes
104
+ # 2. Criar rede de agentes usando template standard
105
105
  network = create_standard_network(
106
- templates_root=Path("./client_templates"),
106
+ templates_root=Path("./templates"), # Template genérico de exemplo
107
107
  client="standard"
108
108
  )
109
109
 
@@ -123,34 +123,40 @@ asyncio.run(main())
123
123
  ## 🏗️ Arquitetura
124
124
 
125
125
  ```
126
- ┌─────────────────────────────────────────────────────────────────┐
127
- ATENDENTEPRO
128
- ├─────────────────────────────────────────────────────────────────┤
129
-
130
- │ 👤 Usuário
131
- │ │
132
- │ ▼
133
- │ ┌─────────────┐
134
- │ │ Triage │──► Classifica intenção
135
- │ └─────────────┘
136
- │ │
137
- ├──────────┬──────────┬──────────┬──────────┐
138
- │ ▼
139
- ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
140
- Flow │ │Knowledge│ │Confirm │ │ Usage │ │Onboard
141
- └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘
142
- │ │
143
-
144
- ┌─────────────┐
145
- Interview │──► Coleta informações │
146
- └─────────────┘
147
-
148
-
149
- ┌─────────────┐
150
- Answer │──► Resposta final │
151
- └─────────────┘
152
-
153
- └─────────────────────────────────────────────────────────────────┘
126
+ ┌────────────────────────────────────────────────────────────────────────────┐
127
+ ATENDENTEPRO
128
+ ├────────────────────────────────────────────────────────────────────────────┤
129
+
130
+ │ 👤 Usuário
131
+ │ │
132
+ │ ▼
133
+ │ ┌─────────────┐
134
+ │ │ Triage │──► Classifica intenção
135
+ │ └─────────────┘
136
+ │ │
137
+ ┌────┴────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┐
138
+ ▼ ▼
139
+ ┌──────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐
140
+ Flow │ │Knowl. │ │Confirm│ │ Usage │ │Onboard│ Escala.│ │Feedbk.│ │
141
+ └──────┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘
142
+ │ │
143
+ Todos os agentes podem escalar ─────────►│
144
+ ou registrar feedback ──────────────────────────────► │
145
+
146
+ ┌─────────────┐
147
+ Interview │──► Coleta informações
148
+ └─────────────┘
149
+
150
+
151
+ ┌─────────────┐
152
+ Answer │──► Resposta final │
153
+ │ └─────────────┘ │
154
+ │ │
155
+ │ ═══════════════════════════════════════════════════════════════════════ │
156
+ │ 📞 Escalation ──► Transfere para atendimento humano IMEDIATO │
157
+ │ 📝 Feedback ──► Registra tickets para resposta POSTERIOR │
158
+ │ │
159
+ └────────────────────────────────────────────────────────────────────────────┘
154
160
  ```
155
161
 
156
162
  ---
@@ -167,6 +173,8 @@ asyncio.run(main())
167
173
  | **Confirmation** | Valida com respostas sim/não |
168
174
  | **Usage** | Responde dúvidas sobre o sistema |
169
175
  | **Onboarding** | Cadastro de novos usuários |
176
+ | **Escalation** | Transfere para atendimento humano quando necessário |
177
+ | **Feedback** | Registra dúvidas, feedbacks, reclamações e sugestões |
170
178
 
171
179
  ---
172
180
 
@@ -175,18 +183,24 @@ asyncio.run(main())
175
183
  Templates são configurações YAML que personalizam o comportamento dos agentes:
176
184
 
177
185
  ```
178
- client_templates/
179
- ├── standard/ # Template base
180
- ├── triage_config.yaml
181
- ├── flow_config.yaml
182
- ├── interview_config.yaml
183
- │ └── ...
186
+ templates/ # ✅ Templates genéricos (incluídos no repositório)
187
+ └── standard/ # Template de exemplo
188
+ ├── triage_config.yaml
189
+ ├── flow_config.yaml
190
+ ├── escalation_config.yaml
191
+ ├── feedback_config.yaml
192
+ └── ...
193
+
194
+ client_templates/ # 🔒 Templates de clientes (não incluídos no repositório)
184
195
  └── meu_cliente/ # Template customizado
185
196
  ├── triage_config.yaml
186
197
  ├── tools.py # Tools customizadas
187
198
  └── network.py # Rede específica
188
199
  ```
189
200
 
201
+ > **Nota:** A pasta `templates/` contém exemplos genéricos e é incluída no repositório.
202
+ > A pasta `client_templates/` contém configurações de clientes e está no `.gitignore`.
203
+
190
204
  Veja a [documentação completa](atendentepro/README.md) para criar templates.
191
205
 
192
206
  ---