Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@mattjohnsonpint
Copy link
Contributor

Lists the active agents on the /health endpoint, formatted for readability.

Example output:

{
  "status": "ok",
  "environment": "dev",
  "version": "v0.18.0-alpha.3-5-g9566a5cf",
  "agents": [
    {"id": "d0ro44tj5qn5rbq37ong", "name": "Counter", "status": "running"},
    {"id": "d0ro44tj5qn5rbq37opg", "name": "Counter", "status": "running"},
    {"id": "d0ro44lj5qn5rbq37olg", "name": "Counter", "status": "running"}
  ]
}

@mattjohnsonpint mattjohnsonpint requested review from a team and Copilot May 28, 2025 22:31
@linear
Copy link

linear bot commented May 28, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new feature to list agents on the /health endpoint by including an "agents" array in the JSON response, as well as refactoring agent-related types to be exported with appropriate JSON field annotations.

  • Added JSON formatting for the /health endpoint response to include a list of active agents
  • Refactored internal agent types to exported AgentInfo and AgentStatus
  • Updated the CHANGELOG with the new feature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
runtime/httpserver/health.go Updates the /health endpoint to output formatted JSON including an "agents" array
runtime/actors/agents.go Updates agent types to be exported and adds ListAgents helper function
CHANGELOG.md Documents the addition of listing agents on the /health endpoint

@trunk-io
Copy link

trunk-io bot commented May 28, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

@mattjohnsonpint mattjohnsonpint enabled auto-merge (squash) May 28, 2025 22:45
@mattjohnsonpint mattjohnsonpint merged commit f79a595 into main May 28, 2025
32 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-3423-report-agents-on-health-endpoint branch May 28, 2025 22:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants