|
| 1 | +# Knowledge Orchestration Hub |
| 2 | + |
| 3 | +A multi-agent system that orchestrates knowledge management across Confluence, Google Drive, and deep research capabilities. Three specialized agents work together through a shared knowledge repository to provide comprehensive research and knowledge management. |
| 4 | + |
| 5 | +## 🏗️ Architecture Overview |
| 6 | + |
| 7 | +```mermaid |
| 8 | +graph TD |
| 9 | + A[User Request] --> B[Conversational Agent<br/>Port 8000] |
| 10 | + B --> C{Request Type?} |
| 11 | +
|
| 12 | + C -->|Deep Research| D[Deep Research Agent<br/>Port 8001] |
| 13 | + C -->|Search/Chat| E[Shared Knowledge Repository<br/>Abstracted Backend] |
| 14 | +
|
| 15 | + D --> F[Research Report] |
| 16 | + F --> G[Save to Knowledge Repository] |
| 17 | + G --> E |
| 18 | +
|
| 19 | + H[Knowledge Monitor Agent<br/>Port 8002] --> I[Confluence MCP Server] |
| 20 | + H --> J[Google Drive MCP Server] |
| 21 | +
|
| 22 | + I --> K[Confluence Updates] |
| 23 | + J --> L[Drive Updates] |
| 24 | +
|
| 25 | + K --> M[Process & Store] |
| 26 | + L --> M |
| 27 | + M --> E |
| 28 | +
|
| 29 | + E --> N[RAG Search Results] |
| 30 | + N --> B |
| 31 | + B --> O[Response to User] |
| 32 | +
|
| 33 | + subgraph "Shared Knowledge Repository" |
| 34 | + E |
| 35 | + P[Research Reports] |
| 36 | + Q[Knowledge Updates] |
| 37 | + R[Document Metadata] |
| 38 | + E --- P |
| 39 | + E --- Q |
| 40 | + E --- R |
| 41 | + end |
| 42 | +
|
| 43 | + subgraph "MCP Servers" |
| 44 | + I |
| 45 | + J |
| 46 | + end |
| 47 | +``` |
| 48 | + |
| 49 | +## 📁 Project Structure |
| 50 | + |
| 51 | +``` |
| 52 | +knowledge_orchestration_hub/ |
| 53 | +├── wmt_conversationalist/ # Main chat interface with RAG |
| 54 | +│ ├── manifest.yaml # Agent configuration |
| 55 | +│ ├── project/ # Agent implementation |
| 56 | +│ └── ... # Generated by agentex init |
| 57 | +├── wmt_deep_researcher/ # Deep research report generation |
| 58 | +│ ├── manifest.yaml # Agent configuration |
| 59 | +│ ├── project/ # Agent implementation |
| 60 | +│ └── ... # Generated by agentex init |
| 61 | +├── wmt_knowledge_monitor/ # Confluence/Drive monitoring |
| 62 | +│ ├── manifest.yaml # Agent configuration |
| 63 | +│ ├── project/ # Agent implementation |
| 64 | +│ └── ... # Generated by agentex init |
| 65 | +├── shared_knowledge/ # Shared knowledge repository |
| 66 | +│ ├── __init__.py |
| 67 | +│ ├── repository.py # Abstract repository interface |
| 68 | +│ ├── backends/ # Pluggable storage backends |
| 69 | +│ │ ├── __init__.py |
| 70 | +│ │ ├── postgres.py # PostgreSQL implementation |
| 71 | +│ │ ├── sqlite.py # SQLite implementation |
| 72 | +│ │ └── memory.py # In-memory implementation |
| 73 | +│ ├── models.py # Shared data models |
| 74 | +│ └── rag_engine.py # RAG search and retrieval |
| 75 | +└── README.md # This file |
| 76 | +``` |
| 77 | + |
| 78 | +## 🤖 Agent Responsibilities |
| 79 | + |
| 80 | +### **Conversational Agent** |
| 81 | + |
| 82 | +- **Primary user interface** for the knowledge system |
| 83 | +- **RAG-powered chat** using shared knowledge repository |
| 84 | +- **Request routing** to appropriate specialized agents |
| 85 | +- **Real-time search** across research reports and monitored content |
| 86 | + |
| 87 | +### **Deep Research Agent** |
| 88 | + |
| 89 | +- **In-depth research reports** using web search and MCP tools |
| 90 | +- **Based on 020_state_machine pattern** with enhanced persistence |
| 91 | +- **Saves research outputs** to shared knowledge repository |
| 92 | +- **Iterative research refinement** with user feedback |
| 93 | + |
| 94 | +### **Knowledge Monitor Agent** |
| 95 | + |
| 96 | +- **Continuous monitoring** of Confluence spaces and Google Drive folders |
| 97 | +- **Change detection** and content extraction |
| 98 | +- **Automated knowledge ingestion** into shared repository |
| 99 | +- **Notification system** for important updates |
| 100 | + |
| 101 | +## 🗄️ Shared Knowledge Repository |
| 102 | + |
| 103 | +The shared knowledge repository provides an abstracted interface for storing and retrieving knowledge, allowing easy swapping of storage backends: |
| 104 | + |
| 105 | +### Supported Backends: |
| 106 | + |
| 107 | +- **PostgreSQL** with pgvector for production use |
| 108 | +- **SQLite** with vector extensions for development |
| 109 | +- **In-Memory** for testing and demos |
| 110 | + |
| 111 | +### Key Features: |
| 112 | + |
| 113 | +- **Vector embeddings** for semantic search |
| 114 | +- **Metadata tracking** and versioning |
| 115 | +- **Source attribution** and citations |
| 116 | +- **RAG engine** for context retrieval |
| 117 | + |
| 118 | +## 🚀 Quick Start |
| 119 | + |
| 120 | +### Prerequisites |
| 121 | + |
| 122 | +- Python 3.10+ |
| 123 | +- Agentex SDK installed (`pip install agentex-sdk`) |
| 124 | +- OpenAI API key |
| 125 | +- Optional: Confluence API token, Google Drive credentials |
| 126 | + |
| 127 | +### Setup |
| 128 | + |
| 129 | +1. **Start each agent**: |
| 130 | + |
| 131 | + ```bash |
| 132 | + cd wmt_conversationalist && agentex agents run --manifest manifest.yaml |
| 133 | + cd wmt_deep_researcher && agentex agents run --manifest manifest.yaml |
| 134 | + cd wmt_knowledge_monitor && agentex agents run --manifest manifest.yaml |
| 135 | + ``` |
| 136 | + |
| 137 | +2. **Configure knowledge repository backend**: |
| 138 | + |
| 139 | + ```bash |
| 140 | + export KNOWLEDGE_BACKEND=postgres # or sqlite, memory |
| 141 | + export DATABASE_URL=postgresql://user:pass@localhost:5432/knowledge_hub |
| 142 | + ``` |
| 143 | + |
| 144 | +3. **Test the system**: |
| 145 | + - Open Agentex Web UI at `http://localhost:3001` |
| 146 | + - Select the conversational agent |
| 147 | + - Send test messages |
| 148 | + |
| 149 | +## 📋 Example Workflows |
| 150 | + |
| 151 | +### 1. Deep Research Request |
| 152 | + |
| 153 | +Send to conversational agent: |
| 154 | + |
| 155 | +```json |
| 156 | +{ |
| 157 | + "type": "research", |
| 158 | + "query": "Latest developments in AI agent orchestration", |
| 159 | + "depth": "comprehensive", |
| 160 | + "save_to_knowledge": true |
| 161 | +} |
| 162 | +``` |
| 163 | + |
| 164 | +### 2. Knowledge Search & Chat |
| 165 | + |
| 166 | +Send to conversational agent: |
| 167 | + |
| 168 | +```json |
| 169 | +{ |
| 170 | + "type": "chat", |
| 171 | + "message": "What research do we have on multi-agent systems?", |
| 172 | + "include_sources": true |
| 173 | +} |
| 174 | +``` |
| 175 | + |
| 176 | +### 3. Monitor Configuration |
| 177 | + |
| 178 | +Send to monitor agent: |
| 179 | + |
| 180 | +```json |
| 181 | +{ |
| 182 | + "type": "monitor_setup", |
| 183 | + "sources": [ |
| 184 | + { "type": "confluence", "space": "TECH", "watch_updates": true }, |
| 185 | + { "type": "gdrive", "folder_id": "abc123", "watch_changes": true } |
| 186 | + ] |
| 187 | +} |
| 188 | +``` |
| 189 | + |
| 190 | +## 🔧 Development |
| 191 | + |
| 192 | +### Adding New Storage Backends |
| 193 | + |
| 194 | +1. Implement the `KnowledgeRepository` interface in `shared_knowledge/backends/` |
| 195 | +2. Add backend registration in `shared_knowledge/repository.py` |
| 196 | +3. Update environment configuration |
| 197 | + |
| 198 | +### Extending Agent Capabilities |
| 199 | + |
| 200 | +Each agent is a standard Agentex project that can be extended independently: |
| 201 | + |
| 202 | +- Add new MCP servers for external integrations |
| 203 | +- Implement custom state machines for complex workflows |
| 204 | +- Add new message types and handlers |
| 205 | + |
| 206 | +## 📚 What You'll Learn |
| 207 | + |
| 208 | +This project demonstrates: |
| 209 | + |
| 210 | +- **Multi-agent orchestration** with shared persistent storage |
| 211 | +- **Abstracted storage backends** for flexibility |
| 212 | +- **RAG implementation** with vector search |
| 213 | +- **MCP server integration** for external knowledge sources |
| 214 | +- **Agentex framework** best practices and patterns |
0 commit comments