We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a3606d commit 13a2231Copy full SHA for 13a2231
patterns/langgraph-single-agent/langgraph_agent.py
@@ -6,7 +6,6 @@
6
import base64
7
import json
8
import os
9
-import traceback
10
import logging
11
12
from ag_ui.core import RunAgentInput, RunErrorEvent, RunFinishedEvent
@@ -135,10 +134,8 @@ async def create_langgraph_agent(tools: list):
135
134
system_prompt=SYSTEM_PROMPT,
136
state_schema=AgentState, # extends BaseAgentState with todos: list[Todo]
137
)
138
- except Exception as error:
139
- print(f"[AGENT ERROR] Error creating LangGraph agent: {error}")
140
- print(f"[AGENT ERROR] Exception type: {type(error).__name__}")
141
- traceback.print_exc()
+ except Exception:
+ logging.exception("Error creating LangGraph agent")
142
raise
143
144
0 commit comments