Disclaimer: This is not a vibecoded project. The goal is to build a functional, production-leaning agent with carefully engineered memory, retrieval, and reasoning workflows.
AtlasAI is a production-leaning AI agent built with FastAPI, LangGraph, LangChain, and Postgres. It is meant to show applied agent engineering work:
- graph-based orchestration instead of a single prompt wrapper
- real retrieval infrastructure with Postgres hybrid search
- memory management beyond short chat history
- ingestion pipelines for both documents and websites
- an HTTP service layer that can evolve into a deployable backend
It is intentionally hands-on and infrastructure-aware, which makes it a good portfolio piece for LLM application engineering, agent systems, and retrieval-heavy backend work.
The project focuses on a practical agent architecture. It combines tool use, hybrid retrieval, long-term memory, and advanced document ingestion into one system that can be invoked over HTTP.
- Runs a LangGraph-based conversational agent behind a FastAPI API.
- Uses hybrid retrieval with
PGVectorStoreon Postgres andpgvector. - Supports advanced document RAG with PDF partitioning, chunking, summarization, and metadata preservation.
- Ingests website content into a searchable store for profile and biography lookups.
- Maintains long-term conversational memory with LangMem and a background memory update flow.
- Persists graph state with a Postgres checkpointer for thread-aware conversations.
AtlasAI is split into a few main layers:
src/atlasai/web/main.pyFastAPI entrypoint with the/invokeendpoint.src/atlasai/service/graph_service.pyMain agent orchestration, tool routing, memory extraction, and graph execution.src/atlasai/store/hybrid_store.pyPostgres-backedPGVectorStoresetup with built-in hybrid search configuration.src/atlasai/rag/rag_ingestion.pyPDF ingestion pipeline for partitioning, chunking, summarizing, and storing documents.src/atlasai/rag/website.pyWebsite ingestion flow for loading and storing HTML content.
This project uses a hybrid retrieval setup rather than vector-only search.
- Dense retrieval is handled by
PGVectorStore. - Keyword retrieval is handled by Postgres full-text search through a
tsvectorcolumn. - Result fusion uses reciprocal rank fusion (
RRF).
The agent also maintains memory in two forms:
- LangGraph checkpointing for thread-level conversational state.
- Long-term memory tools and a background memory graph for durable user facts and preferences.
The document pipeline is designed for more than plain text extraction.
- PDFs are partitioned with Unstructured.
- Chunks are created with title-aware chunking.
- Tables are preserved as HTML.
- Image payloads can be materialized to disk and referenced during summarization.
- Chunks are converted into searchable documents before being embedded and stored.
This makes the RAG path closer to a real ingestion workflow than a simple text splitter demo.
- Python 3.11+
- FastAPI
- LangGraph
- LangChain
langchain-postgres- PostgreSQL +
pgvector - Unstructured
- OpenAI-compatible models
Install dependencies:
uv syncStart Postgres with pgvector:
docker compose -f docker-compose.postgres.yml up -dCreate your environment file from .env.example and set at least:
MODEL_PROVIDER=
MODEL=
MODEL_PROVIDER_BASE_URL=
MODEL_API_KEY=
SOUL_PATH=
SYSTEM_PROMPT_PATH=
CG_API_KEY=
DB_CONN=postgresql://atlasai:atlasai@localhost:55433/atlasai
PGVECTOR_CONNECTION=postgresql+psycopg://atlasai:atlasai@localhost:55433/atlasaiStart the API:
uv run fastapi dev src/atlasai/web/main.pyExample request:
curl -X POST http://127.0.0.1:8000/invoke \
-H "Content-Type: application/json" \
-d '{"user_input":"Who is Ndeto?","thread_id":"demo-thread"}'Load PDF documents into the hybrid store:
uv run python -m atlasai.rag.rag_ingestionLoad website content into the website store:
uv run python -m atlasai.rag.website