Build Chat Interface.user.prompt
# Build Streamlit Chat Interface
**Agent:** Streamlit UI Development Agent
**Category:** UI Development
**Complexity:** Intermediate
**Duration:** 1-2 hours
---
## Purpose
Build a production-quality Streamlit chat interface with session state management, message history display, and integration points for Claude API calls.
---
## Instructions for Agent
Create a complete Streamlit chat interface with the following features:
### Requirements
1. **Chat Display**
- Display message history using `st.chat_message`
- Show user and assistant messages with proper formatting
- Support markdown rendering in messages
- Display timestamps
2. **User Input**
- Use `st.chat_input` for message entry
- Handle empty input gracefully
- Show placeholder text
- Clear input after submission
3. **Session State Management**
- Initialize `messages` list in session state
- Persist conversation across reruns
- Support conversation clearing
- Track conversation metadata
4. **Integration Points**
- Provide clear integration point for Claude Integration Agent
- Pass messages to backend processing
- Display streaming responses
- Handle loading states
5. **UI Polish**
- Add chat header with title
- Include "Clear Chat" button
- Show token usage (if available)
- Responsive layout
---
## Expected Outputwhen to use it
Community prompt sourced from the open-source GitHub repo Modular-Earth-LLC/multi-agent-ai-development-framework (MIT). A "Build Chat Interface.user.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
Modular-Earth-LLC/multi-agent-ai-development-framework · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions