Summary
AI Chat using Bedrock Converse API + Tool Use. Query AWS resources with natural language.
Tools (6)
| Tool |
Purpose |
Implementation |
list_services |
List 69 services |
Registry |
list_resources |
List resource types |
Registry |
query_resources |
List resources |
DAO.List() |
get_resource_detail |
Get resource detail |
DAO.Get() |
tail_logs |
CloudWatch Logs |
FilterLogEvents |
search_aws_docs |
AWS documentation |
AWS Docs API |
UI Modes
Overlay Mode (context-aware)
Invoke from any view with keybind. AI knows current context.
┌─────────────────────────────────────────────┐
│ ResourceBrowser (dimmed) │
│ ┌─────────────────────────────────────────┐ │
│ │ 💬 AI Chat [Esc] │ │
│ │ Context: ec2/instances/i-0abc123 │ │
│ │───────────────────────────────────────── │ │
│ │ You: What is this instance for? │ │
│ │ AI: This is a web server in prod VPC... │ │
│ │ > [input] │ │
│ └─────────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
Fullscreen Mode (:chat)
Dedicated chat view for longer conversations.
Context Awareness
| Current View |
Auto Context |
| ResourceBrowser |
service, resource_type, selected item |
| DetailView |
full resource detail |
| LogView |
log_group, current filter |
| ServiceBrowser |
none (general chat) |
Persistence
Phase 1: Session History
~/.config/claws/chat/
├── sessions/
│ ├── 2026-01-07-abc123.json
│ └── 2026-01-07-def456.json
└── current.json
- Keep last N sessions (default: 10)
:chat history - list past sessions
:chat resume - resume session
Phase 2 (future): Resource Notes
- AI auto-saves important findings per resource
- Show "AI Notes" section in DetailView
Implementation
New Files
internal/ai/bedrock.go - Converse API wrapper (streaming)
internal/ai/tools.go - Tool definitions + executor
internal/ai/session.go - Session persistence
internal/view/chat_overlay.go - Overlay component
internal/view/chat_view.go - Fullscreen chat
Key Decisions
- Read-only: List/Get only, no destructive operations
- DAO-based: 163 resources, grows with DAOs
- Model: Configurable (Sonnet/Haiku)
Tasks
Open Questions
Summary
AI Chat using Bedrock Converse API + Tool Use. Query AWS resources with natural language.
Tools (6)
list_serviceslist_resourcesquery_resourcesget_resource_detailtail_logssearch_aws_docsUI Modes
Overlay Mode (context-aware)
Invoke from any view with keybind. AI knows current context.
Fullscreen Mode (
:chat)Dedicated chat view for longer conversations.
Context Awareness
Persistence
Phase 1: Session History
:chat history- list past sessions:chat resume- resume sessionPhase 2 (future): Resource Notes
Implementation
New Files
internal/ai/bedrock.go- Converse API wrapper (streaming)internal/ai/tools.go- Tool definitions + executorinternal/ai/session.go- Session persistenceinternal/view/chat_overlay.go- Overlay componentinternal/view/chat_view.go- Fullscreen chatKey Decisions
Tasks
Open Questions
A??a?