abe605f06327f34587888207c2b93b09b90f67de
Agent with Memory and Human‑In‑The‑Loop Confirmation
What this project does
This repository contains a small demo of a LangChain agent that:
- Remembers the conversation across multiple turns using
MemorySaver. - Pauses before calling any tool so the user can confirm or cancel the action.
- Uses the BroJS LLM endpoint (
openai/gpt-oss-20b:free). - Renders output with the
richlibrary for a pleasant console experience.
File structure
├── main.py # Entry point – runs three example interactions.
├── agent.py # Agent definition and helper to run it.
├── requirements.txt # Dependencies (no pinned versions).
└── README.md # This file.
Installation
pip install -r requirements.txt
export JOURNAL_MCP_PAT=YOUR_BROJS_TOKEN
Running the demo
python main.py
You will see three examples:
- A simple question that requires no tool.
- A price query that triggers a confirmation prompt.
- A follow‑up that demonstrates memory.
Feel free to modify get_price or add more tools – the agent will automatically pause before each call.
Description
Languages
Python
100%