atendentepro 0.3.0__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 (43) hide show
  1. atendentepro-0.3.0/CHANGELOG.md +57 -0
  2. atendentepro-0.3.0/LICENSE +25 -0
  3. atendentepro-0.3.0/MANIFEST.in +40 -0
  4. atendentepro-0.3.0/PKG-INFO +306 -0
  5. atendentepro-0.3.0/README.md +250 -0
  6. atendentepro-0.3.0/atendentepro/README.md +890 -0
  7. atendentepro-0.3.0/atendentepro/__init__.py +215 -0
  8. atendentepro-0.3.0/atendentepro/agents/__init__.py +45 -0
  9. atendentepro-0.3.0/atendentepro/agents/answer.py +62 -0
  10. atendentepro-0.3.0/atendentepro/agents/confirmation.py +69 -0
  11. atendentepro-0.3.0/atendentepro/agents/flow.py +64 -0
  12. atendentepro-0.3.0/atendentepro/agents/interview.py +68 -0
  13. atendentepro-0.3.0/atendentepro/agents/knowledge.py +296 -0
  14. atendentepro-0.3.0/atendentepro/agents/onboarding.py +65 -0
  15. atendentepro-0.3.0/atendentepro/agents/triage.py +57 -0
  16. atendentepro-0.3.0/atendentepro/agents/usage.py +56 -0
  17. atendentepro-0.3.0/atendentepro/config/__init__.py +19 -0
  18. atendentepro-0.3.0/atendentepro/config/settings.py +134 -0
  19. atendentepro-0.3.0/atendentepro/guardrails/__init__.py +21 -0
  20. atendentepro-0.3.0/atendentepro/guardrails/manager.py +419 -0
  21. atendentepro-0.3.0/atendentepro/license.py +502 -0
  22. atendentepro-0.3.0/atendentepro/models/__init__.py +21 -0
  23. atendentepro-0.3.0/atendentepro/models/context.py +21 -0
  24. atendentepro-0.3.0/atendentepro/models/outputs.py +118 -0
  25. atendentepro-0.3.0/atendentepro/network.py +325 -0
  26. atendentepro-0.3.0/atendentepro/prompts/__init__.py +35 -0
  27. atendentepro-0.3.0/atendentepro/prompts/answer.py +114 -0
  28. atendentepro-0.3.0/atendentepro/prompts/confirmation.py +124 -0
  29. atendentepro-0.3.0/atendentepro/prompts/flow.py +112 -0
  30. atendentepro-0.3.0/atendentepro/prompts/interview.py +123 -0
  31. atendentepro-0.3.0/atendentepro/prompts/knowledge.py +135 -0
  32. atendentepro-0.3.0/atendentepro/prompts/onboarding.py +146 -0
  33. atendentepro-0.3.0/atendentepro/prompts/triage.py +42 -0
  34. atendentepro-0.3.0/atendentepro/templates/__init__.py +51 -0
  35. atendentepro-0.3.0/atendentepro/templates/manager.py +530 -0
  36. atendentepro-0.3.0/atendentepro/utils/__init__.py +19 -0
  37. atendentepro-0.3.0/atendentepro/utils/openai_client.py +154 -0
  38. atendentepro-0.3.0/atendentepro/utils/tracing.py +71 -0
  39. atendentepro-0.3.0/atendentepro.egg-info/SOURCES.txt +40 -0
  40. atendentepro-0.3.0/pyproject.toml +130 -0
  41. atendentepro-0.3.0/requirements.txt +46 -0
  42. atendentepro-0.3.0/setup.cfg +4 -0
  43. atendentepro-0.3.0/setup.py +8 -0
@@ -0,0 +1,57 @@
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.3.0] - 2025-01-04
9
+
10
+ ### Added
11
+ - **License System**: New token-based licensing system
12
+ - `activate()` function to activate the library
13
+ - Auto-activation via `ATENDENTEPRO_LICENSE_KEY` environment variable
14
+ - `atendentepro-generate-token` CLI command for administrators
15
+ - License expiration support
16
+ - Feature-based licensing
17
+ - **CLI Tools**: Command-line interface for token generation
18
+ - **Improved Documentation**: Enhanced README with activation instructions
19
+
20
+ ### Changed
21
+ - Library now requires activation before use
22
+ - Version bump to 0.3.0
23
+ - Updated pyproject.toml with new metadata
24
+
25
+ ### Security
26
+ - Added HMAC-SHA256 token validation
27
+ - Proprietary license enforcement
28
+
29
+ ## [0.2.0] - 2025-01-03
30
+
31
+ ### Added
32
+ - **Modular Architecture**: Complete refactoring into independent library
33
+ - **Agent Network**: Configurable multi-agent system
34
+ - Triage Agent - Intent classification
35
+ - Flow Agent - Options presentation
36
+ - Interview Agent - Information collection
37
+ - Answer Agent - Response synthesis
38
+ - Knowledge Agent - RAG and structured data queries
39
+ - Confirmation Agent - Yes/no validation
40
+ - Usage Agent - System help
41
+ - Onboarding Agent - User registration
42
+ - **Template System**: YAML-based client configuration
43
+ - **Guardrails**: Scope validation and forbidden topics
44
+ - **Custom Tools**: Support for function_tool integrations
45
+ - **Multiple Data Sources**: CSV, database, API support
46
+
47
+ ### Changed
48
+ - Extracted from monkai monorepo into standalone package
49
+ - Standardized configuration format
50
+
51
+ ## [0.1.0] - 2024-12-01
52
+
53
+ ### Added
54
+ - Initial release
55
+ - Basic multi-agent functionality
56
+ - OpenAI Agents SDK integration
57
+
@@ -0,0 +1,25 @@
1
+ AtendentePro Proprietary License
2
+
3
+ Copyright (c) 2024-2025 BeMonkAI
4
+
5
+ All rights reserved.
6
+
7
+ NOTICE: This software is proprietary and confidential. Unauthorized copying,
8
+ modification, distribution, or use of this software, via any medium, is
9
+ strictly prohibited without the express written permission of BeMonkAI.
10
+
11
+ This software requires a valid license key for use. License keys can be
12
+ obtained by contacting: contato@bemonkai.com
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+
22
+ For licensing inquiries:
23
+ Email: contato@bemonkai.com
24
+ Website: https://bemonkai.com
25
+
@@ -0,0 +1,40 @@
1
+ # Include the README and other documentation
2
+ include README.md
3
+ include CHANGELOG.md
4
+ include LICENSE
5
+
6
+ # Include requirements
7
+ include requirements.txt
8
+
9
+ # Include package data
10
+ recursive-include atendentepro *.py
11
+ recursive-include atendentepro *.md
12
+
13
+ # Exclude development and test files
14
+ exclude .gitignore
15
+ exclude .env
16
+ exclude .env.example
17
+ exclude env.example
18
+
19
+ # Exclude directories not needed in package
20
+ prune venv
21
+ prune .venv
22
+ prune tests
23
+ prune docs
24
+ prune examples
25
+ prune scripts
26
+ prune client_templates
27
+ prune *.egg-info
28
+ prune __pycache__
29
+ prune .git
30
+ prune .github
31
+ prune .pytest_cache
32
+ prune .mypy_cache
33
+
34
+ # Exclude compiled files
35
+ global-exclude *.py[cod]
36
+ global-exclude __pycache__
37
+ global-exclude *.so
38
+ global-exclude *.dylib
39
+ global-exclude .DS_Store
40
+
@@ -0,0 +1,306 @@
1
+ Metadata-Version: 2.4
2
+ Name: atendentepro
3
+ Version: 0.3.0
4
+ Summary: Sistema de Atendimento Inteligente com MΓΊltiplos Agentes IA - Biblioteca independente e modular baseada no OpenAI Agents SDK
5
+ Author-email: BeMonkAI <contato@bemonkai.com>
6
+ Maintainer-email: BeMonkAI <contato@bemonkai.com>
7
+ License: Proprietary
8
+ Project-URL: Homepage, https://github.com/BeMonkAI/atendentepro
9
+ Project-URL: Documentation, https://github.com/BeMonkAI/atendentepro#readme
10
+ Project-URL: Repository, https://github.com/BeMonkAI/atendentepro
11
+ Project-URL: Issues, https://github.com/BeMonkAI/atendentepro/issues
12
+ Project-URL: Changelog, https://github.com/BeMonkAI/atendentepro/blob/main/CHANGELOG.md
13
+ Keywords: ai,agents,customer-service,chatbot,openai,multi-agent,atendimento,openai-agents,conversational-ai,rag
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: Other/Proprietary License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Communications :: Chat
24
+ Classifier: Operating System :: OS Independent
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: openai-agents>=0.3.3
29
+ Requires-Dist: openai>=1.107.1
30
+ Requires-Dist: pydantic>=2.0.0
31
+ Requires-Dist: PyYAML>=6.0
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Requires-Dist: httpx>=0.27.0
34
+ Requires-Dist: numpy>=1.24.0
35
+ Requires-Dist: scikit-learn>=1.3.0
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
38
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
39
+ Requires-Dist: black>=23.0.0; extra == "dev"
40
+ Requires-Dist: isort>=5.12.0; extra == "dev"
41
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
42
+ Provides-Extra: docs
43
+ Requires-Dist: mkdocs>=1.5.0; extra == "docs"
44
+ Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
45
+ Provides-Extra: rag
46
+ Requires-Dist: PyPDF2>=3.0.0; extra == "rag"
47
+ Requires-Dist: python-docx>=0.8.11; extra == "rag"
48
+ Requires-Dist: python-pptx>=0.6.21; extra == "rag"
49
+ Requires-Dist: PyMuPDF>=1.23.0; extra == "rag"
50
+ Provides-Extra: tracing
51
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "tracing"
52
+ Requires-Dist: azure-monitor-opentelemetry-exporter>=1.0.0; extra == "tracing"
53
+ Provides-Extra: all
54
+ Requires-Dist: atendentepro[dev,docs,rag,tracing]; extra == "all"
55
+ Dynamic: license-file
56
+
57
+ # AtendentePro πŸ€–
58
+
59
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
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)
62
+
63
+ **Sistema de Atendimento Inteligente com MΓΊltiplos Agentes IA**
64
+
65
+ Uma biblioteca Python modular e independente para criar sistemas de atendimento automatizado usando mΓΊltiplos agentes de IA especializados baseados no [OpenAI Agents SDK](https://github.com/openai/openai-agents-python).
66
+
67
+ ---
68
+
69
+ ## πŸ“‹ Índice
70
+
71
+ - [InstalaΓ§Γ£o](#-instalaΓ§Γ£o)
72
+ - [AtivaΓ§Γ£o (LicenΓ§a)](#-ativaΓ§Γ£o-licenΓ§a)
73
+ - [InΓ­cio RΓ‘pido](#-inΓ­cio-rΓ‘pido)
74
+ - [Arquitetura](#-arquitetura)
75
+ - [Agentes](#-agentes)
76
+ - [Templates](#-templates)
77
+ - [DocumentaΓ§Γ£o](#-documentaΓ§Γ£o)
78
+ - [Suporte](#-suporte)
79
+
80
+ ---
81
+
82
+ ## πŸ“¦ InstalaΓ§Γ£o
83
+
84
+ ### Via pip (Privado)
85
+
86
+ ```bash
87
+ # Instalar do repositΓ³rio privado
88
+ pip install atendentepro --extra-index-url https://pypi.bemonkai.com/simple/
89
+
90
+ # Ou via GitHub
91
+ pip install git+https://github.com/BeMonkAI/atendentepro.git
92
+ ```
93
+
94
+ ### Desenvolvimento Local
95
+
96
+ ```bash
97
+ # Clonar repositΓ³rio
98
+ git clone https://github.com/BeMonkAI/atendentepro.git
99
+ cd atendentepro
100
+
101
+ # Criar ambiente virtual
102
+ python -m venv venv
103
+ source venv/bin/activate # Linux/Mac
104
+ # ou: venv\Scripts\activate # Windows
105
+
106
+ # Instalar em modo editable
107
+ pip install -e .
108
+
109
+ # Com dependΓͺncias de desenvolvimento
110
+ pip install -e ".[dev]"
111
+ ```
112
+
113
+ ---
114
+
115
+ ## πŸ”‘ AtivaΓ§Γ£o (LicenΓ§a)
116
+
117
+ A biblioteca **requer um token de licenΓ§a** para funcionar.
118
+
119
+ ### OpΓ§Γ£o 1: VariΓ‘vel de Ambiente (Recomendado)
120
+
121
+ ```bash
122
+ export ATENDENTEPRO_LICENSE_KEY="ATP_seu-token-aqui"
123
+ ```
124
+
125
+ ### OpΓ§Γ£o 2: Via CΓ³digo
126
+
127
+ ```python
128
+ from atendentepro import activate
129
+
130
+ activate("ATP_seu-token-aqui")
131
+ ```
132
+
133
+ ### OpΓ§Γ£o 3: Arquivo .env
134
+
135
+ ```env
136
+ ATENDENTEPRO_LICENSE_KEY=ATP_seu-token-aqui
137
+ OPENAI_API_KEY=sk-sua-chave-openai
138
+ ```
139
+
140
+ ### Obter um Token
141
+
142
+ Entre em contato para obter seu token:
143
+ - πŸ“§ **Email:** contato@bemonkai.com
144
+ - 🌐 **Site:** https://bemonkai.com
145
+
146
+ ---
147
+
148
+ ## ⚑ Início RÑpido
149
+
150
+ ```python
151
+ import asyncio
152
+ from pathlib import Path
153
+ from atendentepro import activate, create_standard_network
154
+ from agents import Runner
155
+
156
+ # 1. Ativar (ou use variΓ‘vel de ambiente)
157
+ activate("ATP_seu-token")
158
+
159
+ async def main():
160
+ # 2. Criar rede de agentes
161
+ network = create_standard_network(
162
+ templates_root=Path("./client_templates"),
163
+ client="standard"
164
+ )
165
+
166
+ # 3. Executar conversa
167
+ result = await Runner.run(
168
+ network.triage,
169
+ [{"role": "user", "content": "OlΓ‘, preciso de ajuda"}]
170
+ )
171
+
172
+ print(result.final_output)
173
+
174
+ asyncio.run(main())
175
+ ```
176
+
177
+ ---
178
+
179
+ ## πŸ—οΈ Arquitetura
180
+
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
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
210
+ ```
211
+
212
+ ---
213
+
214
+ ## πŸ€– Agentes
215
+
216
+ | Agente | DescriΓ§Γ£o |
217
+ |--------|-----------|
218
+ | **Triage** | Classifica intenΓ§Γ£o e direciona para agente especializado |
219
+ | **Flow** | Apresenta opΓ§Γ΅es/menu ao usuΓ‘rio |
220
+ | **Interview** | Coleta informaΓ§Γ΅es atravΓ©s de perguntas |
221
+ | **Answer** | Sintetiza resposta final |
222
+ | **Knowledge** | Consulta RAG e dados estruturados |
223
+ | **Confirmation** | Valida com respostas sim/nΓ£o |
224
+ | **Usage** | Responde dΓΊvidas sobre o sistema |
225
+ | **Onboarding** | Cadastro de novos usuΓ‘rios |
226
+
227
+ ---
228
+
229
+ ## πŸ“ Templates
230
+
231
+ Templates sΓ£o configuraΓ§Γ΅es YAML que personalizam o comportamento dos agentes:
232
+
233
+ ```
234
+ client_templates/
235
+ β”œβ”€β”€ standard/ # Template base
236
+ β”‚ β”œβ”€β”€ triage_config.yaml
237
+ β”‚ β”œβ”€β”€ flow_config.yaml
238
+ β”‚ β”œβ”€β”€ interview_config.yaml
239
+ β”‚ └── ...
240
+ └── meu_cliente/ # Template customizado
241
+ β”œβ”€β”€ triage_config.yaml
242
+ β”œβ”€β”€ tools.py # Tools customizadas
243
+ └── network.py # Rede especΓ­fica
244
+ ```
245
+
246
+ Veja a [documentaΓ§Γ£o completa](atendentepro/README.md) para criar templates.
247
+
248
+ ---
249
+
250
+ ## πŸ“š DocumentaΓ§Γ£o
251
+
252
+ - [πŸ“– DocumentaΓ§Γ£o da Biblioteca](atendentepro/README.md)
253
+ - [πŸ“Š Fluxogramas](docs/fluxogramas/)
254
+ - [πŸ’‘ Exemplos](examples/)
255
+ - [πŸ“ Changelog](CHANGELOG.md)
256
+
257
+ ---
258
+
259
+ ## πŸ”§ DependΓͺncias
260
+
261
+ - Python 3.9+
262
+ - openai-agents >= 0.3.3
263
+ - openai >= 1.107.1
264
+ - pydantic >= 2.0.0
265
+ - PyYAML >= 6.0
266
+ - python-dotenv >= 1.0.0
267
+
268
+ ---
269
+
270
+ ## πŸ› οΈ Desenvolvimento
271
+
272
+ ```bash
273
+ # Instalar dependΓͺncias de desenvolvimento
274
+ pip install -e ".[dev]"
275
+
276
+ # Rodar testes
277
+ pytest
278
+
279
+ # Formatar cΓ³digo
280
+ black atendentepro
281
+ isort atendentepro
282
+
283
+ # Type checking
284
+ mypy atendentepro
285
+ ```
286
+
287
+ ---
288
+
289
+ ## πŸ“„ LicenΓ§a
290
+
291
+ Este software Γ© **proprietΓ‘rio** e requer uma licenΓ§a vΓ‘lida para uso.
292
+
293
+ Veja o arquivo [LICENSE](LICENSE) para mais detalhes.
294
+
295
+ ---
296
+
297
+ ## 🀝 Suporte
298
+
299
+ - πŸ“§ **Email:** contato@bemonkai.com
300
+ - 🌐 **Site:** https://bemonkai.com
301
+ - πŸ› **Issues:** https://github.com/BeMonkAI/atendentepro/issues
302
+
303
+ ---
304
+
305
+ **Made with ❀️ by BeMonkAI**
306
+
@@ -0,0 +1,250 @@
1
+ # AtendentePro πŸ€–
2
+
3
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
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)
6
+
7
+ **Sistema de Atendimento Inteligente com MΓΊltiplos Agentes IA**
8
+
9
+ Uma biblioteca Python modular e independente para criar sistemas de atendimento automatizado usando mΓΊltiplos agentes de IA especializados baseados no [OpenAI Agents SDK](https://github.com/openai/openai-agents-python).
10
+
11
+ ---
12
+
13
+ ## πŸ“‹ Índice
14
+
15
+ - [InstalaΓ§Γ£o](#-instalaΓ§Γ£o)
16
+ - [AtivaΓ§Γ£o (LicenΓ§a)](#-ativaΓ§Γ£o-licenΓ§a)
17
+ - [InΓ­cio RΓ‘pido](#-inΓ­cio-rΓ‘pido)
18
+ - [Arquitetura](#-arquitetura)
19
+ - [Agentes](#-agentes)
20
+ - [Templates](#-templates)
21
+ - [DocumentaΓ§Γ£o](#-documentaΓ§Γ£o)
22
+ - [Suporte](#-suporte)
23
+
24
+ ---
25
+
26
+ ## πŸ“¦ InstalaΓ§Γ£o
27
+
28
+ ### Via pip (Privado)
29
+
30
+ ```bash
31
+ # Instalar do repositΓ³rio privado
32
+ pip install atendentepro --extra-index-url https://pypi.bemonkai.com/simple/
33
+
34
+ # Ou via GitHub
35
+ pip install git+https://github.com/BeMonkAI/atendentepro.git
36
+ ```
37
+
38
+ ### Desenvolvimento Local
39
+
40
+ ```bash
41
+ # Clonar repositΓ³rio
42
+ git clone https://github.com/BeMonkAI/atendentepro.git
43
+ cd atendentepro
44
+
45
+ # Criar ambiente virtual
46
+ python -m venv venv
47
+ source venv/bin/activate # Linux/Mac
48
+ # ou: venv\Scripts\activate # Windows
49
+
50
+ # Instalar em modo editable
51
+ pip install -e .
52
+
53
+ # Com dependΓͺncias de desenvolvimento
54
+ pip install -e ".[dev]"
55
+ ```
56
+
57
+ ---
58
+
59
+ ## πŸ”‘ AtivaΓ§Γ£o (LicenΓ§a)
60
+
61
+ A biblioteca **requer um token de licenΓ§a** para funcionar.
62
+
63
+ ### OpΓ§Γ£o 1: VariΓ‘vel de Ambiente (Recomendado)
64
+
65
+ ```bash
66
+ export ATENDENTEPRO_LICENSE_KEY="ATP_seu-token-aqui"
67
+ ```
68
+
69
+ ### OpΓ§Γ£o 2: Via CΓ³digo
70
+
71
+ ```python
72
+ from atendentepro import activate
73
+
74
+ activate("ATP_seu-token-aqui")
75
+ ```
76
+
77
+ ### OpΓ§Γ£o 3: Arquivo .env
78
+
79
+ ```env
80
+ ATENDENTEPRO_LICENSE_KEY=ATP_seu-token-aqui
81
+ OPENAI_API_KEY=sk-sua-chave-openai
82
+ ```
83
+
84
+ ### Obter um Token
85
+
86
+ Entre em contato para obter seu token:
87
+ - πŸ“§ **Email:** contato@bemonkai.com
88
+ - 🌐 **Site:** https://bemonkai.com
89
+
90
+ ---
91
+
92
+ ## ⚑ Início RÑpido
93
+
94
+ ```python
95
+ import asyncio
96
+ from pathlib import Path
97
+ from atendentepro import activate, create_standard_network
98
+ from agents import Runner
99
+
100
+ # 1. Ativar (ou use variΓ‘vel de ambiente)
101
+ activate("ATP_seu-token")
102
+
103
+ async def main():
104
+ # 2. Criar rede de agentes
105
+ network = create_standard_network(
106
+ templates_root=Path("./client_templates"),
107
+ client="standard"
108
+ )
109
+
110
+ # 3. Executar conversa
111
+ result = await Runner.run(
112
+ network.triage,
113
+ [{"role": "user", "content": "OlΓ‘, preciso de ajuda"}]
114
+ )
115
+
116
+ print(result.final_output)
117
+
118
+ asyncio.run(main())
119
+ ```
120
+
121
+ ---
122
+
123
+ ## πŸ—οΈ Arquitetura
124
+
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
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
154
+ ```
155
+
156
+ ---
157
+
158
+ ## πŸ€– Agentes
159
+
160
+ | Agente | DescriΓ§Γ£o |
161
+ |--------|-----------|
162
+ | **Triage** | Classifica intenΓ§Γ£o e direciona para agente especializado |
163
+ | **Flow** | Apresenta opΓ§Γ΅es/menu ao usuΓ‘rio |
164
+ | **Interview** | Coleta informaΓ§Γ΅es atravΓ©s de perguntas |
165
+ | **Answer** | Sintetiza resposta final |
166
+ | **Knowledge** | Consulta RAG e dados estruturados |
167
+ | **Confirmation** | Valida com respostas sim/nΓ£o |
168
+ | **Usage** | Responde dΓΊvidas sobre o sistema |
169
+ | **Onboarding** | Cadastro de novos usuΓ‘rios |
170
+
171
+ ---
172
+
173
+ ## πŸ“ Templates
174
+
175
+ Templates sΓ£o configuraΓ§Γ΅es YAML que personalizam o comportamento dos agentes:
176
+
177
+ ```
178
+ client_templates/
179
+ β”œβ”€β”€ standard/ # Template base
180
+ β”‚ β”œβ”€β”€ triage_config.yaml
181
+ β”‚ β”œβ”€β”€ flow_config.yaml
182
+ β”‚ β”œβ”€β”€ interview_config.yaml
183
+ β”‚ └── ...
184
+ └── meu_cliente/ # Template customizado
185
+ β”œβ”€β”€ triage_config.yaml
186
+ β”œβ”€β”€ tools.py # Tools customizadas
187
+ └── network.py # Rede especΓ­fica
188
+ ```
189
+
190
+ Veja a [documentaΓ§Γ£o completa](atendentepro/README.md) para criar templates.
191
+
192
+ ---
193
+
194
+ ## πŸ“š DocumentaΓ§Γ£o
195
+
196
+ - [πŸ“– DocumentaΓ§Γ£o da Biblioteca](atendentepro/README.md)
197
+ - [πŸ“Š Fluxogramas](docs/fluxogramas/)
198
+ - [πŸ’‘ Exemplos](examples/)
199
+ - [πŸ“ Changelog](CHANGELOG.md)
200
+
201
+ ---
202
+
203
+ ## πŸ”§ DependΓͺncias
204
+
205
+ - Python 3.9+
206
+ - openai-agents >= 0.3.3
207
+ - openai >= 1.107.1
208
+ - pydantic >= 2.0.0
209
+ - PyYAML >= 6.0
210
+ - python-dotenv >= 1.0.0
211
+
212
+ ---
213
+
214
+ ## πŸ› οΈ Desenvolvimento
215
+
216
+ ```bash
217
+ # Instalar dependΓͺncias de desenvolvimento
218
+ pip install -e ".[dev]"
219
+
220
+ # Rodar testes
221
+ pytest
222
+
223
+ # Formatar cΓ³digo
224
+ black atendentepro
225
+ isort atendentepro
226
+
227
+ # Type checking
228
+ mypy atendentepro
229
+ ```
230
+
231
+ ---
232
+
233
+ ## πŸ“„ LicenΓ§a
234
+
235
+ Este software Γ© **proprietΓ‘rio** e requer uma licenΓ§a vΓ‘lida para uso.
236
+
237
+ Veja o arquivo [LICENSE](LICENSE) para mais detalhes.
238
+
239
+ ---
240
+
241
+ ## 🀝 Suporte
242
+
243
+ - πŸ“§ **Email:** contato@bemonkai.com
244
+ - 🌐 **Site:** https://bemonkai.com
245
+ - πŸ› **Issues:** https://github.com/BeMonkAI/atendentepro/issues
246
+
247
+ ---
248
+
249
+ **Made with ❀️ by BeMonkAI**
250
+