Address PR review feedback
- Restore MCP server configurations in .mcp.json with updated paths for separate virtual environments (core/.venv and tools/.venv) - Align Python version: change .python-version from 3.13 to 3.11 to match pyproject.toml target version - Remove AGENTS.md as suggested (quickstart is sufficient) - Document cross-package imports and separate venv architecture in ENVIRONMENT_SETUP.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,14 @@
|
|||||||
{
|
{
|
||||||
"mcpServers": {}
|
"mcpServers": {
|
||||||
|
"agent-builder": {
|
||||||
|
"command": "core/.venv/bin/python",
|
||||||
|
"args": ["-m", "framework.mcp.agent_builder_server"],
|
||||||
|
"cwd": "."
|
||||||
|
},
|
||||||
|
"tools": {
|
||||||
|
"command": "tools/.venv/bin/python",
|
||||||
|
"args": ["-m", "aden_tools.mcp_server", "--stdio"],
|
||||||
|
"cwd": "."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
3.13
|
3.11
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
1. this project uses uv as the package manager. ty as the type checker and ruff as the linter.
|
|
||||||
+60
-4
@@ -325,14 +325,14 @@ The Hive framework consists of three Python packages:
|
|||||||
hive/
|
hive/
|
||||||
├── core/ # Core framework (runtime, graph executor, LLM providers)
|
├── core/ # Core framework (runtime, graph executor, LLM providers)
|
||||||
│ ├── framework/
|
│ ├── framework/
|
||||||
│ ├── pyproject.toml
|
│ ├── .venv/ # Isolated virtual environment for core
|
||||||
│ └── requirements.txt
|
│ └── pyproject.toml
|
||||||
│
|
│
|
||||||
├── tools/ # Tools and MCP servers
|
├── tools/ # Tools and MCP servers
|
||||||
│ ├── src/
|
│ ├── src/
|
||||||
│ │ └── aden_tools/ # Actual package location
|
│ │ └── aden_tools/ # Actual package location
|
||||||
│ ├── pyproject.toml
|
│ ├── .venv/ # Isolated virtual environment for tools
|
||||||
│ └── README.md
|
│ └── pyproject.toml
|
||||||
│
|
│
|
||||||
└── exports/ # Agent packages (your agents go here)
|
└── exports/ # Agent packages (your agents go here)
|
||||||
├── support_ticket_agent/
|
├── support_ticket_agent/
|
||||||
@@ -341,6 +341,62 @@ hive/
|
|||||||
└── personal_assistant_agent/
|
└── personal_assistant_agent/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Separate Virtual Environments
|
||||||
|
|
||||||
|
The project uses **separate virtual environments** for `core` and `tools` packages to:
|
||||||
|
|
||||||
|
- Isolate dependencies and avoid conflicts
|
||||||
|
- Allow independent development and testing of each package
|
||||||
|
- Enable MCP servers to run with their specific dependencies
|
||||||
|
|
||||||
|
### How It Works
|
||||||
|
|
||||||
|
When you run `./quickstart.sh` or `uv sync` in each directory:
|
||||||
|
|
||||||
|
1. **core/.venv/** - Contains the `framework` package and its dependencies (anthropic, litellm, mcp, etc.)
|
||||||
|
2. **tools/.venv/** - Contains the `aden_tools` package and its dependencies (beautifulsoup4, pandas, etc.)
|
||||||
|
|
||||||
|
### Cross-Package Imports
|
||||||
|
|
||||||
|
The `core` and `tools` packages are **intentionally independent**:
|
||||||
|
|
||||||
|
- **No cross-imports**: `framework` does not import `aden_tools` directly, and vice versa
|
||||||
|
- **Communication via MCP**: Tools are exposed to agents through MCP servers, not direct Python imports
|
||||||
|
- **Runtime integration**: The agent runner loads tools via the MCP protocol at runtime
|
||||||
|
|
||||||
|
If you need to use both packages in a single script (e.g., for testing), you have two options:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Option 1: Install both in a shared environment
|
||||||
|
python -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install -e core/ -e tools/
|
||||||
|
|
||||||
|
# Option 2: Use PYTHONPATH (for quick testing)
|
||||||
|
PYTHONPATH=core:tools/src python your_script.py
|
||||||
|
```
|
||||||
|
|
||||||
|
### MCP Server Configuration
|
||||||
|
|
||||||
|
The `.mcp.json` at project root configures MCP servers to use their respective virtual environments:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"agent-builder": {
|
||||||
|
"command": "core/.venv/bin/python",
|
||||||
|
"args": ["-m", "framework.mcp.agent_builder_server"]
|
||||||
|
},
|
||||||
|
"tools": {
|
||||||
|
"command": "tools/.venv/bin/python",
|
||||||
|
"args": ["-m", "aden_tools.mcp_server", "--stdio"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This ensures each MCP server runs with its correct dependencies.
|
||||||
|
|
||||||
### Why PYTHONPATH is Required
|
### Why PYTHONPATH is Required
|
||||||
|
|
||||||
The packages are installed in **editable mode** (`pip install -e`), which means:
|
The packages are installed in **editable mode** (`pip install -e`), which means:
|
||||||
|
|||||||
Reference in New Issue
Block a user