Kong AI + Gateway Hackathon
Objective
This template is produced to give participants in the Kong AI + Gateway Hackathon a flying start. This template includes a basic infrastructure configuration, so all you need to do is to integrate with Kong Konnect and Opper AI, before starting to build the functionality that you want to demo.
The objective for this hackathon is to explore how to build systems using an AI-powered API Gateway and agents that are specialized to handle different types of requests.
A Starting Point For Your Demo Project
The Kong Gateway connected with a complete API (written in Python) with persistent chats stored in Couchbase, a knowledge base, and a full LLM integration through Opper AI.
A frontend (written in React) that provides a chat interface for users to interact with the API.
A great container-based dev env on Polytope, including hot reload, that makes it easy to iterate and collaborate on your solution. One command and you and all your team members are up and running with the same environment!
While this is a great starting point, we don't want to do all the work for you, so the implementation is intentionally incomplete. Here are some known issues you'll need to address:
The bot is very unhelpful!
The knowledge base is limited and not very useful.
The bot hallucinates a lot! If it can't find the answer in the knowledge base, it just makes stuff up.
Installing Your Demo Project
Make sure you have all of the Cillers System Demo Template prerequisites installed.
Clone the template repo: : git clone https://github.com/Cillers-com/kong-ai-gateway-hackathon.git kong-demo && cd kong-demo
Follow the Kong Konnect integration guide.
Follow the Opper AI integration guide.
Start Your Demo
Run the following command in your demo project directory:
pt run stackOpen the UI: http://localhost:8000
Start building your solution!
Project Structure
This app has two main components:
The API - A Python FastAPI backend that handles chat session management, knowledge base querying, and Opper AI integration
The UI - A React TypeScript frontend that provides the user interface
The API follows a RESTful design with the following endpoints:
POST /api/chats- Create a new chat sessionGET /api/chats/{chat_id}- Get a chat session by IDGET /api/chats/{chat_id}/messages- Get all messages for a chat sessionPOST /api/chats/{chat_id}/messages- Add a message to a chat session and get a responseDELETE /api/chats/{chat_id}- Delete a chat session and all its messages
Example usage:
Last updated