An AI-powered academic assistant for Computer Engineering and Computing (EIC) students at the University of Porto (FEUP), built on Cloudflare's edge infrastructure.
Live Demo: https://eic-assistant.goncalo-luis-pinto.workers.dev
EIC Assistant uses Retrieval-Augmented Generation (RAG) to answer questions based on real FEUP course slides, rather than relying solely on general AI knowledge. It covers topics such as Algorithms and Data Structures, Databases, SQL, Operating Systems, Computer architecture and Programming.
User (Browser)
↓ WebSocket
AIChatAgent (Durable Objects)
↓ embed query
Workers AI (bge-base-en-v1.5)
↓ semantic search
Vectorize (eic-embeddings)
↓ inject context
Workers AI (Llama 3.3 70B)
↓ stream response
User (Browser)
| Component | Technology | Purpose |
|---|---|---|
| Chat UI | React + Cloudflare Kumo | Frontend interface |
| Agent | AIChatAgent + Durable Objects | Chat logic + message persistence |
| LLM | Llama 3.3 70B (Workers AI) | Response generation |
| Embeddings | bge-base-en-v1.5 (Workers AI) | Semantic vector generation |
| Vector DB | Cloudflare Vectorize | Semantic search over course slides |
| Requirement | Implementation |
|---|---|
| LLM | Llama 3.3 70B via Workers AI |
| Workflow / coordination | AIChatAgent + Durable Objects |
| User input via chat | WebSocket chat interface |
| Memory or state | Durable Objects (chat history) + Vectorize (RAG) |
- Node.js 18+
- Cloudflare account
- Wrangler CLI
# Clone the repository
git clone https://github.com/goncalopinto1/cf_ai_eic-assistant
cd cf_ai_eic-assistant
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Fill in your CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN# Add your PDF files to the pdfs/ folder
# Then run the ingestion script
npx tsx src/ingest.tsnpm run devOpen http://localhost:5173 in your browser.
npm run deployeic-assistant/
├── src/
│ ├── server.ts # AIChatAgent — RAG logic + LLM
│ ├── ingest.ts # PDF ingestion pipeline
│ ├── app.tsx # React chat interface
│ └── client.tsx # React entry point
├── pdfs/ # Course slides (not committed)
│ ├── ac/
│ └── aed/
│ └── bd/
│ └── so/
├── public/ # Static assets
├── PROMPTS.md # Prompt engineering documentation
└── wrangler.jsonc # Cloudflare configuration
- Cloudflare Workers
- Cloudflare Durable Objects
- Cloudflare Workers AI
- Cloudflare Vectorize
- Cloudflare Agents SDK
- React 19
This project was built with assistance from Claude (Anthropic) as a development partner. All AI prompts used during development are documented in PROMPTS.md.

