Share
## https://sploitus.com/exploit?id=D156225F-5496-5259-831A-81F4F6624A68
# Sales-to-Delivery Agent Orchestration System - POC
## Phase 1.1 Complete: Registry Service + Base Agent
This POC demonstrates a **Dynamic Persona-Based Agent Orchestration System** using a three-tier hierarchical architecture with capability-skill separation and registry-based service discovery.
## ๐๏ธ What's Implemented (Phase 1.1)
### โ
Core Foundation
- **BaseAgent Class**: Common functionality for all agents with registry integration
- **Registry Service**: Central service discovery and capability management API
- **Initial Data Files**: JSON-based persistence for all agent data
- **Project Structure**: Complete directory structure for three-tier architecture
### โ
Registry Service APIs
- `POST /api/agents/register` - Agent registration with capabilities
- `POST /api/capabilities/query` - Persona-based capability discovery
- `GET /api/agents` - Agent directory listing
- `GET /api/personas` - Persona configuration and permissions
- `GET /health` - Service health check
### โ
BaseAgent Features
- Automatic registry registration on startup
- Persona context handling and propagation
- Standardized error handling with confidence scoring
- Health monitoring and agent communication utilities
## ๐ Quick Start
**โ ๏ธ IMPORTANT: Always use virtual environment for this project!**
### 1. Create and Activate Virtual Environment
```powershell
cd "c:\Users\goswamee\OneDrive - HP Inc\Workspace\Blueprint\POC"
# Create virtual environment
python -m venv poc-env
# Activate virtual environment (Windows PowerShell)
poc-env\Scripts\activate
# Verify activation - you should see (poc-env) in your prompt
```
### 2. Install Dependencies
```powershell
# Make sure virtual environment is activated first!
pip install -r requirements.txt
# Verify installation
pip list
```
### 3. Start Registry Service
```powershell
# Virtual environment must be activated
python agents\registry_service.py
```
You should see:
```
๐ Starting Registry Service...
๐ Registry Service running on: http://localhost:8000
```
### 4. Test Registry Service
Open a **new PowerShell terminal**, activate virtual environment, then run:
```powershell
# In new terminal - activate virtual environment first!
cd "c:\Users\goswamee\OneDrive - HP Inc\Workspace\Blueprint\POC"
poc-env\Scripts\activate
# Run tests
python test_registry.py
```
## ๐ Project Structure
```
poc-agent-orchestration/
โโโ poc-env/ # Virtual environment (excluded from git)
โ โโโ Scripts/ # Python executable and activation scripts (Windows)
โ โโโ Lib/ # Installed packages
โ โโโ pyvenv.cfg # Environment configuration
โโโ agents/ # All agent implementations
โ โโโ __init__.py # Package initialization
โ โโโ base_agent.py # โ
Base class for all agents
โ โโโ registry_service.py # โ
Central registry service
โ โโโ virtual_assistant.py # ๐ Phase 3 (Tier 1)
โ โโโ sales_domain_agent.py # ๐ Phase 2 (Tier 2)
โ โโโ onboarding_domain_agent.py # ๐ Phase 2 (Tier 2)
โ โโโ drones/ # ๐ Phase 1.2 (Tier 3)
โ โโโ cpq_drone.py # Deal and pricing management
โ โโโ tm_drone.py # Transition workflow tracking
โ โโโ ms4_drone.py # Customer master data
โ โโโ itsm_drone.py # Contract management
โโโ data/ # โ
JSON persistence files
โ โโโ registry.json # Registry service data
โ โโโ sales_data.json # CPQ drone data
โ โโโ transition_data.json # TM drone data
โ โโโ customer_data.json # MS4 drone data
โ โโโ contract_data.json # ITSM drone data
โโโ docs/ # Documentation
โ โโโ design/
โ โ โโโ registry.md # โ
Registry design documentation
โ โโโ plan.md # Implementation plan
โ โโโ POC.md # POC specification
โ โโโ skill-driven-ai-agent-architecture.md
โโโ skills/ # ๐ Phase 2 (Skills framework)
โโโ web/ # ๐ Phase 3 (Web interface)
โโโ .gitignore # โ
Git ignore rules
โโโ .instructions.md # โ
Copilot instructions
โโโ requirements.txt # โ
Python dependencies
โโโ README.md # This file
โโโ test_registry.py # โ
Phase 1.1 validation
```
## ๐งช Test Results
After running `python test_registry.py`, you should see:
```
๐ Starting Registry Service Tests - Phase 1.1 Validation
โ
Registry Health Check
โ
Agent Registration
โ
Capability Query
โ
Agent Directory
โ
Persona Configuration
๐ Phase 1.1 validation successful! Ready for Phase 1.2 (Drone Agents)
```
## ๐ง Architecture Highlights
### Three-Tier Agent Hierarchy
- **Tier 1 (Virtual Assistant)**: Persona management, UI generation, capability routing
- **Tier 2 (Process Agents)**: Business logic, domain expertise, workflow orchestration
- **Tier 3 (Drone/Task Agents)**: System integration, direct tool execution, data operations
### Registry-Based Orchestration
- All agents register capabilities on startup
- Virtual Assistant queries registry for persona-accessible capabilities
- Dynamic capability discovery enables adaptive user experiences
### Persona-Based Access Control
- **Sales**: Can access sales operations and common queries
- **Onboarding**: Can access onboarding workflows and staged deals
- **ServiceDelivery**: Can access contracts and delivery metrics
## ๐ฏ Next Steps
### Phase 1.2: Drone Agents (Tier 3)
- Implement CPQ-Drone for deal management
- Implement TM-Drone for workflow tracking
- Implement MS4-Drone for customer data
- Implement ITSM-Drone for contract management
### Phase 2: Process Agents (Tier 2)
- Create skills framework
- Implement Sales Domain Agent
- Implement Onboarding Domain Agent
### Phase 3: Virtual Assistant (Tier 1)
- Implement persona-based routing
- Create dynamic UI generation
- Build web interface
## ๐ Troubleshooting
### Virtual Environment Issues
**Problem**: Command not found or import errors
```powershell
# Check if virtual environment is activated
echo $env:VIRTUAL_ENV # Should show path to poc-env
# If not activated
poc-env\Scripts\activate
# Verify Python is using virtual environment
where python # Should point to poc-env\Scripts\python.exe
```
**Problem**: Virtual environment creation fails
```powershell
# Upgrade pip first
python -m pip install --upgrade pip
# Try creating venv again
python -m venv poc-env
```
### Registry Service Won't Start
**Problem**: Port 8000 already in use
```powershell
# Check what's using port 8000
netstat -an | findstr :8000
# Kill process if needed (find PID first)
taskkill /f /pid
```
**Problem**: Module import errors
```powershell
# Make sure virtual environment is activated and dependencies installed
poc-env\Scripts\activate
pip install -r requirements.txt
```
### Test Failures
**Problem**: Registry connection failed
- Ensure virtual environment is activated in BOTH terminals
- Start registry service FIRST, then run tests in separate terminal
- Check firewall isn't blocking localhost connections
- Verify data directory exists and is writable
### Dependencies Issues
**Problem**: Package installation fails
```powershell
# Update pip and setuptools
pip install --upgrade pip setuptools
# Clear pip cache
pip cache purge
# Reinstall requirements
pip install -r requirements.txt
```
---
**Status**: โ
Phase 1.1 Complete - Registry Service + Base Agent
**Next**: ๐ Phase 1.2 - Drone Agents Implementation