9ab33ca6a87caa0849f5988553b5753a8a954c1f
Self-Correcting Agent
This repository contains a simple implementation of a self‑correcting agent using LangGraph.
The agent follows these steps:
- Ask – Generates an answer to the user’s question.
- Check – Evaluates the answer’s quality.
- Correct – If the answer is flagged as poor, it rewrites it.
- Final – Returns the final answer.
Installation
pip install -r requirements.txt
Note
: The implementation uses deterministic placeholders instead of real LLM calls, so no API keys are required.
Usage
from src.agent import run_agent
question = "What is the capital of France?"
answer = run_agent(question)
print(answer)
Project Structure
├── requirements.txt
├── src
│ └── agent.py
└── README.md
License
MIT License
Languages
Python
51.9%
JavaScript
39.3%
TypeScript
8.8%