Chat Automation Manager

Production-Style AI Workflows in Python - A desktop tool that orchestrates Codex and Gemini chat sessions with robust guardrails, templates, and state management.

Posted by CM-WebDev on November 25, 2025

Project Overview

Chat Automation Manager is a small desktop tool I built in Python as part of a 100 Days of Code course, then extended with production-style practices for my own workflow. It provides a unified GUI to manage AI chat sessions (Codex in WSL and Gemini on Windows) as structured folders with consistent templates, behavior contracts, and explicit save flows.

Instead of treating AI chats as disposable, the tool turns each session into a versionable “mini-project” with its own AGENTS.md, NOTES.md, and optional chat_log.md, making it easier to reason about design decisions, preserve context, and resume work reliably.

Core Technologies

  • Python 3 + Tkinter for the desktop GUI and session orchestration.
  • WSL integration to launch Codex CLI in a Linux environment from Windows.
  • Config + state modules (config.py, state.py) for centralised paths, categories, and window geometry.
  • Template system for generating per-session AGENTS.md, NOTES.md, and prompt snippets in a consistent way.

Technical Execution & Problem Solving

A core design goal was to make AI use predictable and safe rather than ad-hoc. The app models categories as structured objects (name + base path), persists them in a single app_state.json, and restores both the last-used category and window geometry on startup. This avoids scattered state files and makes behaviour easy to reason about.

I also built explicit guardrails into the default AGENTS.md contract: offline-by-default networking, URL-only HTTP tools, and clear rules for when to read or write chat_log.md. This forces a deliberate workflow around web access and note-taking, which is closer to how I’d structure an internal developer tool in a team setting.

Key Features & Technical Highlights

  • Multi-engine support: One GUI coordinates both Codex (WSL) and Gemini (Windows), sharing a single NOTES.md per session while keeping separate chat logs.
  • Session-as-folder model: Every chat lives in its own folder under BASE_DIR with consistent structure and templates, making it easy to archive or move between machines.
  • Copy prompts & stack snapshots: Built-in “Copy Prompts” buttons generate standard setup, save, and stack-snapshot prompts, reducing boilerplate and improving reproducibility.
  • Explicit save flows: Save Session and Save Chat Log commands update notes and transcripts only when requested, keeping history concise instead of logging every turn.
  • Dark-themed, stateful UI: The Tkinter UI uses a consistent dark theme, remembers window size/position, and keeps the session list scrollable and keyboard-friendly.

Demonstrated Skill Set

  • Desktop application design: Structured a small but non-trivial Tkinter app with clear separation between UI, state management, configuration, and templates.
  • Pragmatic engineering practices: Consolidated state into a single JSON file, reduced legacy config files, and treated behavior contracts as first-class documentation.
  • Automation & tooling mindset: Designed the tool to improve my own AI-assisted development workflow, with an emphasis on reproducibility, explicit commands, and safe defaults.
  • Cross-environment integration: Coordinated Windows, WSL, and CLI tools in a way that could be adapted to other engines or internal tools in a team environment.