Self-Correcting Agent

This repository contains a simple implementation of a self‑correcting agent using LangGraph.
The agent follows these steps:

  1. Ask – Generates an answer to the user’s question.
  2. Check – Evaluates the answer’s quality.
  3. Correct – If the answer is flagged as poor, it rewrites it.
  4. 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

S
Description
BroJS: Экзамен: Самокорректирующийся агент
Readme MIT
128 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 63.5%
JavaScript 22%
TypeScript 14.5%