Prerequisites
- Python 3.10+
- Install dependencies:
Minimal example (Python)
main.py
Expected output
How it works
- State:
ConversationStateholds a list ofmessagesthat persists through the graph. - Node:
respondreads the latest message and appends an automated reply. - Edges: The flow enters
respondand then immediately terminates (END).
Next steps
- Add more nodes for tools, retrieval, or function calling.
- Branch conditionally based on state values.
- Explore persistence and memory patterns.