/ restai / agent2 / __init__.py
__init__.py
 1  """agent2 — RESTai agent runtime that does NOT depend on llamaindex.
 2  
 3  Pure-Python ReAct-style agent loop built on top of raw provider SDKs
 4  (`anthropic`, `openai`). Adapted from the standalone_agent reference and
 5  wired to RESTai's existing tool registry, LLM database rows, guards, and
 6  streaming protocol.
 7  """
 8  from .agent import Agent2Error, Agent2Runtime, Agent2UnsupportedLLMError
 9  from .mcp_client import MCPSessionPool
10  from .providers import ProviderConfig, build_provider_for_llm
11  from .tool_adapter import AdaptedTool, adapt_function_tools
12  from .types import (
13      AgentEvent,
14      AgentSession,
15      Message,
16      TextBlock,
17      ToolResultBlock,
18      ToolUseBlock,
19      user_text_message,
20  )
21  
22  __all__ = [
23      "Agent2Runtime",
24      "Agent2Error",
25      "Agent2UnsupportedLLMError",
26      "Message",
27      "TextBlock",
28      "ToolUseBlock",
29      "ToolResultBlock",
30      "AgentEvent",
31      "AgentSession",
32      "user_text_message",
33      "AdaptedTool",
34      "adapt_function_tools",
35      "build_provider_for_llm",
36      "ProviderConfig",
37      "MCPSessionPool",
38  ]