- harness/es.py: append-only event store + проекции (образец — кооп-портал) - harness/levels.py: уровни 1с/1м/1ч/1д, контекст ∝ масштабу - harness/scheduler.py: уровневые потоки, идемпотентные тики, absorbed-стабы - harness/isolated_runner.py + _llm_worker.py: LLM-тик в сабпроцессе (глобальный asyncio-рантайм Strands не переживает 2+ create_harness) - cli.py: init/task/tasks/status/events + requeue (написан самим минутным агентом) - 9router: отдельный ключ sk-simbiot, модель auto (glm-5.3 первым)
43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
"""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_metadata import AgentMetadata
|
|
from .agent_result import AgentResult
|
|
from .base import AgentBase
|
|
from .conversation_manager import (
|
|
ConversationManager,
|
|
NullConversationManager,
|
|
SlidingWindowConversationManager,
|
|
SummarizingConversationManager,
|
|
)
|
|
|
|
__all__ = [
|
|
"Agent",
|
|
"AgentBase",
|
|
"AgentMetadata",
|
|
"AgentResult",
|
|
"ConversationManager",
|
|
"NullConversationManager",
|
|
"SlidingWindowConversationManager",
|
|
"SummarizingConversationManager",
|
|
"ModelRetryStrategy",
|
|
]
|
|
|
|
|
|
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__})")
|