Skip to content

Agent capabilities discovery API for Chat UI #440

@kovtcharov

Description

@kovtcharov

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)

  1. 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)

  1. GET /api/agent/capabilities endpoint:
    @app.get("/api/agent/capabilities")
    async def agent_capabilities():
        agent = ChatAgent(ChatAgentConfig())
        return agent.get_capabilities()

Frontend

  1. Agent info in Settings or sidebar — Show available tools with descriptions
  2. Smart suggestions — Use capabilities to generate contextual prompt suggestions

Acceptance Criteria

  • /api/agent/capabilities returns tool names, descriptions, and parameters
  • Response includes agent type, model, and configuration
  • Tools marked as requiring confirmation are flagged
  • Works across all agent types (ChatAgent, CodeAgent, etc.)
  • UI displays capabilities in a readable format

Files to Modify

  • src/gaia/agents/base/agent.pyget_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.tsgetAgentCapabilities()
  • src/gaia/apps/chat/webui/src/components/SettingsModal.tsx — Display capabilities

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentchatChat SDK changesdomain:automationScheduler, autonomy, RAG, web search, watchers, researchenhancementNew feature or requestp1medium prioritytrack:consumer-appHermes-competitor consumer product — mobile-first, voice + messaging + memory + skills

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions