CompSci 390
Fall 2025
Modern Software Development

AI Agents Web App

This individual project is intended for you to practice deploying AI agents, creating a gateway that selects the correct agent, and web app to test it deployed on a Duke server.

Your grade will be determined primarily by your programming process rather than the exact functionality you choose to implement:

The goals of the agents are entirely up to you, as is the technology (basic HTML/CSS/JavaScript, a web framework like React or Svelte, a Python framework like Flask or Django, or a Java framework like Spring). With proper attribution, you are free start with our example code, any of the numerous online tutorials, or with the help of an AI Assistant to make an app with at least the following characteristics:

You are expected to build your own AI Agent rather than using pre-built ones or low-code tools to build one.

Submission

Use GIT to push your implementation to the main branch of the provided ai_agents_NETID repository hosted in the course's Gitlab group for each Phase:

You are responsible for ensuring that all files are correctly pushed to the repository on time.

AI Agent Details

For this project, an AI Agent is anything that helps provide a response to user interaction (not necessarily just the next response in a chat conversation), such as something that:

In most cases, each AI Agent will need to keep track of information specific to its purpose, such as:

You will not be able to test your AI Agents precisely since each response may be unique, so instead focus on testing that the parts work together correctly, such as:

You are welcome to test the frontend similarly (was content provided to the expected HTML id tag after the appropriate interaction occurred), but it is not necessary.

Phase 1

  1. Deploy the provided starter code in your provided repository on your Duke VCM Server
  2. Make a Gitlab Pipeline that Lints the code
  3. Add a simple AI agent to the framework that interacts with an LLM based on data provided by the user (but not necessarily only "chat" data)
    Note, simple means one or two basic data/LLM interactions to produce a response with code that is not much more complicated than the provided example
  4. Add tests for your new AI Agent to your Gitlab Pipeline that tests the code directly using pytest (for Python) rather than building the Docker container on Gitlab's server
    Note, you do not need to make tests for the starter code unless you choose to program it in a different language.
  5. Log significant events for your AI Agent using the logging module (for Python) with appropriate levels to the Console when run within Docker to complement their logging tools
    Note, you do not need to add logs for the starter code unless you feel it helps you to more easily debug the program

Tag the final committed version of your app as Phase1_Complete

Phase 2

  1. Add at least one more simple and a complex AI agent to the framework that interacts with an LLM based on data provided by the user (but not necessarily only "chat" data)
    Note, complex means combining several data or LLM interactions to produce a response such as accessing multiple data sources to provide context for the LLM or chaining together multiple LLM outputs to achieve the final result.
    Note, these agents must use "live" data sources, such as an API or database, rather than simply using a fixed file.
  2. Add frontend UI interactions to allow the user to provide values to the backend that are otherwise hardcoded, such as a slider that determines the LLM API's temperature value or a provided URL/search criteria that determines the set of data files to fetch.
    Note, this requires the backend web endpoint(s) be updated to accept additional parameters to the ChatRequest from the POST request created in the frontend.
  3. Add security checks for your AI Agents to your Gitlab Pipeline on the code directly using bandit (for Python) rather than building the Docker container on Gitlab's server
    Note, you should try to minimize the number of security issues, but you do not need to fix all of the issues.
  4. Continue logging and testing the new backend code you write.

Tag the final committed version of your app as Phase2_Complete