agent-corex 1.0.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 (39) hide show
  1. agent_corex-1.0.0/CONTRIBUTING.md +278 -0
  2. agent_corex-1.0.0/LICENSE +21 -0
  3. agent_corex-1.0.0/MANIFEST.in +11 -0
  4. agent_corex-1.0.0/PKG-INFO +511 -0
  5. agent_corex-1.0.0/README.md +463 -0
  6. agent_corex-1.0.0/RELEASE_NOTES.md +331 -0
  7. agent_corex-1.0.0/agent_core/__init__.py +19 -0
  8. agent_corex-1.0.0/agent_core/api/__init__.py +1 -0
  9. agent_corex-1.0.0/agent_core/api/main.py +46 -0
  10. agent_corex-1.0.0/agent_core/cli/__init__.py +1 -0
  11. agent_corex-1.0.0/agent_core/cli/main.py +164 -0
  12. agent_corex-1.0.0/agent_core/retrieval/__init__.py +0 -0
  13. agent_corex-1.0.0/agent_core/retrieval/embeddings.py +118 -0
  14. agent_corex-1.0.0/agent_core/retrieval/hybrid_scorer.py +105 -0
  15. agent_corex-1.0.0/agent_core/retrieval/ranker.py +96 -0
  16. agent_corex-1.0.0/agent_core/retrieval/scorer.py +18 -0
  17. agent_corex-1.0.0/agent_core/tools/__init__.py +0 -0
  18. agent_corex-1.0.0/agent_core/tools/base_tool.py +10 -0
  19. agent_corex-1.0.0/agent_core/tools/mcp/__init__.py +0 -0
  20. agent_corex-1.0.0/agent_core/tools/mcp/mcp_client.py +134 -0
  21. agent_corex-1.0.0/agent_core/tools/mcp/mcp_loader.py +40 -0
  22. agent_corex-1.0.0/agent_core/tools/mcp/mcp_manager.py +28 -0
  23. agent_corex-1.0.0/agent_core/tools/registry.py +9 -0
  24. agent_corex-1.0.0/agent_corex.egg-info/PKG-INFO +511 -0
  25. agent_corex-1.0.0/agent_corex.egg-info/SOURCES.txt +37 -0
  26. agent_corex-1.0.0/agent_corex.egg-info/dependency_links.txt +1 -0
  27. agent_corex-1.0.0/agent_corex.egg-info/entry_points.txt +2 -0
  28. agent_corex-1.0.0/agent_corex.egg-info/requires.txt +20 -0
  29. agent_corex-1.0.0/agent_corex.egg-info/top_level.txt +1 -0
  30. agent_corex-1.0.0/config/mcp.json +56 -0
  31. agent_corex-1.0.0/examples/basic_usage.py +76 -0
  32. agent_corex-1.0.0/pyproject.toml +121 -0
  33. agent_corex-1.0.0/requirements.txt +9 -0
  34. agent_corex-1.0.0/setup.cfg +4 -0
  35. agent_corex-1.0.0/setup.py +11 -0
  36. agent_corex-1.0.0/tests/__init__.py +0 -0
  37. agent_corex-1.0.0/tests/test_api.py +79 -0
  38. agent_corex-1.0.0/tests/test_mcp.py +124 -0
  39. agent_corex-1.0.0/tests/test_retrieval.py +253 -0
@@ -0,0 +1,278 @@
1
+ # Contributing to Agent-Core
2
+
3
+ Thank you for your interest in contributing to Agent-Core! This document provides guidelines and instructions for contributing.
4
+
5
+ ## Getting Started
6
+
7
+ ### Prerequisites
8
+
9
+ - Python 3.8 or higher
10
+ - pip or conda
11
+
12
+ ### Setup Development Environment
13
+
14
+ ```bash
15
+ # Clone the repository
16
+ git clone https://github.com/your-org/agent-corex.git
17
+ cd agent-corex
18
+
19
+ # Create virtual environment
20
+ python -m venv venv
21
+
22
+ # Activate virtual environment
23
+ # On macOS/Linux:
24
+ source venv/bin/activate
25
+ # On Windows:
26
+ venv\Scripts\activate
27
+
28
+ # Install dependencies
29
+ pip install -r requirements.txt
30
+
31
+ # Install development dependencies (optional)
32
+ pip install pytest pytest-cov black flake8
33
+ ```
34
+
35
+ ## Development Workflow
36
+
37
+ ### 1. Create a Branch
38
+
39
+ ```bash
40
+ git checkout -b feature/your-feature-name
41
+ ```
42
+
43
+ ### 2. Make Changes
44
+
45
+ Write your code and ensure it follows the project's style guide.
46
+
47
+ ### 3. Test Your Changes
48
+
49
+ ```bash
50
+ # Run all tests
51
+ pytest tests/
52
+
53
+ # Run specific test file
54
+ pytest tests/test_retrieval.py -v
55
+
56
+ # Run with coverage
57
+ pytest tests/ --cov=packages
58
+ ```
59
+
60
+ ### 4. Code Style
61
+
62
+ ```bash
63
+ # Format code with black
64
+ black packages/ apps/ tests/
65
+
66
+ # Check linting
67
+ flake8 packages/ apps/ tests/
68
+ ```
69
+
70
+ ### 5. Commit Changes
71
+
72
+ ```bash
73
+ git add .
74
+ git commit -m "Add feature: descriptive commit message"
75
+ ```
76
+
77
+ ### 6. Push and Create Pull Request
78
+
79
+ ```bash
80
+ git push origin feature/your-feature-name
81
+ ```
82
+
83
+ Then create a pull request on GitHub.
84
+
85
+ ## Contribution Guidelines
86
+
87
+ ### Code Style
88
+
89
+ - **Language**: Python 3.8+
90
+ - **Formatter**: Black
91
+ - **Linter**: Flake8
92
+ - **Docstrings**: Google-style docstrings
93
+
94
+ ### Commit Messages
95
+
96
+ Use clear, descriptive commit messages:
97
+
98
+ ```
99
+ Add hybrid ranking method
100
+
101
+ - Combines keyword and embedding scoring
102
+ - Includes fallback to keyword-only if model unavailable
103
+ - Adds comprehensive tests
104
+
105
+ Fixes #123
106
+ ```
107
+
108
+ ### Pull Request Guidelines
109
+
110
+ 1. **Title**: Clear, descriptive title
111
+ 2. **Description**: Explain what and why
112
+ 3. **Tests**: Include tests for new functionality
113
+ 4. **Documentation**: Update README if needed
114
+ 5. **No Breaking Changes**: Maintain backward compatibility
115
+
116
+ ### Testing Requirements
117
+
118
+ - All new features must have tests
119
+ - Minimum 80% code coverage
120
+ - Tests should cover edge cases
121
+ - Use descriptive test names
122
+
123
+ Example test:
124
+
125
+ ```python
126
+ def test_hybrid_ranking_finds_semantic_matches(self):
127
+ """Verify that hybrid ranking catches semantically related tools."""
128
+ results = rank_tools("modify file", tools, method="hybrid")
129
+ assert len(results) > 0
130
+ # Should find edit_file even though "modify" != "edit"
131
+ ```
132
+
133
+ ## Areas for Contribution
134
+
135
+ ### High Priority
136
+
137
+ - [ ] Fine-tuned embedding models for specific domains
138
+ - [ ] Performance optimizations
139
+ - [ ] Documentation improvements
140
+ - [ ] Bug fixes
141
+
142
+ ### Medium Priority
143
+
144
+ - [ ] Cross-lingual semantic search
145
+ - [ ] Tool usage frequency weighting
146
+ - [ ] Caching layer
147
+ - [ ] Tool discovery UI
148
+
149
+ ### Lower Priority
150
+
151
+ - [ ] Custom model selection
152
+ - [ ] Advanced filtering
153
+ - [ ] Analytics dashboard
154
+ - [ ] Integration examples
155
+
156
+ ## Reporting Issues
157
+
158
+ ### Bug Reports
159
+
160
+ Include:
161
+ - Python version
162
+ - Environment (OS, hardware)
163
+ - Steps to reproduce
164
+ - Expected behavior
165
+ - Actual behavior
166
+ - Error messages/logs
167
+
168
+ ### Feature Requests
169
+
170
+ Include:
171
+ - Use case/motivation
172
+ - Proposed solution
173
+ - Alternatives considered
174
+ - Potential impact
175
+
176
+ ## Code Review Process
177
+
178
+ 1. **Automated Checks**: Tests and linting must pass
179
+ 2. **Code Review**: At least one maintainer review
180
+ 3. **Feedback**: Address review comments
181
+ 4. **Merge**: Squash and merge to main
182
+
183
+ ## Development Tips
184
+
185
+ ### Debugging
186
+
187
+ ```python
188
+ # Add debug output
189
+ import logging
190
+ logging.basicConfig(level=logging.DEBUG)
191
+
192
+ # Or use print statements
193
+ print(f"Debug: {variable}")
194
+ ```
195
+
196
+ ### Performance Testing
197
+
198
+ ```python
199
+ import time
200
+
201
+ start = time.time()
202
+ # code to test
203
+ end = time.time()
204
+ print(f"Time: {end - start:.4f}s")
205
+ ```
206
+
207
+ ### Memory Profiling
208
+
209
+ ```bash
210
+ pip install memory-profiler
211
+ python -m memory_profiler script.py
212
+ ```
213
+
214
+ ## Common Tasks
215
+
216
+ ### Adding a New Ranking Method
217
+
218
+ 1. Create method in `ranker.py`
219
+ 2. Add tests in `test_retrieval.py`
220
+ 3. Document in README
221
+ 4. Update API if needed
222
+
223
+ ### Adding a New Tool Type
224
+
225
+ 1. Extend `ToolRegistry` or create new class
226
+ 2. Add corresponding tests
227
+ 3. Update documentation
228
+ 4. Add integration tests
229
+
230
+ ### Updating Dependencies
231
+
232
+ ```bash
233
+ # Check outdated packages
234
+ pip list --outdated
235
+
236
+ # Update requirements.txt
237
+ pip freeze > requirements.txt
238
+
239
+ # Test with new versions
240
+ pytest tests/
241
+ ```
242
+
243
+ ## Release Process
244
+
245
+ Releases are managed by maintainers:
246
+
247
+ 1. Update version in `setup.py`
248
+ 2. Update CHANGELOG
249
+ 3. Create release commit
250
+ 4. Tag with version
251
+ 5. Push to GitHub
252
+ 6. Create GitHub release
253
+
254
+ ## Getting Help
255
+
256
+ - **Issues**: Ask questions in issue tracker
257
+ - **Discussions**: Use GitHub discussions
258
+ - **Email**: Contact maintainers directly
259
+
260
+ ## Code of Conduct
261
+
262
+ - Be respectful and inclusive
263
+ - No harassment or discrimination
264
+ - Constructive feedback only
265
+ - Help others learn and grow
266
+
267
+ ## License
268
+
269
+ By contributing, you agree that your contributions will be licensed under the MIT License.
270
+
271
+ ## Recognition
272
+
273
+ Contributors will be recognized in:
274
+ - CONTRIBUTORS.md file
275
+ - Release notes
276
+ - GitHub acknowledgments
277
+
278
+ Thank you for contributing to Agent-Core!
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Agent-Core Contributors
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.
@@ -0,0 +1,11 @@
1
+ include README.md
2
+ include LICENSE
3
+ include RELEASE_NOTES.md
4
+ include CONTRIBUTING.md
5
+ include requirements.txt
6
+ include pyproject.toml
7
+ recursive-include agent_core *.py
8
+ recursive-include tests *.py
9
+ recursive-include config *.json
10
+ recursive-include examples *.py
11
+ recursive-include docs *.md