Skip to content

Feature: Add health_check.py utility to validate agent examples before execution #167

Description

@laasya042006

Problem statement

Currently users discover configuration problems only after running an example.

There is no common validator that checks:

Python version
Missing .env
Missing API keys
Missing dependencies
Missing agent endpoints
Port conflicts

Proposed solution

reate

scripts/health_check.py

It should

detect missing environment variables
check installed packages
verify required files
test API connectivity (optional)
print colorful diagnostics

Example

✔ Python 3.11

✔ requirements installed

✖ GEMINI_API_KEY missing

✔ .env found

✔ Port 8000 available

Difficulty:
Level 2

Scope and impact

This enhancement impacts all example projects in the repository that currently use print() statements or implement custom logging.

Affected areas include:

  • All agent example folders under examples/
  • Shared utilities (by adding a common utils/logger.py or similar module)
  • Example startup scripts (main.py, agent.py, etc.)
  • Documentation (README.md) to explain the standardized logging system

Impact:

  • Provides a consistent logging format across all examples.
  • Simplifies debugging and troubleshooting for contributors and users.
  • Makes runtime behavior easier to understand with timestamps, log levels, and optional colored output.
  • Improves maintainability by avoiding duplicated logging code in each example.
  • Enables future enhancements such as file logging, structured JSON logs, or configurable verbosity without modifying every example individually.

This change is backward-compatible and can be introduced incrementally, allowing existing examples to adopt the shared logger over time.

Alternatives considered (optional)

No response

Additional context (optional)

No response

Metadata

Metadata

Assignees

Labels

GSSoC'26enhancementNew feature or requestgssoc26GirlScript Summer of Code 2026 contributiongssoc:approvedGSSoC validation: approved by Project Adminlevel1GSSoC level 1 - beginner friendly (lowest points)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions