Skip to content

Commit 485aab1

Browse files
committed
modified types to make BasicWorkflowAgent available on LangGraph Studio
1 parent 41462a0 commit 485aab1

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

template_langgraph/agents/basic_workflow_agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def create_graph(self):
6262
workflow.add_node("finalize", self.finalize)
6363

6464
# Create edges
65-
workflow.add_edge(START, "initialize")
65+
# workflow.add_edge(START, "initialize")
66+
workflow.add_edge(START, "chat_with_tools")
6667
workflow.add_edge("initialize", "do_something")
6768
workflow.add_edge("do_something", "extract_profile")
6869
workflow.add_edge("extract_profile", "chat_with_tools")

template_langgraph/agents/basic_workflow_agent/models.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
from typing import Annotated, TypedDict
2-
1+
from collections.abc import Sequence
2+
from typing import (
3+
Annotated,
4+
TypedDict,
5+
)
6+
7+
from langchain_core.messages import (
8+
BaseMessage,
9+
)
310
from langgraph.graph.message import add_messages
411
from pydantic import BaseModel, Field
512

@@ -21,5 +28,5 @@ class AgentOutput(BaseModel):
2128

2229

2330
class AgentState(TypedDict):
24-
messages: Annotated[list, add_messages]
31+
messages: Annotated[Sequence[BaseMessage], add_messages]
2532
profile: Profile | None = Field(None, description="抽出されたプロファイル情報")

0 commit comments

Comments
 (0)