Skip to main content

log_agent_step

function log_agent_step

Display or log an agent step based on pretty_print flag.
from mcp_use.agents.display import log_agent_step
Parameters
item
required
Parameter value
pretty_print
default:"True"
Parameter value
Signature
def log_agent_step(item, pretty_print = True):

log_agent_stream

function log_agent_stream

Handle streaming events from astream_events.
from mcp_use.agents.display import log_agent_stream
Parameters
chunk
required
Event dictionary from LangChain’s astream_events
pretty_print
default:"True"
If True, use rich formatting. If False, do nothing.
Signature
def log_agent_stream(chunk, pretty_print = True):