Files
cleveragents-core/examples/simple_langgraph.yaml

50 lines
1.0 KiB
YAML

# Simple LangGraph Example
# Demonstrates basic LangGraph functionality with linear flow
agents:
assistant:
type: llm
config:
provider: openai
model: gpt-3.5-turbo
temperature: 0.7
system_prompt: "You are a helpful assistant."
# NEW: Unified routes section
routes:
# Define the graph as a route
simple_chat:
type: graph # REQUIRED: Must specify type (stream or graph)
entry_point: start
nodes:
# Process user input
process_input:
type: agent
agent: assistant
edges:
- source: start
target: process_input
- source: process_input
target: end
# Input stream that triggers the graph
chat_input:
type: stream # REQUIRED: Must specify type
stream_type: cold
operators:
- type: graph_execute
params:
graph: simple_chat
publications:
- __output__
# Route input to the stream
merges:
- sources: [__input__]
target: chat_input
context:
global:
app_name: "Simple LangGraph Chat"