How shahzaibkaramat67-coder/law_memory_agent works
This is a small interactive chat program that asks a Gemini model questions and keeps the conversation in an in-memory message list. The user enters questions in a terminal; the agent adds each question to the history, invokes the model with that history, prints the reply, and appends it for the next turn. The initial system message says the assistant is medical, despite the terminal prompt describing legal questions. The graph reflects only the shown runtime; no README was provided.
Main entry points: agent.py Chat loop · memorySystem.py System prompt · mian.py Model setup
Components 6
Other components
- Terminal user
- Chat loop
agent.py - System prompt
memorySystem.py - Message history
agent.py - Model setup
mian.py - Gemini model
Connections 8
- Terminal user → Chat loop: enters questions
agent.py - Chat loop → Model setup: gets model
agent.py - Chat loop → System prompt: creates prompt
agent.py - System prompt → Message history: seeds history
memorySystem.py - Chat loop → Message history: appends messages
agent.py - Chat loop → Gemini model: invokes with history
agent.py - Model setup → Gemini model: configures model
mian.py - Gemini model → Chat loop: returns reply
agent.py