Orchestrator¶
Главный агент-координатор SMM workflow.
Возможности¶
- Координация дочерних агентов
- Проверка таймаутов согласования
- Уведомления о pending постах
- Получение статуса системы
Использование¶
from kit.agents.content import OrchestratorAgent
orchestrator = OrchestratorAgent(
content_agent=content_agent,
trend_agent=trend_agent,
post_repository=post_repo,
settings=settings
)
# Запуск
async with orchestrator:
# Агент работает в фоне
await asyncio.sleep(3600)
Методы¶
start() / stop()¶
collect_trends()¶
generate_content()¶
create_post_manually()¶
post = await orchestrator.create_post_manually(
topic="Тема поста",
context="Дополнительный контекст"
)
get_status()¶
status = await orchestrator.get_status()
# {
# 'running': True,
# 'posts': {
# 'pending': 5,
# 'scheduled': 10,
# 'published': 120
# },
# 'agents': {
# 'content': True,
# 'trend': True
# }
# }
Автоматические проверки¶
Каждые 5 минут:
- Таймаут согласования — посты не одобренные за N часов автоматически отклоняются
- Уведомления — оповещение о постах ожидающих согласования