Building a Virtual Workplace Assistant
This tutorial series demonstrates how to create an Virtual Workplace Assistant using CAP and LangGraph, with website crawling, data retrieval, and deployment capabilities.
Tutorial Series
Part 1: Website Crawling & Data Ingestion
Learn how to set up website crawling using Apify to gather content for your Virtual Workplace Assistant.
Key Steps:
- Setting up Apify crawler
- Configuring crawl patterns
- Data preprocessing
- Storage preparation
Part 2: Data Retrieval Setup
Implement efficient data retrieval using Milvus DB for the Virtual Workplace Assistant.
Implementation:
from cap.agents import VirtualWorkplaceAgent
from cap.storage import MilvusStorage
class WorkplaceAssistant(VirtualWorkplaceAgent):
def __init__(self):
super().__init__()
self.vector_store = MilvusStorage()
async def retrieve_context(self, query: str) -> list:
return await self.vector_store.similarity_search(query)
Part 3: AWS Deployment
Deploy your Virtual Workplace Assistant as an embeddable chatbot on AWS.
Deployment Configuration:
module "workplace_assistant" {
source = "./modules/lambda"
name = "virtual-workplace-assistant"
runtime = "python3.9"
handler = "handler.lambda_handler"
environment = {
MILVUS_HOST = var.milvus_host
APIFY_TOKEN = var.apify_token
}
}
Features
- Website content crawling
- Vector-based retrieval
- Conversation memory
- AWS Lambda deployment
- Embeddable widget
Try It Out
- Clone the repository
- Follow setup in Getting Started
- Configure Apify and Milvus DB
- Deploy using provided Terraform configuration
- Embed the widget in your website