@@ -155,7 +155,7 @@ def clear(self):
155
155
self ._spans .clear ()
156
156
157
157
158
- class AgentRunRequest (common .BaseModel ):
158
+ class RunAgentRequest (common .BaseModel ):
159
159
app_name : str
160
160
user_id : str
161
161
session_id : str
@@ -822,15 +822,13 @@ async def delete_artifact(
822
822
)
823
823
824
824
@app .post ("/run" , response_model_exclude_none = True )
825
- async def agent_run (req : AgentRunRequest ) -> list [Event ]:
825
+ async def run_agent (req : RunAgentRequest ) -> list [Event ]:
826
826
session = await self .session_service .get_session (
827
827
app_name = req .app_name , user_id = req .user_id , session_id = req .session_id
828
828
)
829
829
if not session :
830
830
raise HTTPException (status_code = 404 , detail = "Session not found" )
831
831
runner = await self .get_runner_async (req .app_name )
832
-
833
- events = []
834
832
async with Aclosing (
835
833
runner .run_async (
836
834
user_id = req .user_id ,
@@ -844,7 +842,7 @@ async def agent_run(req: AgentRunRequest) -> list[Event]:
844
842
return events
845
843
846
844
@app .post ("/run_sse" )
847
- async def agent_run_sse (req : AgentRunRequest ) -> StreamingResponse :
845
+ async def run_agent_sse (req : RunAgentRequest ) -> StreamingResponse :
848
846
# SSE endpoint
849
847
session = await self .session_service .get_session (
850
848
app_name = req .app_name , user_id = req .user_id , session_id = req .session_id
@@ -938,7 +936,7 @@ async def get_event_graph(
938
936
return {}
939
937
940
938
@app .websocket ("/run_live" )
941
- async def agent_live_run (
939
+ async def run_agent_live (
942
940
websocket : WebSocket ,
943
941
app_name : str ,
944
942
user_id : str ,
0 commit comments