feat: solution for 'Экзамен: Самокорректирующийся агент'

This commit is contained in:
2026-07-01 14:28:44 +03:00
parent baf18c5876
commit f14d41830d
8 changed files with 139 additions and 174 deletions
+31 -7
View File
@@ -1,14 +1,38 @@
# Project Requirements
# Self-Correcting Agent
This project requires the following Python packages:
This project demonstrates a minimal selfcorrecting agent built with **LangChain** and **LangGraph**.
The agent simply echoes user input, but the structure can be extended to include more complex logic and tools.
- `langgraph`
- `langchain-openai`
Install them using:
## Setup
```bash
# Install Python dependencies
pip install -r requirements.txt
# (Optional) Install Node.js dependencies if needed
npm install
```
Ensure you have a compatible Python environment before running the project.
## Running
```bash
python main.py
```
You should see output similar to:
```
Resulting state:
HumanMessage: Hello, agent!
AIMessage: Echo: Hello, agent!
```
## Project Structure
- `src/` Core logic (nodes and graph construction).
- `main.py` Entry point that builds and runs the graph.
- `requirements.txt` Python dependencies.
- `package.json` Node.js dependencies (optional).
- `README.md` Project documentation.
Feel free to extend the nodes or add new tools to create a more sophisticated agent.