agentic-swarm 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.
- agentic_swarm-0.1.0/.agentic_swarm_demo/demo_documents_ingested.json +1 -0
- agentic_swarm-0.1.0/.agentic_swarm_demo/demo_last_query.json +1 -0
- agentic_swarm-0.1.0/.agentic_swarm_demo/demo_session_id.json +1 -0
- agentic_swarm-0.1.0/.github/CODE_OF_CONDUCT.md +57 -0
- agentic_swarm-0.1.0/.github/CONTRIBUTING.md +153 -0
- agentic_swarm-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
- agentic_swarm-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +35 -0
- agentic_swarm-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +44 -0
- agentic_swarm-0.1.0/.github/SECURITY.md +88 -0
- agentic_swarm-0.1.0/.github/release-please/.release-please-manifest.json +3 -0
- agentic_swarm-0.1.0/.github/release-please/release-please-config.json +15 -0
- agentic_swarm-0.1.0/.github/workflows/ci.yml +131 -0
- agentic_swarm-0.1.0/.github/workflows/dependency-review.yml +21 -0
- agentic_swarm-0.1.0/.github/workflows/release-please.yml +62 -0
- agentic_swarm-0.1.0/.github/workflows/update-badges.yml +84 -0
- agentic_swarm-0.1.0/.gitignore +79 -0
- agentic_swarm-0.1.0/CHANGELOG.md +9 -0
- agentic_swarm-0.1.0/LICENSE +201 -0
- agentic_swarm-0.1.0/PKG-INFO +287 -0
- agentic_swarm-0.1.0/README.md +226 -0
- agentic_swarm-0.1.0/agentic_swarm/__init__.py +26 -0
- agentic_swarm-0.1.0/agentic_swarm/agent.py +507 -0
- agentic_swarm-0.1.0/agentic_swarm/communication/__init__.py +6 -0
- agentic_swarm-0.1.0/agentic_swarm/communication/bus.py +88 -0
- agentic_swarm-0.1.0/agentic_swarm/communication/channel.py +70 -0
- agentic_swarm-0.1.0/agentic_swarm/communication/protocols.py +54 -0
- agentic_swarm-0.1.0/agentic_swarm/communication/router.py +75 -0
- agentic_swarm-0.1.0/agentic_swarm/compliance/__init__.py +12 -0
- agentic_swarm-0.1.0/agentic_swarm/compliance/access.py +81 -0
- agentic_swarm-0.1.0/agentic_swarm/compliance/audit.py +141 -0
- agentic_swarm-0.1.0/agentic_swarm/compliance/encryption.py +83 -0
- agentic_swarm-0.1.0/agentic_swarm/compliance/isolation.py +114 -0
- agentic_swarm-0.1.0/agentic_swarm/core/__init__.py +63 -0
- agentic_swarm-0.1.0/agentic_swarm/core/config.py +235 -0
- agentic_swarm-0.1.0/agentic_swarm/core/exceptions.py +214 -0
- agentic_swarm-0.1.0/agentic_swarm/core/registry.py +72 -0
- agentic_swarm-0.1.0/agentic_swarm/core/types.py +49 -0
- agentic_swarm-0.1.0/agentic_swarm/integrations/__init__.py +30 -0
- agentic_swarm-0.1.0/agentic_swarm/integrations/iii_bridge.py +508 -0
- agentic_swarm-0.1.0/agentic_swarm/lifecycle/__init__.py +16 -0
- agentic_swarm-0.1.0/agentic_swarm/lifecycle/healer.py +91 -0
- agentic_swarm-0.1.0/agentic_swarm/lifecycle/sandbox.py +81 -0
- agentic_swarm-0.1.0/agentic_swarm/lifecycle/spawner.py +74 -0
- agentic_swarm-0.1.0/agentic_swarm/lifecycle/supervisor.py +128 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/__init__.py +34 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/base.py +65 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/cache.py +294 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/classifier.py +102 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/context_compressor.py +138 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/__init__.py +17 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/anthropic.py +164 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/bedrock.py +236 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/gemini.py +214 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/groq.py +124 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/ollama.py +123 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/openai.py +124 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/providers/vllm.py +130 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/router.py +243 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/strategies/__init__.py +5 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/strategies/cost_optimized.py +36 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/strategies/quality_optimized.py +65 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/strategies/speed_optimized.py +53 -0
- agentic_swarm-0.1.0/agentic_swarm/llm/token_manager.py +142 -0
- agentic_swarm-0.1.0/agentic_swarm/memory/__init__.py +17 -0
- agentic_swarm-0.1.0/agentic_swarm/memory/archival_memory.py +142 -0
- agentic_swarm-0.1.0/agentic_swarm/memory/base.py +29 -0
- agentic_swarm-0.1.0/agentic_swarm/memory/controller.py +241 -0
- agentic_swarm-0.1.0/agentic_swarm/memory/core_memory.py +62 -0
- agentic_swarm-0.1.0/agentic_swarm/memory/recall_memory.py +88 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/__init__.py +22 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/chunker.py +338 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/embedder.py +113 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/pipeline.py +283 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/query_engine.py +210 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/reranker.py +139 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/retriever.py +280 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/sources/__init__.py +9 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/sources/api.py +93 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/sources/base.py +34 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/sources/file.py +56 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/sources/github.py +82 -0
- agentic_swarm-0.1.0/agentic_swarm/rag/sources/web.py +62 -0
- agentic_swarm-0.1.0/agentic_swarm/storage/__init__.py +5 -0
- agentic_swarm-0.1.0/agentic_swarm/storage/base.py +52 -0
- agentic_swarm-0.1.0/agentic_swarm/storage/local.py +81 -0
- agentic_swarm-0.1.0/agentic_swarm/storage/redis.py +86 -0
- agentic_swarm-0.1.0/agentic_swarm/swarm.py +319 -0
- agentic_swarm-0.1.0/agentic_swarm/tool.py +14 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/__init__.py +8 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/base.py +86 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/builtin/__init__.py +31 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/builtin/agent_management.py +67 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/builtin/code_execution.py +69 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/builtin/filesystem.py +59 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/builtin/memory.py +44 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/builtin/web.py +98 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/discovery.py +502 -0
- agentic_swarm-0.1.0/agentic_swarm/tools/registry.py +27 -0
- agentic_swarm-0.1.0/agentic_swarm/utils/__init__.py +21 -0
- agentic_swarm-0.1.0/agentic_swarm/utils/crypto.py +26 -0
- agentic_swarm-0.1.0/agentic_swarm/utils/serialization.py +36 -0
- agentic_swarm-0.1.0/agentic_swarm/utils/validation.py +37 -0
- agentic_swarm-0.1.0/agentic_swarm/vectordb/__init__.py +4 -0
- agentic_swarm-0.1.0/agentic_swarm/vectordb/base.py +56 -0
- agentic_swarm-0.1.0/agentic_swarm/vectordb/qdrant.py +239 -0
- agentic_swarm-0.1.0/assets/banner.png +0 -0
- agentic_swarm-0.1.0/assets/logo.png +0 -0
- agentic_swarm-0.1.0/docs/ARCHITECTURE.md +1086 -0
- agentic_swarm-0.1.0/docs/CHANGELOG.md +137 -0
- agentic_swarm-0.1.0/docs/api-reference.md +380 -0
- agentic_swarm-0.1.0/docs/configuration.md +195 -0
- agentic_swarm-0.1.0/docs/examples.md +72 -0
- agentic_swarm-0.1.0/docs/getting-started.md +120 -0
- agentic_swarm-0.1.0/docs/index.md +22 -0
- agentic_swarm-0.1.0/examples/agent_collaboration.py +228 -0
- agentic_swarm-0.1.0/examples/agent_collaboration_bedrock.py +290 -0
- agentic_swarm-0.1.0/examples/auto_tools.py +187 -0
- agentic_swarm-0.1.0/examples/communication.py +60 -0
- agentic_swarm-0.1.0/examples/compliance.py +91 -0
- agentic_swarm-0.1.0/examples/configuration.py +109 -0
- agentic_swarm-0.1.0/examples/custom_tools.py +454 -0
- agentic_swarm-0.1.0/examples/full_showcase.py +624 -0
- agentic_swarm-0.1.0/examples/full_showcase_bedrock.py +506 -0
- agentic_swarm-0.1.0/examples/iii_integration.py +506 -0
- agentic_swarm-0.1.0/examples/immortal_swarm_bedrock.py +369 -0
- agentic_swarm-0.1.0/examples/lifecycle.py +126 -0
- agentic_swarm-0.1.0/examples/llm_router.py +69 -0
- agentic_swarm-0.1.0/examples/memory_usage.py +62 -0
- agentic_swarm-0.1.0/examples/multi_agent_swarm.py +83 -0
- agentic_swarm-0.1.0/examples/never_forget_memory.py +346 -0
- agentic_swarm-0.1.0/examples/rag_memory_context.py +406 -0
- agentic_swarm-0.1.0/examples/rag_pipeline.py +88 -0
- agentic_swarm-0.1.0/examples/rag_sources.py +66 -0
- agentic_swarm-0.1.0/examples/registry.py +54 -0
- agentic_swarm-0.1.0/examples/sandbox_isolation.py +276 -0
- agentic_swarm-0.1.0/examples/simple_agent.py +55 -0
- agentic_swarm-0.1.0/examples/storage_example.py +65 -0
- agentic_swarm-0.1.0/examples/sub_agent_spawning.py +68 -0
- agentic_swarm-0.1.0/examples/utilities.py +80 -0
- agentic_swarm-0.1.0/examples/vectordb_persistent.py +442 -0
- agentic_swarm-0.1.0/pyproject.toml +131 -0
- agentic_swarm-0.1.0/tests/__init__.py +0 -0
- agentic_swarm-0.1.0/tests/test_access_control.py +123 -0
- agentic_swarm-0.1.0/tests/test_agent.py +99 -0
- agentic_swarm-0.1.0/tests/test_archival_memory.py +122 -0
- agentic_swarm-0.1.0/tests/test_bm25.py +94 -0
- agentic_swarm-0.1.0/tests/test_cache.py +189 -0
- agentic_swarm-0.1.0/tests/test_chunker.py +53 -0
- agentic_swarm-0.1.0/tests/test_classifier.py +46 -0
- agentic_swarm-0.1.0/tests/test_code_chunker.py +132 -0
- agentic_swarm-0.1.0/tests/test_communication.py +321 -0
- agentic_swarm-0.1.0/tests/test_compliance.py +112 -0
- agentic_swarm-0.1.0/tests/test_compressor.py +64 -0
- agentic_swarm-0.1.0/tests/test_isolation.py +207 -0
- agentic_swarm-0.1.0/tests/test_lifecycle.py +115 -0
- agentic_swarm-0.1.0/tests/test_memory.py +104 -0
- agentic_swarm-0.1.0/tests/test_query_engine.py +135 -0
- agentic_swarm-0.1.0/tests/test_rag_pipeline.py +62 -0
- agentic_swarm-0.1.0/tests/test_rag_sources.py +115 -0
- agentic_swarm-0.1.0/tests/test_registry.py +95 -0
- agentic_swarm-0.1.0/tests/test_reranker.py +100 -0
- agentic_swarm-0.1.0/tests/test_retriever.py +54 -0
- agentic_swarm-0.1.0/tests/test_router.py +76 -0
- agentic_swarm-0.1.0/tests/test_spawning_e2e.py +288 -0
- agentic_swarm-0.1.0/tests/test_storage.py +133 -0
- agentic_swarm-0.1.0/tests/test_strategies.py +134 -0
- agentic_swarm-0.1.0/tests/test_swarm.py +93 -0
- agentic_swarm-0.1.0/tests/test_token_manager.py +81 -0
- agentic_swarm-0.1.0/tests/test_tool.py +77 -0
- agentic_swarm-0.1.0/tests/test_tool_discovery.py +340 -0
- agentic_swarm-0.1.0/tests/test_utils.py +147 -0
- agentic_swarm-0.1.0/tests/test_vectordb.py +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"key": "demo:documents_ingested", "value": {"value": 5, "type": "int"}, "ttl": null, "created_at": 1779473500.053659}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"key": "demo:last_query", "value": {"value": "multi-agent systems", "type": "str"}, "ttl": null, "created_at": 1779473500.053344}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"key": "demo:session_id", "value": {"value": "demo_001", "type": "str"}, "ttl": null, "created_at": 1779473500.0537841}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment:
|
|
18
|
+
|
|
19
|
+
* Using welcoming and inclusive language
|
|
20
|
+
* Being respectful of differing viewpoints and experiences
|
|
21
|
+
* Gracefully accepting constructive criticism
|
|
22
|
+
* Focusing on what is best for the community
|
|
23
|
+
* Showing empathy towards other community members
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior:
|
|
26
|
+
|
|
27
|
+
* The use of sexualized language or imagery, and sexual attention or advances
|
|
28
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
* Public or private harassment
|
|
30
|
+
* Publishing others' private information without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate
|
|
32
|
+
|
|
33
|
+
## Enforcement Responsibilities
|
|
34
|
+
|
|
35
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
36
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
37
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
38
|
+
or harmful.
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
43
|
+
an individual is officially representing the community in public spaces.
|
|
44
|
+
|
|
45
|
+
## Enforcement
|
|
46
|
+
|
|
47
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
48
|
+
reported to the community leaders responsible for enforcement at
|
|
49
|
+
[INSERT CONTACT EMAIL].
|
|
50
|
+
|
|
51
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
52
|
+
|
|
53
|
+
## Attribution
|
|
54
|
+
|
|
55
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
|
56
|
+
version 2.0, available at
|
|
57
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Contributing to Agentic Swarm
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Agentic Swarm! This document provides guidelines and instructions for contributing.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
8
|
+
|
|
9
|
+
## How to Contribute
|
|
10
|
+
|
|
11
|
+
### Reporting Issues
|
|
12
|
+
|
|
13
|
+
Before creating an issue, please:
|
|
14
|
+
|
|
15
|
+
1. **Search existing issues** to avoid duplicates
|
|
16
|
+
2. **Use the issue template** and include:
|
|
17
|
+
- Python version (`python --version`)
|
|
18
|
+
- SDK version (`pip show agentic-swarm`)
|
|
19
|
+
- Full error traceback
|
|
20
|
+
- Minimal reproducible example
|
|
21
|
+
- Expected vs actual behavior
|
|
22
|
+
|
|
23
|
+
### Submitting Pull Requests
|
|
24
|
+
|
|
25
|
+
1. **Fork** the repository
|
|
26
|
+
2. **Create a feature branch**: `git checkout -b feature/my-feature`
|
|
27
|
+
3. **Write tests** for your changes
|
|
28
|
+
4. **Ensure all tests pass**: `pytest tests/ -v`
|
|
29
|
+
5. **Lint your code**: `ruff check agentic_swarm/`
|
|
30
|
+
6. **Format your code**: `ruff format agentic_swarm/`
|
|
31
|
+
7. **Commit** with clear messages
|
|
32
|
+
8. **Push** and open a PR against `main`
|
|
33
|
+
|
|
34
|
+
### Development Setup
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Clone the repository
|
|
38
|
+
git clone https://github.com/nik0811/agentic-swarm.git
|
|
39
|
+
cd agentic-swarm
|
|
40
|
+
|
|
41
|
+
# Create virtual environment
|
|
42
|
+
python -m venv env
|
|
43
|
+
source env/bin/activate # On Windows: env\Scripts\activate
|
|
44
|
+
|
|
45
|
+
# Install in development mode with all dependencies
|
|
46
|
+
pip install -e ".[dev,all]"
|
|
47
|
+
|
|
48
|
+
# Run tests
|
|
49
|
+
pytest tests/ -v
|
|
50
|
+
|
|
51
|
+
# Run linter
|
|
52
|
+
ruff check agentic_swarm/
|
|
53
|
+
|
|
54
|
+
# Run formatter
|
|
55
|
+
ruff format agentic_swarm/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Code Style
|
|
59
|
+
|
|
60
|
+
### General Guidelines
|
|
61
|
+
|
|
62
|
+
- **Line length**: 100 characters max
|
|
63
|
+
- **Type hints**: Required for all public APIs
|
|
64
|
+
- **Docstrings**: Google style for public methods
|
|
65
|
+
- **Tests**: pytest + pytest-asyncio for async tests
|
|
66
|
+
|
|
67
|
+
### Commit Message Format
|
|
68
|
+
|
|
69
|
+
Use clear, descriptive commit messages:
|
|
70
|
+
|
|
71
|
+
| Prefix | Meaning |
|
|
72
|
+
|--------|---------|
|
|
73
|
+
| `Add:` | New feature |
|
|
74
|
+
| `Fix:` | Bug fix |
|
|
75
|
+
| `Update:` | Enhancement to existing feature |
|
|
76
|
+
| `Refactor:` | Code restructuring (no behavior change) |
|
|
77
|
+
| `Docs:` | Documentation only |
|
|
78
|
+
| `Test:` | Test additions/modifications |
|
|
79
|
+
| `Chore:` | Build, CI, or tooling changes |
|
|
80
|
+
|
|
81
|
+
Examples:
|
|
82
|
+
```
|
|
83
|
+
Add: Support for Groq LLM provider
|
|
84
|
+
Fix: Memory leak in agent spawning
|
|
85
|
+
Update: Improve RAG retrieval accuracy
|
|
86
|
+
Docs: Add configuration guide
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Code Review Process
|
|
90
|
+
|
|
91
|
+
1. All PRs require at least one approval
|
|
92
|
+
2. CI must pass (tests, lint, type check)
|
|
93
|
+
3. No decrease in test coverage
|
|
94
|
+
4. Documentation updated if needed
|
|
95
|
+
|
|
96
|
+
## Testing
|
|
97
|
+
|
|
98
|
+
### Running Tests
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Run all tests
|
|
102
|
+
pytest tests/ -v
|
|
103
|
+
|
|
104
|
+
# Run specific test file
|
|
105
|
+
pytest tests/test_agent.py -v
|
|
106
|
+
|
|
107
|
+
# Run with coverage
|
|
108
|
+
pytest tests/ --cov=agentic_swarm --cov-report=html
|
|
109
|
+
|
|
110
|
+
# Run only fast tests (skip slow integration tests)
|
|
111
|
+
pytest tests/ -v -m "not slow"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Writing Tests
|
|
115
|
+
|
|
116
|
+
- Place tests in `tests/` directory
|
|
117
|
+
- Name test files `test_*.py`
|
|
118
|
+
- Use `pytest.mark.asyncio` for async tests
|
|
119
|
+
- Mock external services (LLM APIs, databases)
|
|
120
|
+
|
|
121
|
+
Example:
|
|
122
|
+
```python
|
|
123
|
+
import pytest
|
|
124
|
+
from agentic_swarm import Agent
|
|
125
|
+
|
|
126
|
+
@pytest.mark.asyncio
|
|
127
|
+
async def test_agent_creation():
|
|
128
|
+
agent = Agent(name="test", role="tester")
|
|
129
|
+
assert agent.name == "test"
|
|
130
|
+
assert agent.role == "tester"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Documentation
|
|
134
|
+
|
|
135
|
+
- Update docstrings for any API changes
|
|
136
|
+
- Update `docs/` for new features
|
|
137
|
+
- Include code examples where helpful
|
|
138
|
+
- Keep README.md concise; detailed docs go in `docs/`
|
|
139
|
+
|
|
140
|
+
## Security
|
|
141
|
+
|
|
142
|
+
- **Never commit credentials** or API keys
|
|
143
|
+
- Use environment variables for secrets
|
|
144
|
+
- Report security vulnerabilities privately to maintainers
|
|
145
|
+
- Follow secure coding practices
|
|
146
|
+
|
|
147
|
+
## Questions?
|
|
148
|
+
|
|
149
|
+
- Open a [Discussion](https://github.com/nik0811/agentic-swarm/discussions) for questions
|
|
150
|
+
- Check existing issues and discussions first
|
|
151
|
+
- Be respectful and constructive
|
|
152
|
+
|
|
153
|
+
Thank you for contributing! 🎉
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug or unexpected behavior
|
|
4
|
+
title: "[Bug]: "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
A clear and concise description of the bug.
|
|
12
|
+
|
|
13
|
+
## Environment
|
|
14
|
+
|
|
15
|
+
- **OS**: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11]
|
|
16
|
+
- **Python version**: [e.g., 3.11.5]
|
|
17
|
+
- **agentic-swarm version**: [e.g., 1.0.0]
|
|
18
|
+
|
|
19
|
+
## Steps to Reproduce
|
|
20
|
+
|
|
21
|
+
1. Step one
|
|
22
|
+
2. Step two
|
|
23
|
+
3. ...
|
|
24
|
+
|
|
25
|
+
## Minimal Reproducible Example
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
# Paste minimal code that reproduces the issue
|
|
29
|
+
from agentic_swarm import Agent
|
|
30
|
+
|
|
31
|
+
agent = Agent(name="test", role="tester")
|
|
32
|
+
# ...
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Expected Behavior
|
|
36
|
+
|
|
37
|
+
What you expected to happen.
|
|
38
|
+
|
|
39
|
+
## Actual Behavior
|
|
40
|
+
|
|
41
|
+
What actually happened.
|
|
42
|
+
|
|
43
|
+
## Error Traceback
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Paste the full error traceback here
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Additional Context
|
|
50
|
+
|
|
51
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest a new feature or enhancement
|
|
4
|
+
title: "[Feature]: "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem Statement
|
|
10
|
+
|
|
11
|
+
A clear description of the problem you're trying to solve.
|
|
12
|
+
|
|
13
|
+
## Proposed Solution
|
|
14
|
+
|
|
15
|
+
Describe the solution you'd like.
|
|
16
|
+
|
|
17
|
+
## Example Usage
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
# How would this feature be used?
|
|
21
|
+
from agentic_swarm import Agent
|
|
22
|
+
|
|
23
|
+
agent = Agent(
|
|
24
|
+
name="test",
|
|
25
|
+
new_feature=True, # Example of new feature
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Alternatives Considered
|
|
30
|
+
|
|
31
|
+
Describe any alternative solutions or features you've considered.
|
|
32
|
+
|
|
33
|
+
## Additional Context
|
|
34
|
+
|
|
35
|
+
Add any other context, screenshots, or examples about the feature request.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
Brief description of the changes in this PR.
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change that fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change that adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Refactoring (no functional changes)
|
|
12
|
+
|
|
13
|
+
## Related Issues
|
|
14
|
+
|
|
15
|
+
Fixes #(issue number)
|
|
16
|
+
|
|
17
|
+
## Changes Made
|
|
18
|
+
|
|
19
|
+
- Change 1
|
|
20
|
+
- Change 2
|
|
21
|
+
- ...
|
|
22
|
+
|
|
23
|
+
## Testing
|
|
24
|
+
|
|
25
|
+
- [ ] I have added tests that prove my fix/feature works
|
|
26
|
+
- [ ] All new and existing tests pass (`pytest tests/ -v`)
|
|
27
|
+
- [ ] I have run the linter (`ruff check agentic_swarm/`)
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
- [ ] I have updated the documentation accordingly
|
|
32
|
+
- [ ] I have updated the CHANGELOG.md (if applicable)
|
|
33
|
+
|
|
34
|
+
## Screenshots (if applicable)
|
|
35
|
+
|
|
36
|
+
Add screenshots to help explain your changes.
|
|
37
|
+
|
|
38
|
+
## Checklist
|
|
39
|
+
|
|
40
|
+
- [ ] My code follows the project's style guidelines
|
|
41
|
+
- [ ] I have performed a self-review of my code
|
|
42
|
+
- [ ] I have commented my code where necessary
|
|
43
|
+
- [ ] My changes generate no new warnings
|
|
44
|
+
- [ ] I have checked that there are no credential leaks
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
| Version | Supported |
|
|
6
|
+
| ------- | ------------------ |
|
|
7
|
+
| 0.1.x | :white_check_mark: |
|
|
8
|
+
|
|
9
|
+
## Reporting a Vulnerability
|
|
10
|
+
|
|
11
|
+
We take security seriously. If you discover a security vulnerability, please report it responsibly.
|
|
12
|
+
|
|
13
|
+
### How to Report
|
|
14
|
+
|
|
15
|
+
1. **Do NOT** open a public GitHub issue for security vulnerabilities
|
|
16
|
+
2. Email the maintainers directly at [INSERT SECURITY EMAIL]
|
|
17
|
+
3. Include:
|
|
18
|
+
- Description of the vulnerability
|
|
19
|
+
- Steps to reproduce
|
|
20
|
+
- Potential impact
|
|
21
|
+
- Suggested fix (if any)
|
|
22
|
+
|
|
23
|
+
### What to Expect
|
|
24
|
+
|
|
25
|
+
- **Acknowledgment**: Within 48 hours
|
|
26
|
+
- **Initial Assessment**: Within 7 days
|
|
27
|
+
- **Resolution Timeline**: Depends on severity
|
|
28
|
+
- Critical: 24-48 hours
|
|
29
|
+
- High: 7 days
|
|
30
|
+
- Medium: 30 days
|
|
31
|
+
- Low: 90 days
|
|
32
|
+
|
|
33
|
+
### Security Best Practices
|
|
34
|
+
|
|
35
|
+
When using Agentic Swarm:
|
|
36
|
+
|
|
37
|
+
1. **Never commit credentials**
|
|
38
|
+
- Use environment variables for API keys
|
|
39
|
+
- Add `.env` files to `.gitignore`
|
|
40
|
+
|
|
41
|
+
2. **Use encryption for sensitive data**
|
|
42
|
+
```python
|
|
43
|
+
from agentic_swarm.compliance import Encryption
|
|
44
|
+
|
|
45
|
+
crypto = Encryption(Encryption.generate_key())
|
|
46
|
+
encrypted = crypto.encrypt("sensitive data")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
3. **Enable data isolation in production**
|
|
50
|
+
```python
|
|
51
|
+
agent = Agent(
|
|
52
|
+
name="secure_agent",
|
|
53
|
+
enable_isolation=True,
|
|
54
|
+
tenant_id="your_tenant",
|
|
55
|
+
)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
4. **Use audit logging**
|
|
59
|
+
```python
|
|
60
|
+
from agentic_swarm.compliance import AuditLogger
|
|
61
|
+
|
|
62
|
+
audit = AuditLogger(log_path="./audit.log")
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
5. **Set appropriate sandbox limits**
|
|
66
|
+
```python
|
|
67
|
+
from agentic_swarm.lifecycle import SandboxConfig
|
|
68
|
+
|
|
69
|
+
config = SandboxConfig(
|
|
70
|
+
memory_limit_mb=256,
|
|
71
|
+
timeout_seconds=30,
|
|
72
|
+
allow_network=False,
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Security Features
|
|
77
|
+
|
|
78
|
+
Agentic Swarm includes built-in security features:
|
|
79
|
+
|
|
80
|
+
- **Audit Logging**: Immutable logs with tamper-proof checksums
|
|
81
|
+
- **Encryption**: AES-256 encryption at rest with key rotation
|
|
82
|
+
- **Data Isolation**: Namespace-based agent isolation
|
|
83
|
+
- **Access Control**: Fine-grained RBAC for permissions, tools, and models
|
|
84
|
+
- **Sandbox Execution**: CPU, memory, and timeout limits
|
|
85
|
+
|
|
86
|
+
## Acknowledgments
|
|
87
|
+
|
|
88
|
+
We appreciate responsible disclosure and will acknowledge security researchers who report valid vulnerabilities.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"package-name": "agentic-swarm",
|
|
5
|
+
"changelog-path": "docs/CHANGELOG.md",
|
|
6
|
+
"release-type": "python",
|
|
7
|
+
"bump-minor-pre-major": true,
|
|
8
|
+
"bump-patch-for-minor-pre-major": true,
|
|
9
|
+
"extra-files": [
|
|
10
|
+
"agentic_swarm/__init__.py"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
15
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Cache pip dependencies
|
|
26
|
+
uses: actions/cache@v4
|
|
27
|
+
with:
|
|
28
|
+
path: ~/.cache/pip
|
|
29
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
|
|
30
|
+
restore-keys: |
|
|
31
|
+
${{ runner.os }}-pip-
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
pip install -e ".[dev]"
|
|
37
|
+
|
|
38
|
+
- name: Run tests
|
|
39
|
+
run: |
|
|
40
|
+
pytest tests/ -v --tb=short --cov=agentic_swarm --cov-report=xml
|
|
41
|
+
|
|
42
|
+
- name: Upload coverage to Codecov
|
|
43
|
+
uses: codecov/codecov-action@v4
|
|
44
|
+
if: matrix.python-version == '3.11'
|
|
45
|
+
with:
|
|
46
|
+
file: ./coverage.xml
|
|
47
|
+
fail_ci_if_error: false
|
|
48
|
+
|
|
49
|
+
lint:
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
|
|
54
|
+
- name: Set up Python
|
|
55
|
+
uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: "3.11"
|
|
58
|
+
|
|
59
|
+
- name: Install linters
|
|
60
|
+
run: |
|
|
61
|
+
python -m pip install --upgrade pip
|
|
62
|
+
pip install ruff mypy
|
|
63
|
+
|
|
64
|
+
- name: Run Ruff (linter)
|
|
65
|
+
run: ruff check agentic_swarm/ --output-format=github
|
|
66
|
+
|
|
67
|
+
- name: Run Ruff (formatter check)
|
|
68
|
+
run: ruff format agentic_swarm/ --check
|
|
69
|
+
|
|
70
|
+
type-check:
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
|
|
75
|
+
- name: Set up Python
|
|
76
|
+
uses: actions/setup-python@v5
|
|
77
|
+
with:
|
|
78
|
+
python-version: "3.11"
|
|
79
|
+
|
|
80
|
+
- name: Install dependencies
|
|
81
|
+
run: |
|
|
82
|
+
python -m pip install --upgrade pip
|
|
83
|
+
pip install -e ".[dev]"
|
|
84
|
+
pip install mypy types-redis
|
|
85
|
+
|
|
86
|
+
- name: Run mypy
|
|
87
|
+
run: mypy agentic_swarm/ --ignore-missing-imports --no-error-summary || true
|
|
88
|
+
|
|
89
|
+
security:
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v4
|
|
93
|
+
|
|
94
|
+
- name: Set up Python
|
|
95
|
+
uses: actions/setup-python@v5
|
|
96
|
+
with:
|
|
97
|
+
python-version: "3.11"
|
|
98
|
+
|
|
99
|
+
- name: Install bandit
|
|
100
|
+
run: pip install bandit[toml]
|
|
101
|
+
|
|
102
|
+
- name: Run security scan
|
|
103
|
+
run: bandit -r agentic_swarm/ -c pyproject.toml || true
|
|
104
|
+
|
|
105
|
+
build:
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
needs: [test, lint]
|
|
108
|
+
steps:
|
|
109
|
+
- uses: actions/checkout@v4
|
|
110
|
+
|
|
111
|
+
- name: Set up Python
|
|
112
|
+
uses: actions/setup-python@v5
|
|
113
|
+
with:
|
|
114
|
+
python-version: "3.11"
|
|
115
|
+
|
|
116
|
+
- name: Install build tools
|
|
117
|
+
run: |
|
|
118
|
+
python -m pip install --upgrade pip
|
|
119
|
+
pip install build twine
|
|
120
|
+
|
|
121
|
+
- name: Build package
|
|
122
|
+
run: python -m build
|
|
123
|
+
|
|
124
|
+
- name: Check package
|
|
125
|
+
run: twine check dist/*
|
|
126
|
+
|
|
127
|
+
- name: Upload build artifacts
|
|
128
|
+
uses: actions/upload-artifact@v4
|
|
129
|
+
with:
|
|
130
|
+
name: dist
|
|
131
|
+
path: dist/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Dependency Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [master]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
dependency-review:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Dependency Review
|
|
18
|
+
uses: actions/dependency-review-action@v4
|
|
19
|
+
with:
|
|
20
|
+
fail-on-severity: high
|
|
21
|
+
deny-licenses: GPL-3.0, AGPL-3.0
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release-please:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
16
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
17
|
+
version: ${{ steps.release.outputs.version }}
|
|
18
|
+
steps:
|
|
19
|
+
- name: Release Please
|
|
20
|
+
id: release
|
|
21
|
+
uses: googleapis/release-please-action@v4
|
|
22
|
+
with:
|
|
23
|
+
release-type: python
|
|
24
|
+
package-name: agentic-swarm
|
|
25
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
config-file: .github/release-please/release-please-config.json
|
|
27
|
+
manifest-file: .github/release-please/.release-please-manifest.json
|
|
28
|
+
|
|
29
|
+
publish:
|
|
30
|
+
needs: release-please
|
|
31
|
+
if: ${{ needs.release-please.outputs.release_created }}
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
environment:
|
|
34
|
+
name: pypi
|
|
35
|
+
url: https://pypi.org/p/agentic-swarm
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
with:
|
|
41
|
+
ref: ${{ needs.release-please.outputs.tag_name }}
|
|
42
|
+
|
|
43
|
+
- name: Set up Python
|
|
44
|
+
uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.11"
|
|
47
|
+
|
|
48
|
+
- name: Install build tools
|
|
49
|
+
run: |
|
|
50
|
+
python -m pip install --upgrade pip
|
|
51
|
+
pip install build twine
|
|
52
|
+
|
|
53
|
+
- name: Build package
|
|
54
|
+
run: python -m build
|
|
55
|
+
|
|
56
|
+
- name: Check package
|
|
57
|
+
run: twine check dist/*
|
|
58
|
+
|
|
59
|
+
- name: Publish to PyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
61
|
+
with:
|
|
62
|
+
skip-existing: true
|