"""LangGraph workflows exposed as A2A agents."""

from __future__ import annotations

from typing import Any

from a2a_langgraph.agent_card import build_agent_card
from a2a_langgraph.config import A2ALangGraphConfig
from a2a_langgraph.executor import LangGraphAgentExecutor

__version__ = "0.1.0"

__all__ = [
    "A2ALangGraphConfig",
    "LangGraphAgentExecutor",
    "add_langgraph_fastapi_endpoint",
    "build_agent_card",
    "create_a2a_fastapi_app",
]


def __getattr__(name: str) -> Any:
    if name == "add_langgraph_fastapi_endpoint":
        from a2a_langgraph.fastapi import add_langgraph_fastapi_endpoint

        return add_langgraph_fastapi_endpoint
    if name == "create_a2a_fastapi_app":
        from a2a_langgraph.fastapi import create_a2a_fastapi_app

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