Summary
Add an API endpoint that lets the Chat UI query what tools and capabilities the current agent has. This enables the UI to display an "Agent Info" panel showing available tools, their descriptions, and whether they're enabled or restricted.
Motivation
Users interacting through the Chat UI have no visibility into what the agent can actually do. They don't know it can run shell commands, search documents, read files, etc. An agent capabilities endpoint would let the UI show this information and help users write better prompts.
Design
Agent Framework (src/gaia/agents/base/agent.py)
get_capabilities() method:
def get_capabilities(self) -> dict:
"""Return metadata about this agent's tools and configuration."""
tools = []
for name, func in self._tool_registry.items():
tools.append({
"name": name,
"description": getattr(func, "__doc__", ""),
"parameters": getattr(func, "_tool_params", {}),
"requires_confirmation": name in TOOLS_REQUIRING_CONFIRMATION,
})
return {
"agent_type": self.__class__.__name__,
"model": self.model_id,
"max_steps": self.max_steps,
"tools": tools,
}
Server (src/gaia/chat/ui/server.py)
GET /api/agent/capabilities endpoint:
@app.get("/api/agent/capabilities")
async def agent_capabilities():
agent = ChatAgent(ChatAgentConfig())
return agent.get_capabilities()
Frontend
- Agent info in Settings or sidebar — Show available tools with descriptions
- Smart suggestions — Use capabilities to generate contextual prompt suggestions
Acceptance Criteria
Files to Modify
src/gaia/agents/base/agent.py — get_capabilities()
src/gaia/agents/base/tools.py — Expose tool metadata from @tool decorator
src/gaia/chat/ui/server.py — /api/agent/capabilities endpoint
src/gaia/apps/chat/webui/src/services/api.ts — getAgentCapabilities()
src/gaia/apps/chat/webui/src/components/SettingsModal.tsx — Display capabilities
Summary
Add an API endpoint that lets the Chat UI query what tools and capabilities the current agent has. This enables the UI to display an "Agent Info" panel showing available tools, their descriptions, and whether they're enabled or restricted.
Motivation
Users interacting through the Chat UI have no visibility into what the agent can actually do. They don't know it can run shell commands, search documents, read files, etc. An agent capabilities endpoint would let the UI show this information and help users write better prompts.
Design
Agent Framework (
src/gaia/agents/base/agent.py)get_capabilities()method:Server (
src/gaia/chat/ui/server.py)GET /api/agent/capabilitiesendpoint:Frontend
Acceptance Criteria
/api/agent/capabilitiesreturns tool names, descriptions, and parametersFiles to Modify
src/gaia/agents/base/agent.py—get_capabilities()src/gaia/agents/base/tools.py— Expose tool metadata from@tooldecoratorsrc/gaia/chat/ui/server.py—/api/agent/capabilitiesendpointsrc/gaia/apps/chat/webui/src/services/api.ts—getAgentCapabilities()src/gaia/apps/chat/webui/src/components/SettingsModal.tsx— Display capabilities