Syfw To-Do AI Assistant
AI Voice agentic solution integrated with Synthflow.ai
Technical Architecture
Overview
Synthflow is a leading AI voice solution in today’s market. The Syfw To-Do AI Assistant is a Flask-based REST API designed to handle task management, reminders, and calendar events. It integrates seamlessly with Synthflow.ai voice agents using standardized tool call interfaces and custom actions. All data is stored in a PostgreSQL database and synchronized in real time with the user’s Google Calendar and Gmail through the Google Calendar API, enabling a unified and responsive experience across platforms.
Core Technologies
- • Flask (Python web framework)
- • SQLAlchemy with shared database instance
- • Pydantic models for request/response validation
- • Blueprint architecture for modular design
Key Features
- • To-do list management
- • Reminder system
- • Calendar event management
- • Google Calendar integration
- • Voice API integration (Synthflow.ai)
- • RESTful API endpoints
Module Structure
Shared Components
shared/ ├── google_calendar.py # Google Calendar integration service ├── helpers.py # Shared utility functions and request parsing └── schemas.py # Pydantic validation schemas
Syfw Todo Components
syfw_todo/ ├── __init__.py # Package initialization, exports blueprint ├── models.py # SQLAlchemy database models ├── routes.py # Flask routes and blueprint definition └── README_syfw # Documentation
Data Layer (models.py)
SyfwTodo Model
- • id: Primary key
- • title: Task title (indexed)
- • description: Optional task details
- • completed: Boolean status
- • google_calendar_event_id
SyfwReminder Model
- • id: Primary key
- • reminder_text: Reminder content
- • importance: Priority level
- • google_calendar_event_id
SyfwCalendarEvent Model
- • id: Primary key
- • title: Event title (indexed)
- • description: Event details
- • event_from: Start datetime
- • event_to: End datetime
- • google_calendar_event_id
API Endpoints
To-Do Management
POST /syfw_todo/create_todo
POST /syfw_todo/get_todos
POST /syfw_todo/complete_todo
POST /syfw_todo/delete_todo
Reminder Management
POST /syfw_todo/add_reminder
POST /syfw_todo/get_reminders
POST /syfw_todo/delete_reminder
Calendar Management
POST /syfw_todo/add_calendar_entry
POST /syfw_todo/get_calendar_entries
POST /syfw_todo/delete_calendar_entry
Google Calendar Integration
The SYFW Todo system integrates with Google Calendar to automatically sync calendar events, to-dos, and reminders with the user's Google Calendar account.
Authentication
- • OAuth2 authentication with Google Calendar API
- • Requires credentials.json from Google Cloud Console
- • Token-based authentication with automatic refresh
- • Supports desktop application authentication flow
Features
- • Automatic event creation in Google Calendar
- • Real-time synchronization with database
- • Event updates and deletions
- • Timezone-aware datetime handling
Implementation Details
Service Location: shared/google_calendar.py
Main Class: GoogleCalendarService
Global Access: get_calendar_service()
API Methods
- •
create_event()
- Create new calendar event - •
update_event()
- Update existing event - •
delete_event()
- Delete calendar event - •
get_event()
- Retrieve event details
Response Format
All API responses follow a consistent structure:
{
"results": [
{
"toolCallId": "string",
"result": "success" | object | array
}
]
}
Synthflow Configuration & Deployment
1. Synthflow.ai Setup
- Go to synthflow.ai and create an account or log in.
- Go to the Synthflow menu in the left panel and create an agent.
- Go to Actions menu and create Custom Actions:
- toDoList: createTodo, getTodos, completeTodo, deleteTodo
- reMinder: addReminder, getReminder, deleteReminder
- calendar: addCalendarEntry, getCalendarEntries, deleteCalendarEntry
- Configure Agent (General, Voice, Call Configuration):
- AI Model: GPT 4o or your choice
- Timezone: US/Pacific
- Language: English or your preference
- Voice: Jessica or your preference
- Enable Recording and Transcripts
- Configure Prompt (Greeting, Agent Info, Personality, Role, Goal, Conversation Style, Script Instructions)
- Configure Actions (assign to Before, During, or After the call as needed)
- Deployment: Assign a phone number and set up greeting message
Test Scenarios
- Make a call and say "to do list with time and date" to the AI assistant
- Ask what "to do lists" exist currently and ask to remind the tasks
- Say that some tasks were completed
- Say that some tasks were deleted
- Check whether all test cases have been updated to database tables
Test Results
1. createTodo Functionality
Database Record

Google Calendar Integration

Audio Demonstration
2. completeTodo Functionality
Database Record

Google Calendar Integration

Audio Demonstration
3. addReminder Functionality
Note: This addReminder function always failed. Not sure about root cause... No further detail logs available to investigate.
Database Record

Google Calendar Integration

Audio Demonstration
4. addCalendarEvent Functionality
Database Record

Google Calendar Integration

Audio Demonstration
5. deleteCalendarEvent Functionality
Database Record

Audio Demonstration
Google Calendar Integration
