DSAgent v0.6.1 - Conversational Agent & Interactive CLI
DSAgent v0.6.1 - Conversational Agent & Interactive CLI
This is a major feature release that transforms DSAgent into a fully conversational data science assistant with an interactive CLI, session persistence, and MCP tool integration.
Highlights
- Conversational Mode: Natural back-and-forth dialogue with context awareness
- Interactive CLI: Rich terminal interface with slash commands
- Session Persistence: Save and resume analysis sessions
- Live Notebook Sync: Bidirectional sync with Jupyter notebooks
- MCP Integration: Connect external tools via Model Context Protocol
- HITL Support: Human-in-the-loop approval workflows
New Features
Conversational Agent
- Hybrid execution modes: Switch between conversational (single response) and autonomous (plan-loop) modes
- Plan extraction: Automatic detection of
<plan>tags with[x]/[ ]step tracking - Context awareness: Remembers previous messages and analysis results
- NotebookBuilder integration: Auto-generates Jupyter notebooks from conversations
Interactive CLI (dsagent chat)
Unified entry point with subcommands:
dsagent # Start interactive chat (default)
dsagent chat # Same as above
dsagent run "task" # One-shot task execution
dsagent init # Setup wizard
dsagent mcp add # Add MCP server14 Slash Commands:
| Command | Description |
|---|---|
/help |
Show available commands |
/new |
Start new session |
/sessions |
List saved sessions |
/load <id> |
Load a previous session |
/context |
Show current kernel context |
/vars |
List variables in kernel |
/history |
Show conversation history |
/export |
Export notebook |
/clear |
Clear screen |
/quit |
Exit |
/model |
Show/change model |
/status |
Show session status |
/data |
List data files |
/workspace |
Open workspace folder |
Session Persistence
- SessionManager: Full CRUD operations for sessions
- ConversationHistory: Track all messages with timestamps
- KernelSnapshot: Save/restore kernel state (variables, DataFrames)
- Storage backends: SQLite and JSON stores
- Workspace structure:
runs/{session_id}/data/,artifacts/,notebooks/
Kernel State Management
- ExecutorBackend: Abstract interface for kernel backends
- LocalExecutor: IPython kernel with state persistence
- KernelIntrospector: Inspect variables, DataFrames, shapes, dtypes
- Context injection: Auto-inject kernel context into LLM prompts
Live Notebook Sync
- LiveNotebookBuilder: Saves notebook after each cell execution
- JupyterFileWatcher: Detects external changes via
watchdog - LiveNotebookSync: Bidirectional sync between agent and Jupyter
- CLI flags:
--live-notebookand--notebook-sync
HITL (Human-in-the-Loop) Support
Multiple approval modes via --hitl flag:
| Mode | Description |
|---|---|
none |
No approval required (default) |
plan |
Approve plans before execution |
full |
Approve both plans and code |
plan_answer |
Approve plans and final answers |
on_error |
Intervene only on errors |
Automatic Summarization
- Summarize old messages when conversation exceeds N messages
- Keep last K messages complete
- Store summary in memory for context continuity
MCP Tool Integration
- MCPManager: Connect external tools to the agent
- Built-in templates:
filesystem,fetch,brave-search,memory,bigquery - Environment variables: Pass secrets to MCP subprocesses
- CLI management:
dsagent mcp add/list/remove
Improvements
LiteLLM Proxy Support
- Fixed routing for non-OpenAI models (Claude, Gemini) through LiteLLM proxy
get_proxy_model_name(): Transform model names for proxy routing- Works with
LLM_API_BASEenvironment variable
Documentation
- New
docs/CLI.md: Complete CLI reference - New
docs/MCP.md: MCP configuration guide - New
docs/PYTHON_API.md: Python SDK documentation - Updated
README.md: Simplified with links to detailed docs
Developer Experience
- ASCII art banner with gradient colors on startup
- Rich-formatted output with syntax highlighting
- Command completion and history with
prompt_toolkit
New Dependencies
watchdog = ">=3.0.0" # File system monitoring
pyyaml = ">=6.0" # MCP config handlingStatistics
- 39 files changed
- +13,452 lines added
- 371+ tests passing
- 6 new test files with comprehensive coverage
Examples
Start Interactive Session
dsagentOne-Shot Task
dsagent run "analyze sales.csv and find top 10 products"With Live Notebook
dsagent --live-notebookWith HITL Approval
dsagent --hitl planFull Changelog
Thank you for using DSAgent!