haive.agents.base.debug_utils¶

Debug utilities for agent execution with Rich UI.

Provides comprehensive debugging and logging capabilities for agent execution, particularly focused on runnable config and recursion limit issues.

Classes¶

AgentDebugger

Rich UI debugger for agent execution.

Functions¶

debug_runnable_config(config[, context, agent_name])

Quick function to debug a runnable config.

disable_agent_debugging()

Disable global agent debugging.

enable_agent_debugging()

Enable global agent debugging.

get_agent_debugger([agent_name])

Get or create agent debugger.

Module Contents¶

class haive.agents.base.debug_utils.AgentDebugger(agent_name='Agent', enabled=False)¶

Rich UI debugger for agent execution.

Init .

Parameters:
  • agent_name (str) – [TODO: Add description]

  • enabled (bool) – [TODO: Add description]

disable()¶

Disable debugging output.

Return type:

None

enable()¶

Enable debugging output.

Return type:

None

log_agent_execution_start(input_data, config)¶

Log the start of agent execution.

Parameters:
  • input_data (Any)

  • config (langchain_core.runnables.RunnableConfig)

log_config_preparation(base_config, runtime_config, thread_id, kwargs)¶

Log the config preparation process.

Parameters:
  • base_config (langchain_core.runnables.RunnableConfig | None)

  • runtime_config (langchain_core.runnables.RunnableConfig)

  • thread_id (str | None)

  • kwargs (dict[str, Any])

log_recursion_limit_flow(step, recursion_limit, source='')¶

Track recursion limit through the execution flow.

Parameters:
  • step (str)

  • recursion_limit (Any)

  • source (str)

log_runnable_config(config, context='')¶

Log runnable config with rich formatting.

Parameters:
  • config (langchain_core.runnables.RunnableConfig)

  • context (str)

haive.agents.base.debug_utils.debug_runnable_config(config, context='', agent_name='Agent')¶

Quick function to debug a runnable config.

Parameters:
  • config (langchain_core.runnables.RunnableConfig)

  • context (str)

  • agent_name (str)

haive.agents.base.debug_utils.disable_agent_debugging()¶

Disable global agent debugging.

Return type:

None

haive.agents.base.debug_utils.enable_agent_debugging()¶

Enable global agent debugging.

Return type:

None

haive.agents.base.debug_utils.get_agent_debugger(agent_name='Agent')¶

Get or create agent debugger.

Parameters:

agent_name (str)

Return type:

AgentDebugger