acgp 0.1.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 (36) hide show
  1. acgp-0.1.0/.gitignore +80 -0
  2. acgp-0.1.0/CHANGELOG.md +80 -0
  3. acgp-0.1.0/LICENSE +21 -0
  4. acgp-0.1.0/PKG-INFO +597 -0
  5. acgp-0.1.0/README.md +545 -0
  6. acgp-0.1.0/acgp/__init__.py +75 -0
  7. acgp-0.1.0/acgp/adapters/__init__.py +13 -0
  8. acgp-0.1.0/acgp/adapters/crewai.py +400 -0
  9. acgp-0.1.0/acgp/adapters/generic.py +406 -0
  10. acgp-0.1.0/acgp/client.py +825 -0
  11. acgp-0.1.0/acgp/config.py +132 -0
  12. acgp-0.1.0/acgp/models/__init__.py +22 -0
  13. acgp-0.1.0/acgp/models/data_models.py +536 -0
  14. acgp-0.1.0/acgp/py.typed +0 -0
  15. acgp-0.1.0/acgp/transport/__init__.py +24 -0
  16. acgp-0.1.0/acgp/transport/async_queue.py +247 -0
  17. acgp-0.1.0/acgp/transport/batch_sender.py +210 -0
  18. acgp-0.1.0/acgp/transport/retry.py +266 -0
  19. acgp-0.1.0/acgp/transport/sse_client.py +292 -0
  20. acgp-0.1.0/acgp/utils/__init__.py +16 -0
  21. acgp-0.1.0/acgp/utils/observer_interface.py +263 -0
  22. acgp-0.1.0/acgp/wrapper/__init__.py +18 -0
  23. acgp-0.1.0/acgp/wrapper/agent_protocol.py +365 -0
  24. acgp-0.1.0/acgp/wrapper/agent_wrapper.py +531 -0
  25. acgp-0.1.0/acgp/wrapper/decorator.py +354 -0
  26. acgp-0.1.0/docs/api-reference.md +425 -0
  27. acgp-0.1.0/docs/best-practices.md +391 -0
  28. acgp-0.1.0/docs/configuration.md +262 -0
  29. acgp-0.1.0/docs/frameworks.md +313 -0
  30. acgp-0.1.0/docs/index.md +71 -0
  31. acgp-0.1.0/docs/plans/CURRENT_STATE_ANALYSIS.md +109 -0
  32. acgp-0.1.0/docs/plans/MASTER_PROJECT_PLAN.md +147 -0
  33. acgp-0.1.0/docs/plans/SDK_IMPLEMENTATION_PLAN.md +216 -0
  34. acgp-0.1.0/docs/quickstart.md +107 -0
  35. acgp-0.1.0/docs/troubleshooting.md +410 -0
  36. acgp-0.1.0/pyproject.toml +120 -0
acgp-0.1.0/.gitignore ADDED
@@ -0,0 +1,80 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ .coverage
40
+ .coverage.*
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+ *.cover
45
+ *.py,cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Environments
54
+ .env
55
+ .venv
56
+ env/
57
+ venv/
58
+ ENV/
59
+ env.bak/
60
+ venv.bak/
61
+
62
+ # IDEs
63
+ .idea/
64
+ .vscode/
65
+ *.swp
66
+ *.swo
67
+ *~
68
+
69
+ # mypy
70
+ .mypy_cache/
71
+ .dmypy.json
72
+ dmypy.json
73
+
74
+ # Ruff
75
+ .ruff_cache/
76
+
77
+ # OS
78
+ .DS_Store
79
+ Thumbs.db
80
+ local-docs/
@@ -0,0 +1,80 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project 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.1.0] - 2025-01-04
9
+
10
+ ### Changed
11
+
12
+ - **Package Renamed**: Renamed from `cgp-sdk` to `acgp` (Agentic Cognitive Governance Protocol)
13
+ - Package import changed from `cgp_sdk` to `acgp`
14
+ - `CGPClient` renamed to `ACGPClient`
15
+ - `CGPConfig` renamed to `ACGPConfig`
16
+ - `@cgp_trace` decorator renamed to `@acgp_trace`
17
+ - Environment variables prefix changed from `CGP_` to `ACGP_`
18
+
19
+ ### Added
20
+
21
+ - **Real-time SSE Feedback**: Stream feedback from Steward Agent backend via Server-Sent Events
22
+ - `on_feedback` callback parameter for real-time feedback handling
23
+ - `SSEConfig` class for customizing SSE behavior
24
+ - Auto-reconnection with exponential backoff
25
+ - Background thread processing
26
+
27
+ - **Core Tracing API**:
28
+ - `ACGPClient` - Main client class for agent oversight integration
29
+ - `trace()` context manager for wrapping agent execution
30
+ - `capture_trace()` for manual trace submission
31
+ - `TraceContext` with `set_output()`, `set_reasoning()`, `add_context()`, `set_documents()`
32
+
33
+ - **Batch Processing**:
34
+ - Automatic batching with configurable `batch_size` and `flush_interval`
35
+ - Background flush thread for non-blocking trace submission
36
+ - `flush()` method for immediate trace submission
37
+ - `on_flush_complete` callback for batch results
38
+
39
+ - **Feedback Retrieval**:
40
+ - `wait_for_feedback()` with auto-flush and configurable timeout
41
+ - `get_score()` for CTQ score retrieval with retry
42
+ - `get_feedback()` for oversight feedback retrieval
43
+ - `get_metrics()` for SDK statistics
44
+
45
+ - **Configuration**:
46
+ - Environment variable support (`ACGP_API_KEY`, `ACGP_ENDPOINT`, etc.)
47
+ - `.env` file auto-loading via python-dotenv
48
+ - `enabled` flag for disabling SDK in specific environments
49
+ - `fail_silently` mode for production resilience
50
+ - `debug` mode for troubleshooting
51
+
52
+ - **Decorator Support**:
53
+ - `@acgp_trace` decorator for function-based agents
54
+
55
+ - **Documentation**:
56
+ - Comprehensive README with quick start and examples
57
+ - API reference documentation
58
+ - Framework integration guides (CrewAI, LangChain, AutoGen, GPT-Researcher)
59
+ - Configuration guide
60
+ - Best practices
61
+ - Troubleshooting guide
62
+
63
+ ### Framework Integrations
64
+
65
+ - CrewAI integration example
66
+ - LangChain / LangGraph integration example
67
+ - AutoGen integration example
68
+ - GPT-Researcher integration example
69
+ - OpenAI Assistants API integration example
70
+ - Custom agent integration patterns
71
+
72
+ ## [Unreleased]
73
+
74
+ ### Planned
75
+
76
+ - Async/await support for async agent frameworks
77
+ - OpenTelemetry integration for distributed tracing
78
+ - Prometheus metrics export
79
+ - Rate limiting and circuit breaker patterns
80
+ - Multi-tenant support improvements
acgp-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 MeaningStack (https://meaningstack.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.