Loading repository data…
Loading repository data…
omavashia2005 / repository
For the Cloudflare AI Challenge. An AI-powered chat agent deployable on Cloudflare Pages that integrates the Canvas LMS MCP server with Cloudflare Workers + AI Gateway. It enables users to interact with their Canvas data through natural language, leveraging serverless workflows and tool-chained reasoning built entirely on Cloudflare.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Built for the Optional Cloudflare AI Challenge
An AI-powered chat agent built on Cloudflare’s Agents Platform, integrating the Canvas LMS MCP server to enable intelligent, context-aware interactions with academic course data.
This project extends and modifies the official agents-starter template with full MCP integration, stateful workflows, and tool-driven AI reasoning, deployable entirely on Cloudflare Pages.
Canvas LMS Integration (via MCP): Securely connects to the user’s Canvas shell through the Model Context Protocol (MCP), enabling chained tool calls per session for course and assignment retrieval.
AI-Driven Chat Interface:
Real-time conversation with an LLM (gpt-4o via Cloudflare AI Gateway). Streaming, human-in-the-loop responses powered by the agents SDK.
Built-In Memory & State Management: Persistent context and state tracking using Durable Objects allowing multi-turn reasoning and recall of prior tool outputs.
Modern Cloudflare Stack: Frontend hosted on Cloudflare Pages, backend workflows running on Cloudflare Workers, and AI inference through AI Gateway.
Extensible Tool System:
Easily register new tools (e.g., Firecrawl for web scraping, GitHub MCP for repo search) with zod validation and automated confirmation prompts.
| Layer | Technology |
|---|---|
| Frontend | React + Vite on Cloudflare Pages |
| Backend / Agent Logic | Cloudflare Workers AI + AI Gateway |
| OpenAI gpt-4o via Cloudflare AI Gateway |
| Memory / State | Durable Objects |
| Tooling / Schema | MCP SDK, Zod, TypeScript |
| Build / Deployment | Vite + Cloudflare Pages |
LLM (recommend using Llama 3.3 on Workers AI), or an external LLM of your choice
Workflow / coordination (recommend using Workflows, Workers or Durable Objects)
User input via chat or voice (recommend using Pages or Realtime)
Memory or state
Prompts in PROMPTS.md
Clone this repository
git clone https://github.com/omavashia2005/cf_ai_test2.git
cd into this repository in your editor of choice
Once in, install all dependencies. Make sure you're on Node version 22+ (ensure using node -v)
npm install
Set up environment variables in a file named .dev.vars
Required variables (example .dev.vars):
OPENAI_API_KEY=
CLOUDFLARE_PROFILE=
CLOUDFLARE_PROJECT_NAME=
CANVAS_API_KEY=
SMITHERY_PROFILE=
SMITHERY_API_KEY=
Check resources for documentation on how to set this up
Run the project
npm run start
The project will now be live locally at http://localhost:5174
Canvas Student API Key:
Account > Settings > Approved Integrations > New Access Token
Go to this mcp server.
cf_ai_canvas_agent/
├── src/ # Core source code
│ ├── tools.ts # MCP tools and API integrations
│ ├── server.ts # Worker entrypoint (Cloudflare)
│ ├── app.tsx # Frontend (React)
├── README.md
└── PROMPTS.md # Prompts used to generate AI code