A smart LLM agent for various tasks, deployed as a Cloudflare Workers Site. This project serves a static website from the static/ directory.
This project is a proof-of-concept for a smart LLM agent. It is built as a Cloudflare Workers Site, which means it's a serverless application that serves a static website. The core logic is in src/index.ts, which uses @cloudflare/kv-asset-handler to serve static assets.
- βοΈ Serverless: Runs on Cloudflare Workers, a serverless platform.
- π Static Site: Serves a static website from the
static/directory. - π¦ Asset Handling: Uses
@cloudflare/kv-asset-handlerto efficiently serve assets. - π» Development Server: Comes with a local development server powered by Wrangler.
- π Deployment Scripts: Includes scripts for easy deployment to Cloudflare.
To get a local copy up and running, follow these simple steps.
- Node.js: Make sure you have Node.js installed. You can download it from nodejs.org.
- npm: npm is the package manager for Node.js and comes with the Node.js installation.
- Wrangler: This project uses Wrangler, the command-line tool for Cloudflare Workers. You should authenticate it if you haven't already:
npx wrangler login
- Clone the repo:
git clone https://github.com/PythonicVarun/LLM-Agent-POC.git
- Navigate to the project directory:
cd LLM-Agent-POC - Install NPM packages:
npm install
In the project directory, you can run the following scripts:
npm run prettify: Formats the code using Prettier.npm start: Starts the local development server.npm run predeploy: Minifies the static assets before deployment.npm run deploy: Deploys the project to Cloudflare Workers.npm run restore:static: Restores the static assets after deployment.npm run install:deps: Installs the project dependencies.npm run publish: Publishes the site using Wrangler.npm test: Runs the test suite.
To deploy the project to Cloudflare Workers, simply run the following command:
npm run deployThis will first minify the static assets and then deploy the project using Wrangler.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Varun Agnihotri - @PythonicVarun - code@pythonicvarun.me