-
Notifications
You must be signed in to change notification settings - Fork 439
Description
π Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
π Feature Summary
No response
β Problem Statement / Motivation
Currently, managing and observing AI agents via the kagent CLI can be fragmented. Users need a centralized, efficient way to monitor agent statuses, inspect loaded skills, view execution logs, and test prompts in real-time. Without a rich terminal interface, observing the internal state of agents and their tool usage requires jumping between different commands or relying on external tools, which slows down the developer experience (DX) and operational workflow.
There is a strong need for a unified, keyboard-centric dashboard that allows operators to interact with and debug their Kubernetes-based AI agents seamlessly.
π‘ Proposed Solution
Implement a robust, k9s-inspired Terminal UI (TUI) leveraging the charmbracelet/bubbletea framework.
The proposed solution will introduce an interactive, non-blocking dashboard with the following core capabilities:
- Agent View: A navigable list to manage and monitor agent configurations (Connection status, Models, API Keys).
- Chat View: An integrated interactive chat interface to test prompts and behaviors directly with the selected AI agent from the terminal.
- Skills/Tools View: A dedicated view to inspect which skills/tools (e.g., K8s logs, GitHub access) are loaded and available to the agent.
- Session/Run View: Real-time monitoring of execution statuses, thought logs, and error catching.
π Alternatives Considered
No response
π― Affected Service(s)
None
π Additional Context
MVP
While Kagent ultimately needs to support a wide range of use cases (AI Agents, MCP Servers, etc.), I propose we start by providing a TUI focused on the core features:
- Agent UI
- Manage agent configurations (e.g., ChatGPT, Anthropic)
- Model details
- API Keys
- Connection Status (Ready/Not Ready)
- etc.
- Chat UI
- Interactive chat interface to test prompts and behaviors directly with the selected AI Agent.
- Skills/Tool View UI
- Display a list of skills and tools available to the AI Agent
- e.g., Fetching K8s logs, GitHub access, calling external APIs, etc.
- Session/Run View UI
- Monitor the execution status of AI Agents
- Track which agent is using which skill/tool
- Check for any errors
- etc.
Future Scope (to be added later):
- A2A (Agent-to-Agent) communication routing
- User permissions and RBAC management (user lists, per-user permissions)
- Observability (API call latency, token consumption, LLM costs)
- etc.
Keybindings (k9s-inspired)
Global
| Key | Operation |
|---|---|
ctrl+c |
Quit |
esc |
Go back to previous screen |
? |
Help |
Navigation
| Key | Operation |
|---|---|
j |
Move down |
k |
Move up |
enter |
Navigate to detail view |
Actions
| Key | Operation |
|---|---|
l |
View logs |
d |
Stop agent |
r |
Restart agent |
s |
Suspend agent |
a |
Resume agent |
e |
Edit agent |
t |
Test agent |
/ |
Search agents |
n |
Create new agent |
del |
Delete agent |
Bubble Tea UI Architecture
I plan to build the UI using the following 4 components:
| Component | Description |
|---|---|
| State Router | Manages screen transitions using tea.Model. Holds the current screen state and routes user inputs to the appropriate view. |
| Reusable Components | Shared UI elements (e.g., tables, inputs, lists) used across multiple screens. |
| Screen Components | View-specific components like AgentListView, AgentDetailView, and SkillView. |
| Data Fetching Layer | Handles asynchronous data retrieval from the K8s API and Kagent backend, managing state and providing necessary data to the UI components. |
Dependency Graph:
graph TD
StateRouter --> ScreenComponents
ScreenComponents --> ReusableComponents
ScreenComponents --> DataFetchingLayer
Based on the current TUI structure in go/core/cli/internal/tui/, I plan to integrate the new features as follows:
- State Router: I will either extend the existing
workspace.goto handle routing state or create a newrouter.goifworkspace.gois strictly meant for layout. - Screen Components: Similar to how
chat.gois implemented, I will add new view models likeagent_list.goandagent_detail.go. - Keybindings: I will define the global and navigation keys in the
keys/directory usingbubbles/keyto keep them centralized. - Styling: I will utilize the existing Lipgloss definitions in the
theme/directory for borders, colors, and lists to maintain visual consistency.
ref: #1451
π Are you willing to contribute?
- I am willing to submit a PR for this feature
Metadata
Metadata
Assignees
Labels
Type
Projects
Status