https://github.com/openpipe/art-langgraph
https://github.com/openpipe/art-langgraph
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/openpipe/art-langgraph
- Owner: OpenPipe
- License: mit
- Created: 2025-07-10T18:05:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-10T21:55:39.000Z (11 months ago)
- Last Synced: 2025-07-11T02:00:13.651Z (11 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LangGraph Training
A training framework for LangGraph agents using reinforcement learning.
## Installation
```bash
pip install langgraph-training
```
## Quick Start
```python
import asyncio
from langgraph_training import TrainingFramework, TrainingConfig
async def my_agent(scenario, thread_id):
# Your LangGraph agent logic here
return "Generated response"
async def my_reward_function(scenario, results):
# Your reward computation logic here
return [0.8, 0.9, 0.7] # Scores for each result
async def main():
# Configure training parameters
config = TrainingConfig(
epochs=5,
batch_size=2,
group_size=4,
validation_samples=2
)
# Initialize framework
framework = TrainingFramework()
# Run training
await framework.run_training(
model=your_model,
scenarios=your_scenarios,
agent_function=my_agent,
reward_function=my_reward_function,
config=config,
validation_model=your_validation_model # optional
)
if __name__ == "__main__":
asyncio.run(main())
```
## Requirements
- Python ≥ 3.10
- LangChain Core ≥ 0.3.0
- OpenAI ≥ 1.0.0
- Pydantic ≥ 2.0.0
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
MIT License - see LICENSE file for details.