Skip to content

Feature Request: Hot-reload YAML configuration changes #282

@hghalebi

Description

@hghalebi

Support for automatically reloading YAML configuration files when they change on disk, without requiring a restart of Cagent.

Implementation:

  • Watch agent YAML files for changes using fsnotify
  • When a file changes, validate the new configuration
  • Apply the changes to running agents without losing state
  • Fall back to previous config if validation fails

Why you'd like to see it

Problem: Changing any agent configuration requires a full restart of Cagent, which:

  • Loses all agent context and ongoing conversations
  • Interrupts service availability
  • Makes iterative prompt engineering painful (edit → stop → start → test → repeat)

Solution benefits:

  • Instant prompt/instruction updates while testing
  • Zero-downtime config updates in production
  • Faster development cycle when tuning agents

Workarounds?

Currently using:

  • Manual restart after each YAML edit (loses state)
  • Running multiple Cagent instances and switching between them (complex)

Neither preserves agent state or provides seamless updates.

Additional context

This is a common pattern in cloud-native tools:

  • Kubernetes automatically updates mounted ConfigMaps
  • Prometheus reloads config on SIGHUP
  • Most modern servers support graceful config reload

Simple MVP scope:

  • Only watch files specified at startup
  • Only reload agent instructions/prompts (not model changes)
  • Log changes for debugging
  • Keep it simple - no fancy rollback mechanisms initially

Similar to how Docker Compose watches for file changes in development mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions