Convert a schedule in natural language to a cron schedule using agentic programming.
The Cron Agent is built on Pydantic AI.
-
Clone the clone-agent repository
-
Install uv
-
Create venv and install dependencies
cd cron-agent
uv sync- Activate the virtual environment
source .venv/bin/activate- Create .env file with your API keys
OPENAI_API_KEY=...
ANTHROPIC_API_KEY=...
- Run the following command to load the API keys
set -a; source .env; set +aConvert a schedule in natural language to a cron schedule
python main.pyThe following script will test two cron agents using LLMs from Anthropic and OpenAI.
PYTHONPATH=. pytest -vs tests/test_cron_agent.py