fischer-agentkit/src/agentkit/core/__init__.py

97 lines
2.3 KiB
Python

"""AgentKit Core - 基础组件"""
from agentkit.core.base import BaseAgent
from agentkit.core.compressor import CompressionStrategy, ContextCompressor, create_compressor
from agentkit.core.config_driven import AgentConfig, ConfigDrivenAgent
from agentkit.core.event_queue import EventQueue, Submission, SubmissionQueue
from agentkit.core.exceptions import (
AgentAlreadyRegisteredError,
AgentFrameworkError,
AgentNotFoundError,
AgentNotReadyError,
AgentUnavailableError,
ConfigValidationError,
EvolutionError,
HandoffError,
LLMError,
LLMProviderError,
ModelNotFoundError,
NoAvailableAgentError,
SchemaValidationError,
TaskCancelledError,
TaskDispatchError,
TaskExecutionError,
TaskNotFoundError,
TaskTimeoutError,
ToolExecutionError,
ToolNotFoundError,
)
from agentkit.core.protocol import (
AgentCapability,
AgentStatus,
CancellationToken,
Event,
EvolutionEvent,
HandoffMessage,
SessionEventType,
TaskEventType,
TaskMessage,
TaskProgress,
TaskResult,
TaskStatus,
TurnEventType,
)
# Optional: HeadroomCompressor — only available when headroom-ai is installed
try:
from agentkit.core.headroom_compressor import HeadroomCompressor
except ImportError:
HeadroomCompressor = None # type: ignore[misc,assignment]
__all__ = [
"BaseAgent",
"AgentConfig",
"ConfigDrivenAgent",
"CompressionStrategy",
"ContextCompressor",
"create_compressor",
"HeadroomCompressor",
"AgentCapability",
"AgentStatus",
"CancellationToken",
"AgentFrameworkError",
"AgentNotFoundError",
"AgentAlreadyRegisteredError",
"AgentUnavailableError",
"AgentNotReadyError",
"TaskNotFoundError",
"TaskDispatchError",
"TaskExecutionError",
"TaskTimeoutError",
"TaskCancelledError",
"NoAvailableAgentError",
"ConfigValidationError",
"SchemaValidationError",
"HandoffError",
"EvolutionError",
"ToolNotFoundError",
"ToolExecutionError",
"LLMError",
"LLMProviderError",
"ModelNotFoundError",
"HandoffMessage",
"EvolutionEvent",
"TaskMessage",
"TaskProgress",
"TaskResult",
"TaskStatus",
# SQ/EQ 统一事件模型
"Event",
"SessionEventType",
"TaskEventType",
"TurnEventType",
"Submission",
"SubmissionQueue",
"EventQueue",
]