Skip to content

Commit fb1b06d

Browse files
committed
Conversational orchestrator agent for WMT
1 parent 361c2a6 commit fb1b06d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7688
-0
lines changed

.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
{
22
"python.analysis.importFormat": "relative",
3+
"python.defaultInterpreterPath": "./venv/bin/python",
4+
"python.terminal.activateEnvironment": true,
5+
"python.testing.pytestEnabled": true,
6+
"python.testing.unittestEnabled": false,
7+
"python.linting.enabled": true,
8+
"python.linting.pylintEnabled": false,
9+
"python.linting.flake8Enabled": true,
10+
"python.linting.flake8Args": ["--max-line-length=120"],
11+
"python.formatting.provider": "black",
12+
"python.analysis.autoImportCompletions": true,
13+
"files.exclude": {
14+
"**/__pycache__": true,
15+
"**/*.pyc": true,
16+
"**/.pytest_cache": true,
17+
"**/node_modules": true,
18+
"**/.git": false
19+
}
320
}
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
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
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def main():
2+
print("Hello from knowledge-orchestration-hub!")
3+
4+
5+
if __name__ == "__main__":
6+
main()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[project]
2+
name = "knowledge-orchestration-hub"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
dependencies = [
8+
"agentex-sdk",
9+
]
10+
11+
[tool.uv.sources]
12+
agentex-sdk = { workspace = true }
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""Shared Knowledge Repository - Abstracted storage for multi-agent knowledge management."""
2+
3+
from .repository import KnowledgeRepository, get_repository
4+
from .models import (
5+
KnowledgeItem, ResearchReport, KnowledgeUpdate, SourceReference,
6+
SourceType, RequestType, ResearchDepth
7+
)
8+
from .rag_engine import RAGEngine
9+
10+
__all__ = [
11+
"KnowledgeRepository",
12+
"get_repository",
13+
"KnowledgeItem",
14+
"ResearchReport",
15+
"KnowledgeUpdate",
16+
"SourceReference",
17+
"SourceType",
18+
"RequestType",
19+
"ResearchDepth",
20+
"RAGEngine",
21+
]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Storage backends for the knowledge repository."""
2+
3+
from .postgres import PostgreSQLKnowledgeRepository
4+
5+
__all__ = ["PostgreSQLKnowledgeRepository"]

0 commit comments

Comments
 (0)