langgraph_agent_toolkit.streamlit_app.create_welcome_message(agent)[source][source]

Create a welcome message based on the current agent.

Parameters:

agent (str)

Return type:

ChatMessage

async langgraph_agent_toolkit.streamlit_app.main()[source][source]
Return type:

None

async langgraph_agent_toolkit.streamlit_app.draw_messages(messages_agen, is_new=False)[source][source]

Draws a set of chat messages - either replaying existing messages or streaming new ones.

This function has additional logic to handle streaming tokens and tool calls. - Use a placeholder container to render streaming tokens as they arrive. - Use a status container to render tool calls. Track the tool inputs and outputs

and update the status container accordingly.

The function also needs to track the last message container in session state since later messages can draw to the same container. This is also used for drawing the feedback widget in the latest chat message.

Parameters:
Return type:

None

async langgraph_agent_toolkit.streamlit_app.handle_feedback()[source][source]

Draws a feedback widget and records feedback from the user.

Return type:

None