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.
- atendentepro-0.3.0/CHANGELOG.md +57 -0
- atendentepro-0.3.0/LICENSE +25 -0
- atendentepro-0.3.0/MANIFEST.in +40 -0
- atendentepro-0.3.0/PKG-INFO +306 -0
- atendentepro-0.3.0/README.md +250 -0
- atendentepro-0.3.0/atendentepro/README.md +890 -0
- atendentepro-0.3.0/atendentepro/__init__.py +215 -0
- atendentepro-0.3.0/atendentepro/agents/__init__.py +45 -0
- atendentepro-0.3.0/atendentepro/agents/answer.py +62 -0
- atendentepro-0.3.0/atendentepro/agents/confirmation.py +69 -0
- atendentepro-0.3.0/atendentepro/agents/flow.py +64 -0
- atendentepro-0.3.0/atendentepro/agents/interview.py +68 -0
- atendentepro-0.3.0/atendentepro/agents/knowledge.py +296 -0
- atendentepro-0.3.0/atendentepro/agents/onboarding.py +65 -0
- atendentepro-0.3.0/atendentepro/agents/triage.py +57 -0
- atendentepro-0.3.0/atendentepro/agents/usage.py +56 -0
- atendentepro-0.3.0/atendentepro/config/__init__.py +19 -0
- atendentepro-0.3.0/atendentepro/config/settings.py +134 -0
- atendentepro-0.3.0/atendentepro/guardrails/__init__.py +21 -0
- atendentepro-0.3.0/atendentepro/guardrails/manager.py +419 -0
- atendentepro-0.3.0/atendentepro/license.py +502 -0
- atendentepro-0.3.0/atendentepro/models/__init__.py +21 -0
- atendentepro-0.3.0/atendentepro/models/context.py +21 -0
- atendentepro-0.3.0/atendentepro/models/outputs.py +118 -0
- atendentepro-0.3.0/atendentepro/network.py +325 -0
- atendentepro-0.3.0/atendentepro/prompts/__init__.py +35 -0
- atendentepro-0.3.0/atendentepro/prompts/answer.py +114 -0
- atendentepro-0.3.0/atendentepro/prompts/confirmation.py +124 -0
- atendentepro-0.3.0/atendentepro/prompts/flow.py +112 -0
- atendentepro-0.3.0/atendentepro/prompts/interview.py +123 -0
- atendentepro-0.3.0/atendentepro/prompts/knowledge.py +135 -0
- atendentepro-0.3.0/atendentepro/prompts/onboarding.py +146 -0
- atendentepro-0.3.0/atendentepro/prompts/triage.py +42 -0
- atendentepro-0.3.0/atendentepro/templates/__init__.py +51 -0
- atendentepro-0.3.0/atendentepro/templates/manager.py +530 -0
- atendentepro-0.3.0/atendentepro/utils/__init__.py +19 -0
- atendentepro-0.3.0/atendentepro/utils/openai_client.py +154 -0
- atendentepro-0.3.0/atendentepro/utils/tracing.py +71 -0
- atendentepro-0.3.0/atendentepro.egg-info/SOURCES.txt +40 -0
- atendentepro-0.3.0/pyproject.toml +130 -0
- atendentepro-0.3.0/requirements.txt +46 -0
- atendentepro-0.3.0/setup.cfg +4 -0
- 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
|
+
[](https://www.python.org/downloads/)
|
|
60
|
+
[](LICENSE)
|
|
61
|
+
[](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
|
+
[](https://www.python.org/downloads/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](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
|
+
|