Multi-purpose AI assistant powered by Claude Agent SDK for YouTube processing, Google Workspace management, coding assistance, financial analysis, and memory.
- Session Memory: Multi-turn conversations with context retention using ClaudeSDKClient
- YouTube Processing: Extract transcripts, download videos, create study notes via subagent
- Subagents: Specialized agents for YouTube processing and agent creation
- Skills System: FFmpeg/Whisper processing, skill creation
- Google Workspace: Gmail, Calendar, Drive (requires MCP setup - see GOOGLE_WORKSPACE.md)
- Coding Assistant: Debug, refactor, code review
- Financial Analysis: Calculations and data analysis
- Rich CLI: Colorful terminal UI with streaming responses
- Permission Management: Control over tool usage
- Tool Visibility: See all agent actions in real-time
- Python 3.12+
uvpackage manager- Authentication: Claude subscription (default) OR Anthropic API key
-
Clone and navigate to project
cd nitzan-assistant -
Install dependencies
uv sync
-
Authentication (Choose one)
Option A: Claude Subscription (Recommended)
- No setup needed! Just run the assistant
- Uses your Claude subscription automatically
Option B: API Key
cp .env.example .env # Edit .env and uncomment: ANTHROPIC_API_KEY=your_key_hereGet API key from: https://console.anthropic.com/
-
Run the assistant
# Interactive mode uv run main.py # Single query mode uv run main.py "What can you help me with?"
Start the assistant in interactive REPL mode with persistent session memory:
uv run main.pyThe assistant will remember your conversation across multiple turns within the session.
Commands:
help- Show available commands and capabilitiesclear- Clear screenexit/quit- Exit assistant
Run one-off queries:
uv run main.py "Process this YouTube video: https://youtube.com/watch?v=..."Uses ClaudeSDKClient for multi-turn conversations with context retention:
- Maintains conversation history across queries
- Remembers context within session
- Proper async context manager lifecycle
Specialized agents invoked via Task tool:
- youtube: Process YouTube videos - transcripts, downloads, frames, study notes
- Tools: Bash, Read, Write, WebFetch, Grep, Glob
- Model: Sonnet
- meta-agent: Generate new subagent configuration files dynamically
- Tools: Write, Read, WebFetch
- Model: Opus
Loaded from filesystem via setting_sources:
- video-processor: FFmpeg + Whisper for video/audio processing
- meta-skill: Create new skills dynamically
Uses in-process custom tools via create_sdk_mcp_server():
- Drive: List, upload, download files
- Calendar: List events, create events
- Gmail: Read, send, archive, label, filter emails (15 tools total)
- Implementation:
@tooldecorator with direct Google API calls - Pattern: Same-process Python functions (not external MCP servers)
See ARCHITECTURE.md for detailed explanation of custom tools vs MCP servers.
- Session Memory: ClaudeSDKClient maintains context across turns
- Streaming: Real-time response streaming via
receive_response() - Permissions:
acceptEditsmode (prompts for dangerous ops) - Tools: Explicit allowlist (Google tools, Skills, Task, Bash, Read, Write, etc.)
- Custom Tools: In-process MCP server via
create_sdk_mcp_server - Setting Sources:
["user", "project", "local"]- loads .claude configs - Model: Claude Sonnet (default), Opus for meta-agent
- Max turns: 100 conversation turns per session
Edit main.py in get_agent_options() function (lines 128-145) to customize the agent's behavior.
-
Use the meta-agent to create new subagents:
uv run main.py "Create a subagent for financial analysis" -
Or manually add to
agentsdict inget_agent_options()(line 148):agents={ "your-agent": { "description": "When to use this agent...", "prompt": "System prompt for agent...", "tools": ["Read", "Write"], "model": "sonnet" } }
Use the meta-skill skill to create new capabilities:
uv run main.py "Create a skill for managing my calendar"Google tools are already integrated! Just need to authenticate:
-
Setup OAuth (first time only):
# Copy setup script from personal-assistant project python setup_google_oauth.pyThis creates
storage/google_token.jsonwith your credentials. -
Tools available:
- Gmail: 10 tools (list, read, send, archive, label, filter, etc.)
- Drive: 3 tools (list, upload, download)
- Calendar: 2 tools (list events, create event)
See ARCHITECTURE.md for how custom tools work (spoiler: NOT external MCP - simpler!)
Edit main.py in get_agent_options() (line 119):
acceptEdits- Prompt for dangerous operations (default)acceptAll- Auto-approve everything (use with caution)requireApproval- Prompt for all tool uses
nitzan-assistant/
├── main.py # Main entry (ClaudeSDKClient + custom tools setup)
├── pyproject.toml # Dependencies
├── .env # API key (optional, not in git)
├── .env.example # Template
├── ARCHITECTURE.md # Custom tools vs MCP explanation
├── tools/ # Custom tools
│ ├── __init__.py
│ └── google_services.py # GoogleTools class (15 Google Workspace tools)
├── .claude/ # Skills and agents
│ ├── skills/ # File-based skills (loaded via setting_sources)
│ │ ├── video-processor/ # FFmpeg + Whisper skill
│ │ └── meta-skill/ # Skill creation skill
│ └── agents/ # Subagent definitions (also configured in code)
│ ├── youtube-agent.md # YouTube processing subagent
│ └── meta-agent.md # Agent creation subagent
└── README.md
claude-agent-sdk>=0.1.6- Claude Agent SDKrich>=13.0.0- Terminal UIpython-dotenv>=1.0.0- Environment variablesgoogle-api-python-client>=2.0.0- Google APIsgoogle-auth-httplib2>=0.2.0- Google authgoogle-auth-oauthlib>=1.0.0- Google OAuth
By default, uses Claude subscription (no setup needed).
To use API key instead:
- Create
.envfile:cp .env.example .env - Uncomment and set:
ANTHROPIC_API_KEY=your_key_here
ModuleNotFoundError: No module named 'claude_agent_sdk'
Solution: Run uv sync
[ERROR] Not authenticated with Google
Solution: Run OAuth setup:
python setup_google_oauth.pyCreates storage/google_token.json with your Google credentials.
Private project for Nitzan