From b6d5e6ee579a4f3693425c7f4abfe94bd0e12086 Mon Sep 17 00:00:00 2001 From: tocmo0nlord Date: Tue, 12 May 2026 23:08:45 +0000 Subject: [PATCH] fix: add AgentRegistry.get_all() method Routers calling /registry/agents raised AttributeError because get_all() was not defined. Added method returning all registered agents with active status, capabilities and instance flags. --- agent_service/agents/registry.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/agent_service/agents/registry.py b/agent_service/agents/registry.py index 6a53dce..fb97593 100644 --- a/agent_service/agents/registry.py +++ b/agent_service/agents/registry.py @@ -26,6 +26,18 @@ class AgentRegistry: return [{'agent_key': k, 'capabilities_summary': self._capabilities.get(k, '')} for k in self._active] + async def get_all(self): + """Return all registered agents with active status and capabilities.""" + return [ + { + 'agent_key': k, + 'active': k in self._active, + 'capabilities_summary': self._capabilities.get(k, ''), + 'has_instance': k in self._agents, + } + for k in self._agents + ] + async def is_active(self, agent_key): return agent_key in self._active