Files
task-69a474cdc46fd26feae69896/README.md
T
2026-05-27 12:28:56 +00:00

34 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Agent with Memory and HumanInTheLoop Confirmation
## What this project does
This repository contains a small demo of a LangChain agent that:
1. **Remembers** the conversation across multiple turns using `MemorySaver`.
2. **Pauses** before calling any tool so the user can confirm or cancel the action.
3. Uses the **BroJS LLM endpoint** (`openai/gpt-oss-20b:free`).
4. Renders output with the `rich` library 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
```bash
pip install -r requirements.txt
export JOURNAL_MCP_PAT=YOUR_BROJS_TOKEN
```
## Running the demo
```bash
python main.py
```
You will see three examples:
1. A simple question that requires no tool.
2. A price query that triggers a confirmation prompt.
3. A followup that demonstrates memory.
Feel free to modify `get_price` or add more tools the agent will automatically pause before each call.