35 lines
835 B
Markdown
35 lines
835 B
Markdown
# LangGraph Agent Implementation
|
|
|
|
This repository contains a minimal implementation of a LangGraph agent using the `langgraph` library. The agent demonstrates how to:
|
|
|
|
- Define a state dataclass for graph data.
|
|
- Create a simple graph with nodes and edges.
|
|
- Execute the graph and retrieve the final state.
|
|
|
|
## Requirements
|
|
|
|
- `langgraph==0.0.38`
|
|
|
|
Install the dependencies with:
|
|
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
## Running the Agent
|
|
|
|
Execute the agent directly:
|
|
|
|
```bash
|
|
python langgraph_agent.py
|
|
```
|
|
|
|
You should see output similar to:
|
|
|
|
```
|
|
Final state messages: ['Hello from LangGraph!']
|
|
```
|
|
|
|
## Extending the Agent
|
|
|
|
Feel free to add more nodes, incorporate LLM calls, or integrate with other frameworks such as LangChain. The current structure provides a solid foundation for building more complex conversational agents. |