<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7" -->

---
title: How to Build and Schedule Local AI Assistants for Daily...
description: A step-by-step guide to building a local AI agent scheduler using Python, Ollama, and LangChain. The system runs on a cron schedule and automatically executes...
canonical: https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Build and Schedule Local AI Assistants for Daily Tasks | daily.dev
og:description: A step-by-step guide to building a local AI agent scheduler using Python, Ollama, and LangChain. The system runs on a cron schedule and automatically executes...
og:url: https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7
og:image: https://api.daily.dev/og/posts/hgfBk6Cu7.png
og:image:alt: How to Build and Schedule Local AI Assistants for Daily Tasks
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Build and Schedule Local AI Assistants for Daily Tasks

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · 10 min read · 3 upvotes · 0 comments

## Summary

A step-by-step guide to building a local AI agent scheduler using Python, Ollama, and LangChain. The system runs on a cron schedule and automatically executes multiple AI agents — for stock checks, news digests, and weather briefs — storing results as Markdown files. Each agent is a simple Python module with a NAME and run() function, making it easy to add new agents without modifying the scheduler. The setup keeps inference local via Ollama with the Qwen model, avoiding API costs and keeping data private.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks>

## Questions this post answers

### How do I schedule a local Ollama-based AI agent to run automatically every day?

Use your operating system's native scheduler to trigger a Python script rather than building custom scheduling logic into the agent code. On macOS and Linux, create a shell script that activates the virtual environment and runs the scheduler, then register it with cron using an entry like '0 8 * * * /full/path/to/run_scheduler.sh'. On Windows, use schtasks with the full path to the venv's python.exe and script, setting the working directory so relative folders resolve correctly.

_daily.dev surfaces practical automation patterns for developers wiring up local AI agent workflows._

### How can I structure a Python project so I can add new AI agents without modifying the scheduler code?

Put each agent in its own Python file inside an agents/ folder, where every file defines a NAME string and a run() function that takes no arguments and returns a string. A central scheduler script imports every module in that folder, calls run() on each, and writes the returned text to a timestamped markdown file in an outputs/ folder, so adding a new agent only requires dropping in a new file.

_developers designing extensible agent pipelines can track patterns like this via daily.dev._

### How do I use Ollama's hosted web search API from Python for an AI news digest agent?

Send a POST request to https://ollama.com/api/web_search with an Authorization header of 'Bearer' plus your OLLAMA_API_KEY, and a JSON body containing a query string and max_results parameter. The response includes a results list under the 'results' key, which can be passed to a LangChain agent backed by a local Ollama model (such as qwen3.5:4b) to generate a summarized digest with source URLs.

_daily.dev helps developers stay current on integrating hosted search APIs into local LLM workflows._

## Similar posts on daily.dev

- [How to Build a Personal AI Web Research Agent with Ollama and Qwen](https://daily.dev/posts/how-to-build-a-personal-ai-web-research-agent-with-ollama-and-qwen-a1odzqgy6) · freeCodeCamp · 4 upvotes · 0 comments
- [How to Build CLI Agents with Python & Ollama](https://daily.dev/posts/how-to-build-cli-agents-with-python-ollama-ee7zc8teg) · Towards Data Science · 2 upvotes · 0 comments
- [Building AI Agents with Local Small Language Models](https://daily.dev/posts/building-ai-agents-with-local-small-language-models-nsxe8jo1h) · Machine Learning Mastery · 0 upvotes · 0 comments
- [How to Build Your Own Local AI Agent with Tool Calling and Memory](https://daily.dev/posts/how-to-build-your-own-local-ai-agent-with-tool-calling-and-memory-edzytv5sh) · freeCodeCamp · 3 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#python](https://daily.dev/tags/python), [#ai-agents](https://daily.dev/tags/ai-agents), [#langchain](https://daily.dev/tags/langchain), [#ollama](https://daily.dev/tags/ollama)

[View this post on daily.dev](https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Build and Schedule Local AI Assistants for Daily Tasks","url":"https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7"},"datePublished":"2026-07-13T23:25:08.808Z","dateModified":"2026-09-14T09:08:48.962Z","description":"A step-by-step guide to building a local AI agent scheduler using Python, Ollama, and LangChain. The system runs on a cron schedule and automatically executes...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/34afb53b603e39f674dabc727733ad6c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/34afb53b603e39f674dabc727733ad6c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"freeCodeCamp","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"freeCodeCamp","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1628412854/logos/freecodecamp","url":"https://daily.dev/sources/freecodecamp"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,python,ai-agents,langchain,ollama","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"freeCodeCamp","item":"https://daily.dev/sources/freecodecamp"},{"@type":"ListItem","position":3,"name":"How to Build and Schedule Local AI Assistants for Daily Tasks"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-build-and-schedule-local-ai-assistants-for-daily-tasks-hgfbk6cu7#faq","mainEntity":[{"@type":"Question","name":"How do I schedule a local Ollama-based AI agent to run automatically every day?","acceptedAnswer":{"@type":"Answer","text":"Use your operating system's native scheduler to trigger a Python script rather than building custom scheduling logic into the agent code. On macOS and Linux, create a shell script that activates the virtual environment and runs the scheduler, then register it with cron using an entry like '0 8 * * * /full/path/to/run_scheduler.sh'. On Windows, use schtasks with the full path to the venv's python.exe and script, setting the working directory so relative folders resolve correctly. daily.dev surfaces practical automation patterns for developers wiring up local AI agent workflows."}},{"@type":"Question","name":"How can I structure a Python project so I can add new AI agents without modifying the scheduler code?","acceptedAnswer":{"@type":"Answer","text":"Put each agent in its own Python file inside an agents/ folder, where every file defines a NAME string and a run() function that takes no arguments and returns a string. A central scheduler script imports every module in that folder, calls run() on each, and writes the returned text to a timestamped markdown file in an outputs/ folder, so adding a new agent only requires dropping in a new file. developers designing extensible agent pipelines can track patterns like this via daily.dev."}},{"@type":"Question","name":"How do I use Ollama's hosted web search API from Python for an AI news digest agent?","acceptedAnswer":{"@type":"Answer","text":"Send a POST request to https://ollama.com/api/web_search with an Authorization header of 'Bearer' plus your OLLAMA_API_KEY, and a JSON body containing a query string and max_results parameter. The response includes a results list under the 'results' key, which can be passed to a LangChain agent backed by a local Ollama model (such as qwen3.5:4b) to generate a summarized digest with source URLs. daily.dev helps developers stay current on integrating hosted search APIs into local LLM workflows."}}]}
```

