Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

641 B
Raw Blame
from typing import TYPE_CHECKING, Any

__all__ = ["AssistantGraph"]


def __getattr__(name: str) -> Any:
    # Lazy (PEP 562): importing any chat_agent submodule used to eagerly pull `.graph` and its
    # whole mode_manager -> toolkit -> tools -> runner chain, which imports back here for
    # AssistantGraph — a cycle that only held together via the temporal.ai startup preload.
    if name == "AssistantGraph":
        from .graph import AssistantGraph

        return AssistantGraph
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


if TYPE_CHECKING:
    from .graph import AssistantGraph as AssistantGraph