How harshiit112/system_agent_01 works
TerrorGT is a browser-based, tool-using chat application. A user sends a message and thread/model selection through the browser UI; FastAPI records the user message, obtains the selected LangGraph agent, and streams tool activity and answer tokens back over SSE. The agent chooses direct responses or tools, including web search, document retrieval, memory, and live utilities. Document uploads follow a separate ingestion path into Chroma. SQLite stores conversation history and memory, while LangGraph checkpoints preserve agent state. The map follows the README and sampled source; unsampled UI details and integrations are represented only where documented.
Main entry points: app.py FastAPI routes · tools.py Tool set · agent.py LangGraph agent · rag.py Document RAG
Components 15
Browser interface
- Chat UI
templates/app.js - Page shell
templates/index.html
Application service
- FastAPI routes
app.py
Agent and tools
- LangGraph agent
agent.py - Tool set
tools.py
Knowledge and state
- Document RAG
rag.py - Chroma vectors
- Conversation and memory store
database.py - Agent checkpoints
Other components
- User
- LLM providers
- Tavily search
- OpenWeather
- Alpha Vantage
- Mistral embeddings
Connections 18
- User → Chat UI: uses
- Chat UI → FastAPI routes: sends requests
- FastAPI routes → Chat UI: streams SSE
- FastAPI routes → Page shell: renders page
- FastAPI routes → LangGraph agent: gets agent; streams
- LangGraph agent → LLM providers: invokes selected model
- LangGraph agent → Tool set: dispatches tool calls
- FastAPI routes → Conversation and memory store: reads and writes chats
- FastAPI routes → Document RAG: indexes uploads
- FastAPI routes → Tool set: sets thread context
- LangGraph agent → Agent checkpoints: persists graph state
- Tool set → Tavily search: searches web
- Tool set → OpenWeather: gets live weather
- Tool set → Alpha Vantage: gets stock quotes
- Tool set → Document RAG: retrieves documents
- Document RAG → Mistral embeddings: embeds chunks
- Document RAG → Chroma vectors: indexes and searches
- Tool set → Conversation and memory store: saves and recalls memory