Add AI Assistant for guided NWB conversion #1033
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds an AI Assistant mode to NWB GUIDE — a chat-based interface that leads users through converting their neurophysiology data to NWB format and publishing on DANDI Archive.
The assistant is powered by Claude (via the Claude Agent SDK) and guides users through 7 phases:
What's included
Frontend (Lit web components):
AIAssistantPage— two-view layout: session history list + active chat with a real-time todo/phase panelChatMessage— renders markdown, collapsible tool-use cards, and multiple-choice answer buttons (<choices>convention)ChatInput— message input with send and interrupt controlsSettingsPanel— API key and model configurationBackend (Flask-RESTX):
/ainamespace with session CRUD, message send, interrupt, and SSE streaming endpointsConversionAgentclass wrappingClaudeSDKClientfor multi-turn agent sessions~/NWB_GUIDE/ai-sessions/$file:includes from bundled phase/knowledge filesBundled skill files:
fetch_paper.pytool for extracting methods sections from DOI/PMID referencesArchitecture
Test plan
npm start→ dev mode → click "AI Assistant" in sidebar → page loadsophys_testing_data/and secrets are NOT committed🤖 Generated with Claude Code