I. Project Overview

1.1 What this app does

These notes are about how to build an AI agent from scratch.

Workflow

<aside> 💡

API → context/history → tool calling → RAG → agent basics → LangChain → LangGraph

</aside>

II. Prerequisite

We will use Python and Django to develop this project. For details on installation and setup, see here.

Overall, we need:

  1. Install the Django project and apps
  2. Adjust settings to connect the project to the apps
  3. Create app-level url.py
  4. Basic View function views.py
  5. Create templates, UI what user sees

Note: for all the complete code mentioned in these notes, check the GitHub repo.

Development Process

General Idea

User sends a message
↓
Backend receives the message
↓
Backend calls an AI API
↓
AI API returns a response
↓
Backend optionally saves the conversation
↓
Backend sends the response back to the user

Workflow