forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
20 lines (16 loc) · 640 Bytes
/
Copy pathmain.py
File metadata and controls
20 lines (16 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""
Default LangGraph agent — neutral "helpful, concise assistant".
This is the fallthrough graph for demos that don't require anything more
specialized. Cells that need tailored behavior (chart viz, weather-only,
etc.) should have their own dedicated graph under `src/agents/` and
explicit wiring in the CopilotKit route.
"""
from langchain.agents import create_agent
from langchain_openai import ChatOpenAI
from copilotkit import CopilotKitMiddleware
graph = create_agent(
model=ChatOpenAI(model="gpt-4o-mini"),
tools=[],
middleware=[CopilotKitMiddleware()],
system_prompt="You are a helpful, concise assistant.",
)