This directory contains Jupyter notebooks to test the agent architecture and orchestration of connect-core.
Purpose: Agent router and multi-agent orchestration testing
Contents:
- ✓ Task routing tests
- ✓ Multi-agent orchestration
- ✓ Task decomposition
- ✓ Inter-agent communication
Requirements:
- Modules:
AgentRouter,MultiAgentOrchestrator,TaskDecomposer
Purpose: Communication tests between n8n and services (Ollama, Qdrant)
Contents:
- ✓ Service health checks
- ✓ Ollama integration (local LLM)
- ✓ Text generation
- ✓ Qdrant Vector Database
- ✓ Full communication pipeline
Requirements:
- Docker services: n8n, Ollama, Qdrant
- Libraries:
requests
Service URLs:
- n8n:
http://localhost:5678 - Ollama:
http://localhost:11434 - Qdrant:
http://localhost:6333
Purpose: Task decomposition and parallel execution testing
Contents:
- ✓ Complex task decomposition
- ✓ Parallel subtask execution
- ✓ Dependency resolution
- ✓ Results synthesis
- ✓ Performance analysis
Requirements:
- Modules:
TaskDecomposer,ParallelTaskExecutor,ResultSynthesizer - Libraries:
concurrent.futures,time
Purpose: Complete workflow test with Ollama + Qdrant integration
Contents:
-
Workflow 1: Document analysis with RAG (Retrieval Augmented Generation)
- Task routing
- Task decomposition
- Ollama integration
- Qdrant storage
- Results synthesis
- Output validation
-
Workflow 2: Multi-agent collaboration
- Inter-agent conversation simulation
- Message flow
- Information exchange
Requirements:
- All agent modules
- Services: n8n, Ollama, Qdrant
- Libraries:
requests,json
- Start the Docker stack:
./start.sh- Install Jupyter (if not already installed):
pip install jupyter notebook- Navigate to the project directory:
cd /workspaces/connect-corejupyter notebook test_agent_router.ipynbjupyter notebook
# Then open each notebook and run the cells- Open VS Code in the project directory
- Select a
.ipynbfile - VS Code will automatically detect the notebooks
- Click "Run All" to execute all cells
Each notebook follows a standard structure:
1. Setup/Imports
└─ Import necessary modules
└─ Configure environment variables
2. Test 1: Component 1
└─ Verify component operation
└─ Show results
3. Test 2: Component 2
└─ Verify component operation
└─ Show results
... (more tests)
N. Summary
└─ Summary of all tests
└─ Final metrics
The notebooks use the following environment variables (with default values):
# .env or system variables
N8N_BASE_URL=http://localhost:5678
OLLAMA_BASE_URL=http://localhost:11434
QDRANT_BASE_URL=http://localhost:6333- ✓ Agents correctly detected
- ✓ Tasks routed to appropriate agents
- ✓ Multi-agent orchestration works
- ✓ Inter-agent communication established
- ✓ n8n responds to health checks
- ✓ Ollama accessible and models available
- ✓ Qdrant connected and functional
- ✓ Full communication pipeline works
- ✓ Complex tasks correctly decomposed
- ✓ Efficient parallel execution
- ✓ Dependencies correctly resolved
- ✓ Results accurately synthesized
- ✓ Routing → decomposition → execution flow works
- ✓ Ollama generates valid responses
- ✓ Qdrant stores results
- ✓ Correct results synthesis
- ✓ Successful output validation
- ✓ Multi-agents collaborate correctly
Solution:
# Verify that services are running
docker compose ps
# If not running, start:
./start.shSolution:
# Ensure you are in the correct directory
cd /workspaces/connect-core
# Verify that the path is in sys.path
# Should be included in the notebook with: sys.path.insert(0, os.path.abspath('.'))Solution:
# Download models manually
docker exec ollama ollama pull llama3.2
# Or wait for them to download automaticallySolution:
# Increase timeout in requests
# In notebooks, change timeout=5 to timeout=30-
Run all notebooks in order:
test_agent_router.ipynb(verifies routing)test_communication.ipynb(verifies communication)test_task_decomposition.ipynb(verifies parallelization)test_end_to_end.ipynb(verifies full flow)
-
Monitor metrics:
- Execution time
- Resource usage (CPU, memory)
- Errors and warnings
-
Document results:
- Save notebook outputs
- Create test report
-
Optimize based on results:
- Adjust timeouts if necessary
- Optimize task decomposition
- Improve results synthesis
Last update: 2025-12-20 connect-core version: Latest