- async langgraph_agent_toolkit.service.routes.info(request)[source][source]
- Parameters:
request (Request)
- Return type:
- async langgraph_agent_toolkit.service.routes.invoke(user_input, agent_id=None, request=None)[source][source]
Invoke an agent with user input to retrieve a final response.
If agent_id is not provided, the default agent will be used. Use thread_id to persist and continue a multi-turn conversation. run_id kwarg is also attached to messages for recording feedback.
- Parameters:
- Return type:
- async langgraph_agent_toolkit.service.routes.stream(user_input, agent_id=None, request=None)[source][source]
Stream an agent’s response to a user input, including intermediate messages and tokens.
If agent_id is not provided, the default agent will be used. Use thread_id to persist and continue a multi-turn conversation. run_id kwarg is also attached to all messages for recording feedback.
Set stream_tokens=false to return intermediate messages but not token-by-token.
- Parameters:
user_input (StreamInput)
agent_id (str | None)
request (Request)
- Return type:
- async langgraph_agent_toolkit.service.routes.feedback(feedback, agent_id=None, request=None)[source][source]
Record feedback for a run to the configured observability platform.
This routes the feedback to the appropriate platform based on the agent’s configuration.
- Parameters:
- Return type:
- async langgraph_agent_toolkit.service.routes.history(input=Depends(), agent_id=None, request=None)[source][source]
Get chat history.
- Parameters:
input (ChatHistoryInput)
agent_id (str | None)
request (Request)
- Return type:
- async langgraph_agent_toolkit.service.routes.clear_history(input, agent_id=None, request=None)[source][source]
Clear chat history.
- Parameters:
input (ClearHistoryInput)
agent_id (str | None)
request (Request)
- Return type:
- async langgraph_agent_toolkit.service.routes.add_messages(input, agent_id=None, request=None)[source][source]
Add messages to the end of chat history.
- Parameters:
input (AddMessagesInput)
agent_id (str | None)
request (Request)
- Return type: