Skip to content

Your lightweight open-source personal agent.

Enable Cron management on CLI Agent.

Darye778a93370a7c
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py
index 235bfdc12..1f6b2f593 100644
--- a/nanobot/cli/commands.py
+++ b/nanobot/cli/commands.py
@@ -439,9 +439,10 @@ def agent(
logs: bool = typer.Option(False, "--logs/--no-logs", help="Show nanobot runtime logs during chat"),
):
"""Interact with the agent directly."""
- from nanobot.config.loader import load_config
+ from nanobot.config.loader import load_config, get_data_dir
from nanobot.bus.queue import MessageBus
from nanobot.agent.loop import AgentLoop
+ from nanobot.cron.service import CronService
from loguru import logger
config = load_config()
@@ -449,6 +450,10 @@ def agent(
bus = MessageBus()
provider = _make_provider(config)
+ # Create cron service for tool usage (no callback needed for CLI unless running)
+ cron_store_path = get_data_dir() / "cron" / "jobs.json"
+ cron = CronService(cron_store_path)
+
if logs:
logger.enable("nanobot")
else:
@@ -465,6 +470,7 @@ def agent(
memory_window=config.agents.defaults.memory_window,
brave_api_key=config.tools.web.search.api_key or None,
exec_config=config.tools.exec,
+ cron_service=cron,
restrict_to_workspace=config.tools.restrict_to_workspace,
mcp_servers=config.tools.mcp_servers,
)