This project is a minimal, transparent implementation of a ReAct (Reasoning and Acting) Agent built manually using the LangChain framework.
Instead of relying on high-level abstractions like initialize_agent
, this repo walks through how a ReAct agent works under the hood — from formatting the prompt, invoking tools, to parsing LLM responses.
- Custom ReAct-style Prompt Template
- Tool execution (e.g.,
get_text_length
) - Manual ReAct-style reasoning/action loop
- Intermediate step tracking (scratchpad)
- Callback handler for logging LLM input/output
This project uses the
mistralai/mistral-7b-instruct
model hosted for free via OpenRouter. The model is accessed using the OpenAI-compatible API base