7ccfe68f3f
* feat: add scheduler functionality with cron-style task management - Implemented a new scheduler subagent to automate recurring tasks using cron expressions. - Enhanced the subagent factory to include the skill manager and auxiliary chat model for the scheduler. - Created a YAML configuration for the scheduler with a detailed system prompt and toolset. - Updated README files to include documentation on scheduled tasks and usage examples. - Added tests for the scheduler, including command execution, scheduling tools, and middleware integration. - Introduced new dependencies for timezone handling and ensured compatibility in the project configuration. * fix(async-notifier): ensure fallback hint is used for unknown notification kinds * feat: enhance scheduling functionality and improve system message handling
36 lines
1.4 KiB
Python
36 lines
1.4 KiB
Python
"""Deployed graphs for all yaml-flagged async sub-agents.
|
|
|
|
One module-level binding per ``async: true`` entry in
|
|
``EvoScientist/subagents/<name>.yaml``. Each binding is a graph compiled by
|
|
``build_async_subagent_graph`` (which reads the yaml, wires tools/skills/
|
|
backend/middleware identical to the in-process sync version, and returns a
|
|
runnable langgraph).
|
|
|
|
To add a new async sub-agent:
|
|
|
|
1. Set ``async: true`` in ``EvoScientist/subagents/<name>.yaml``.
|
|
2. Add a one-line binding here::
|
|
|
|
<snake_name> = build_async_subagent_graph("<name>")
|
|
|
|
3. Register it in ``EvoScientist/langgraph_dev/langgraph.json``::
|
|
|
|
"<name>": "EvoScientist.langgraph_dev.graphs:<snake_name>"
|
|
|
|
The deployed main agent (``EvoScientist_agent``) lives in ``main_graph.py``
|
|
because it follows a different mechanism (re-exporting a lazily-constructed
|
|
attribute), not the yaml-driven factory.
|
|
"""
|
|
|
|
from EvoScientist.middleware.memory_lifecycle import (
|
|
MemoryLifecycleRole,
|
|
build_memory_worker_graph,
|
|
)
|
|
from EvoScientist.subagents._factory import build_async_subagent_graph
|
|
|
|
writing_agent = build_async_subagent_graph("writing-agent")
|
|
data_analysis_agent = build_async_subagent_graph("data-analysis-agent")
|
|
scheduler = build_async_subagent_graph("scheduler")
|
|
evomemory_subagent_worker = build_memory_worker_graph(MemoryLifecycleRole.SUBAGENT)
|
|
evomemory_turn_worker = build_memory_worker_graph(MemoryLifecycleRole.TURN)
|