Skip to content

[Submission] Terrace Guardian – AI-Powered Outdoor Monitoring with Temporal + Pydantic AI #106

@danmarinescu

Description

@danmarinescu

Project link

https://github.com/danmarinescu/terrace-guardian

Language

Python

Short description (max 256 chars)

A durable Temporal workflow that monitors an outdoor terrace using Claude's vision capabilities via Pydantic AI. Analyzes photos for birds, dry plants, rain, and hazards — then autonomously plays sounds or sends notifications.

Long Description

Terrace Guardian is an AI-powered outdoor terrace monitoring system that combines Temporal's durable execution with Pydantic AI's agent framework.
A camera captures photos at configurable intervals. Each photo is sent to an LLM (Claude Sonnet 4.6) as a multimodal message through a Pydantic AI agent. Based on the analysis, the agent autonomously calls tools to take action:

  • Bird detected → plays a scare sound via macOS afplay
  • Plants look dry → sends a macOS notification to water them
  • Rain + exposed cushions/furniture → sends an urgent notification
  • Fire or other hazards → sends a safety alert

The agent's LLM calls and tool invocations are automatically wrapped as durable Temporal activities using Pydantic AI's TemporalAgent integration — making the entire AI pipeline retryable and observable.

The workflow supports pause/resume signals, configurable intervals, a status query, and continue-as-new to bound history size. A single ./run.sh script handles all setup and runs a 5-photo demo.

The agent is configured to use Claude Sonnet 4.6 by default, but can easily be swapped to any LLM supported by Pydantic AI (OpenAI, Gemini, etc.) — the model is defined in a single place.

Author(s)

Dan Marinescu @danmarinescu

Metadata

Metadata

Assignees

Labels

code exchange submissionCode and/or content about Temporal!triageIssues that Temporal folk need to look atziggy reviewedPre-screened by ZiggyBot

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions