-
Notifications
You must be signed in to change notification settings - Fork 843
Expand file tree
/
Copy path__init__.py
More file actions
46 lines (38 loc) · 1.32 KB
/
__init__.py
File metadata and controls
46 lines (38 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""This package provides the core Agent interface and supporting components for building AI agents with the SDK.
It includes:
- Agent: The main interface for interacting with AI models and tools
- ConversationManager: Classes for managing conversation history and context windows
- Retry Strategies: Configurable retry behavior for model calls
"""
from typing import Any
from ..event_loop._retry import ModelRetryStrategy
from .agent import Agent
from .agent_result import AgentResult
from .base import AgentBase
from .conversation_manager import (
ConversationManager,
NullConversationManager,
SlidingWindowConversationManager,
SummarizingConversationManager,
)
from .manifest import AgentManifest, InputContract, OutputContract, Trigger
__all__ = [
"Agent",
"AgentBase",
"AgentManifest",
"AgentResult",
"ConversationManager",
"InputContract",
"ModelRetryStrategy",
"NullConversationManager",
"OutputContract",
"SlidingWindowConversationManager",
"SummarizingConversationManager",
"Trigger",
]
def __getattr__(name: str) -> Any:
"""Lazy load A2AAgent to defer import of optional a2a dependency."""
if name == "A2AAgent":
from .a2a_agent import A2AAgent
return A2AAgent
raise AttributeError(f"cannot import name '{name}' from '{__name__}' ({__file__})")