A Go-based virtual assistant that integrates with Google Calendar and Telegram, using your local Claude Code subscription for natural language processing. The assistant can create calendar events, check today's meetings, and send automated reminders via Telegram.
- π₯ Langchain Go: Agent orchestrator with langchain go for simplicity
- π§ Claude Code: Uses your local Claude Code subscriptions, without API Key (for education / dev purposes)
- π€ Telegram Bot: Interactive chat interface with natural language processing
- π Google Calendar: Create events and check today's schedule
- π Ngrok: Works with ngrok for local development with webhooks support
- π Cron: Automatic notifications 10 min before meetings with cron
- Go 1.21 or higher
- GCP with Calendar API enabled
- Telegram Bot Token
- Claude Code subscription (installed locally)
- Ngrok
git clone <your-repo-url>
cd virtual-assistant
go mod tidy- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Calendar API:
- Go to "APIs & Services" > "Library"
- Search for "Google Calendar API" and enable it
- Create credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth 2.0 Client IDs"
- Choose "Desktop application"
- Download the JSON file and save it as
credentials.jsonin the project root
- Message @BotFather on Telegram
- Send
/newbotand follow the instructions - Choose a name and username for your bot
- Copy the bot token provided by BotFather
Since you already have a Claude Code subscription, the system will use your local Claude Code installation:
- Ensure Claude Code is installed and accessible in your PATH
- Test by running
claude --versionin your terminal - If Claude Code is installed in a different location, note the full path for configuration
- Install ngrok:
brew install ngrok/ngrok/ngrok- Start ngrok to expose your local server:
ngrok http 8080- Copy the HTTPS URL from ngrok output (e.g.,
https://abc123.ngrok.io)
- Copy the example environment file:
cp .env.example .env- Edit
.envwith your prepared values:
# Required
TELEGRAM_BOT_TOKEN=1234567890:ABCdefGhIjKlMnOpQrStUvWxYz
CLAUDE_CODE_PATH=claude
GOOGLE_CREDENTIALS_PATH=credentials.json
# Optional (for webhook mode - use ngrok URL from above)
WEBHOOK_URL=https://abc123.ngrok.io
PORT=8080go run cmd/main.goEnsure ngrok is running in another terminal, then:
go run cmd/main.go- When you first run the application, it will prompt you to authorize Google Calendar access
- Open the provided URL in your browser
- Sign in to Google and authorize the application
- Copy the authorization code back to the terminal
- The token will be saved automatically for future use
- Find your bot on Telegram using the username you created
- Start a conversation with
/start - Try these commands:
- "Create a meeting tomorrow at 2 PM called 'Team Standup'"
- "What meetings do I have today?"
- "/today" - Quick command to check today's schedule
- "Schedule a call with John next Monday at 10 AM"
virtual-assistant/
βββ cmd/
β βββ main.go # Application entry point
βββ internal/
β βββ bot/ # Telegram bot handling
β β βββ telegram.go
β βββ calendar/ # Google Calendar integration
β β βββ calendar.go
β βββ config/ # Configuration management
β β βββ config.go
β βββ llm/ # Claude AI integration
β β βββ claude.go
β βββ reminder/ # Meeting reminder system
β βββ reminder.go
βββ pkg/
β βββ utils/ # Utility functions
βββ .env.example # Environment variables template
βββ go.mod # Go modules file
βββ README.md # This file
- Message Processing: User sends message to Telegram bot
- AI Analysis: Claude AI analyzes the message to determine intent
- Action Execution: Based on AI analysis, the bot either:
- Creates a calendar event
- Retrieves today's meetings
- Provides a general response
- Response: Bot sends formatted response back to user
- Background Reminders: Cron job checks for upcoming meetings every 10 minutes
"Create a meeting called 'Project Review' tomorrow at 3 PM for 1 hour"
"What meetings do I have today?" or "/today"
"How do I reschedule a meeting?" (Gets AI-powered response)
- Google Calendar API: 1,000,000 requests/day (free)
- Telegram Bot API: Completely free
- Claude Code: Uses your existing subscription (no additional API costs)
- Ngrok: Free tier allows basic tunneling
-
"Failed to create calendar service"
- Ensure
credentials.jsonis in the correct location - Verify Google Calendar API is enabled in your project
- Ensure
-
"TELEGRAM_BOT_TOKEN is required"
- Check your
.envfile exists and contains the bot token - Ensure no spaces around the
=sign in.env
- Check your
-
Webhook not receiving updates
- Verify ngrok is running and URL is correct
- Check that webhook URL uses HTTPS (ngrok provides this)
- Ensure port matches between ngrok and your application
-
"Failed to create Claude Code service"
- Ensure Claude Code is installed and accessible in your PATH
- Try running
claude --versionto verify installation - If installed elsewhere, update CLAUDE_CODE_PATH in .env with the full path
π No manual setup required! The bot automatically captures your chat ID when you first interact with it.
How it works:
- Send any message to your bot (like
/start) - Your chat ID is automatically saved to
chat_ids.json - You'll receive reminders automatically for upcoming meetings
Multiple users supported: The bot can send reminders to multiple users who have interacted with it.
Chat ID storage location: chat_ids.json (created automatically)
- Create new modules in
internal/directory - Update
cmd/main.goto wire dependencies - Test thoroughly before deployment
go test ./...- Never commit your
.envfile orcredentials.json - Keep your API keys secure
- Consider using environment variables in production
- The
token.jsonfile contains OAuth tokens - keep it secure
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.