- 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 первым)
68 lines
1.8 KiB
Python
68 lines
1.8 KiB
Python
"""Strands harness: a preconfigured, opinionated Strands agent in one call."""
|
|
|
|
from strands_harness.agent import create_harness
|
|
from strands_harness.config import (
|
|
DEFAULT_HARNESS_AGENT_CONFIG,
|
|
define_harness_agent_config,
|
|
harness_agent_kwargs_from_config,
|
|
normalize_harness_agent_config,
|
|
)
|
|
from strands_harness.defaults import BUILTIN_PLUGIN_NAMES, BUILTIN_TOOL_NAMES
|
|
from strands_harness.interventions import (
|
|
InterventionAsk,
|
|
InterventionsOption,
|
|
InterventionValue,
|
|
resolve_interventions,
|
|
)
|
|
from strands_harness.memory import resolve_memory
|
|
from strands_harness.models import supports_thinking, supports_web_search
|
|
from strands_harness.prompt import HARNESS_CONTRACT, build_system_prompt
|
|
from strands_harness.types.agent import (
|
|
BuiltinPluginName,
|
|
BuiltinToolName,
|
|
BuiltinToolsConfig,
|
|
ContextManagerConfig,
|
|
ContextManagerOption,
|
|
Effort,
|
|
MemoryConfig,
|
|
ProgrammaticToolCallerConfig,
|
|
ReadConfig,
|
|
SessionConfig,
|
|
ShellConfig,
|
|
SubagentConfig,
|
|
WebFetchConfig,
|
|
WebFetchTransport,
|
|
)
|
|
|
|
__all__ = [
|
|
"BUILTIN_PLUGIN_NAMES",
|
|
"BUILTIN_TOOL_NAMES",
|
|
"HARNESS_CONTRACT",
|
|
"DEFAULT_HARNESS_AGENT_CONFIG",
|
|
"BuiltinPluginName",
|
|
"BuiltinToolName",
|
|
"BuiltinToolsConfig",
|
|
"ContextManagerConfig",
|
|
"ContextManagerOption",
|
|
"Effort",
|
|
"InterventionAsk",
|
|
"InterventionValue",
|
|
"InterventionsOption",
|
|
"MemoryConfig",
|
|
"ProgrammaticToolCallerConfig",
|
|
"SessionConfig",
|
|
"ReadConfig",
|
|
"ShellConfig",
|
|
"SubagentConfig",
|
|
"WebFetchConfig",
|
|
"WebFetchTransport",
|
|
"build_system_prompt",
|
|
"create_harness",
|
|
"define_harness_agent_config",
|
|
"harness_agent_kwargs_from_config",
|
|
"normalize_harness_agent_config",
|
|
"resolve_interventions",
|
|
"resolve_memory",
|
|
"supports_thinking",
|
|
"supports_web_search",
|
|
]
|