forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.py
More file actions
33 lines (29 loc) · 749 Bytes
/
Copy pathstate.py
File metadata and controls
33 lines (29 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
This is the state definition for the AI.
It defines the state of the agent and the state of the conversation.
"""
from typing import List, TypedDict
from langgraph.graph import MessagesState
class Resource(TypedDict):
"""
Represents a resource. Give it a good title and a short description.
"""
url: str
title: str
description: str
class Log(TypedDict):
"""
Represents a log of an action performed by the agent.
"""
message: str
done: bool
class AgentState(MessagesState):
"""
This is the state of the agent.
It is a subclass of the MessagesState class from langgraph.
"""
model: str
research_question: str
report: str
resources: List[Resource]
logs: List[Log]