Taskmaster is an autonomous workflow execution agent built with Google ADK and Gemini.
It turns natural-language goals into structured tasks, tracks task progress, and executes available actions while enforcing safety controls around task state, email sending, and external actions.
- Natural-language workflow planning
- Autonomous multi-step task execution
- Task creation and tracking
- Persistent task storage using Google Cloud Firestore
- Controlled task lifecycle management
- Evidence-based task completion
- Gmail integration
- Email preparation and approval workflow
- Explicit user approval required before sending emails
- Google OAuth authentication for Gmail
- Google Calendar event creation
- Cloud-based task persistence across application restarts
- Persistent task state across agent instances
- Safe handling of task and email state
- Google Cloud authentication through Application Default Credentials
User
│
▼
┌─────────────────┐
│ Taskmaster │
│ Agent │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Google ADK + │
│ Gemini 3.5 Flash│
└────────┬────────┘
│
▼
┌───────────────────┐
│ Workflow Planning │
└─────────┬─────────┘
│
┌──────────────┴──────────────┐
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────┐
│ Task Management │ │ Action Tools │
│ Tools │ │ │
│ │ │ prepare_email │
│ create_task │ │ approve_email │
│ list_tasks │ │ create_calendar_ │
│ start_task │ │ event │
│ complete_task │ │ │
└──────────┬──────────┘ └──────────┬──────────┘
│ │
▼ ├──────────► Gmail API
┌──────────────────────┐ │
│ Google Cloud │ └──────────► Google Calendar API
│ Firestore │
│ │
│ Database: taskflow-db│
│ Collection: tasks │
└──────────────────────┘
Taskmaster uses Google Cloud services as part of its core architecture.
Firestore is used as the persistent task database.
Google Cloud Project
└── gen-lang-client-0349849444
│
└── Firestore
│
└── taskflow-db
│
└── tasks
├── 1
├── 2
├── 3
└── ...
Firestore allows Taskmaster to maintain task state beyond the lifetime of a local Python process.
| Setting | Value |
|---|---|
| Project ID | gen-lang-client-0349849444 |
| Database ID | taskflow-db |
| Collection | tasks |
| Edition | Standard |
| Mode | Firestore Native |
| Location | nam5 |
Each task is stored as a Firestore document using the task ID as the document ID.
Example:
{
"id": 1,
"title": "Example Task",
"description": "Example description",
"status": "pending"
}Each task follows a controlled lifecycle:
Pending
│
▼
In Progress
│
▼
Completed
A task must be started before it can be considered in progress.
A task can only be completed when there is confirmation that the required work was actually performed.
Completed tasks cannot be started again.
Task state is persisted in Google Cloud Firestore, allowing tasks to survive application restarts and remain available across different agent instances.
Taskmaster uses Google Cloud Firestore instead of local JSON storage for task persistence.
The application connects to:
Project:
gen-lang-client-0349849444
Database:
taskflow-db
Collection:
tasks
Each task is stored as a Firestore document.
For example:
tasks/1
tasks/2
tasks/3
A task document contains:
{
"id": 1,
"title": "Example Task",
"description": "Example description",
"status": "pending"
}Supported task states are:
pending
in_progress
completed
Because task data is stored in Firestore, task state survives application restarts and can be accessed by different instances of the agent.
Taskmaster provides four core task-management tools.
Creates a new task in Google Cloud Firestore.
create_task
│
▼
Google Cloud Firestore
│
▼
New Task
│
▼
pending
Each task receives a numeric task ID.
Retrieves all tasks currently stored in the Firestore tasks collection.
Tasks are returned in ascending task ID order.
Moves a task into the in_progress state.
A task that has already been completed cannot be started again.
Moves a task into the completed state.
Completion requires confirmation that the work was actually performed.
The tool refuses to complete a task when no confirmation is provided.
Taskmaster uses a controlled two-step workflow for email actions.
prepare_email
│
▼
Awaiting Approval
│
▼
Explicit User Approval
│
▼
approve_email
│
▼
Gmail API
Creates an email for review but does not send the email.
Sends the email through Gmail only when explicit user approval is provided.
Valid approval values include:
yes
approve
approved
send
Silence, ambiguity, or a general request to prepare an email is never treated as approval to send.
The Gmail message ID returned by the Gmail API provides evidence that the email was successfully sent.
Taskmaster can create Google Calendar events through the calendar action tool.
A calendar action can be used as part of a larger workflow where the agent determines that scheduling an event is required.
Example workflow:
User Goal
│
▼
Workflow Planning
│
▼
Create Task
│
▼
Start Task
│
▼
Create Calendar Event
│
▼
Verify Result
│
▼
Complete Task
Calendar event creation is performed through the configured Google Calendar integration.
Taskmaster is designed to execute workflows rather than behave as a simple question-and-answer chatbot.
For each user goal, the agent is instructed to:
- Understand the user's objective.
- Break the objective into actionable steps.
- Determine which tools are required.
- Create tasks for actionable work.
- Start tasks before performing the associated work.
- Execute available actions in the correct order.
- Track progress using the task-management tools.
- Verify that actions actually succeeded.
- Complete tasks only when there is evidence that the required work was performed.
- Report failures instead of falsely claiming success.
The agent is explicitly instructed not to invent task IDs, task states, workflow steps, or successful outcomes.
- Python
- Google ADK
- Gemini 3.5 Flash
- Google GenAI SDK
- Google Cloud Firestore
- Gmail API
- Google Calendar API
- Google OAuth 2.0
- Application Default Credentials
- Uvicorn
agentic-taskmaster/
│
├── agent/
│ ├── __init__.py
│ ├── agent.py
│ ├── tools.py
│ ├── email_tools.py
│ ├── gmail_auth.py
│ ├── calendar_tools.py
│ └── .env
│
├── .gitignore
├── requirements.txt
└── README.md
Sensitive local files such as credentials.json and token.json are not part of the version-controlled source tree.
Clone the repository:
git clone https://github.com/gideonagbavor8/agentic-taskmaster.git
cd agentic-taskmasterCreate a virtual environment.
python -m venv .venv
.\.venv\Scripts\Activate.ps1Install the project dependencies:
pip install -r requirements.txtCreate the environment file:
agent/.env
Add your Gemini API configuration:
GOOGLE_GENAI_USE_ENTERPRISE=0
GOOGLE_API_KEY=YOUR_GEMINI_API_KEYReplace:
YOUR_GEMINI_API_KEY
with your actual Gemini API key.
Never commit API keys or other credentials to Git.
Taskmaster uses Google Cloud Firestore for persistent task storage.
The configured Firestore resources are:
Project ID:
gen-lang-client-0349849444
Database ID:
taskflow-db
Collection:
tasks
The Firestore database uses:
Edition:
Standard
Mode:
Firestore Native
Location:
nam5
Google Cloud authentication must be configured before using Firestore locally.
Run:
gcloud auth application-default loginVerify the active Google Cloud account:
gcloud auth listVerify that the Firestore database exists:
gcloud firestore databases list --project=gen-lang-client-0349849444The application initializes the Firestore client using the configured Google Cloud project and database.
Taskmaster can send emails through the Gmail API after explicit user approval.
Gmail integration requires:
- A Google Cloud project
- Gmail API enabled
- OAuth credentials for the application
- OAuth client credentials stored locally as
credentials.json
On the first Gmail authentication, an OAuth token is generated locally.
The following files contain sensitive information and must remain outside version control:
credentials.json
token.json
agent/.env
From the project root, activate the virtual environment and run:
adk webThis starts the Google ADK development interface where the Taskmaster agent can be tested.
A user could provide a goal such as:
Prepare a client meeting agenda and send it to the client by email.
Taskmaster can turn the goal into an executable workflow:
User Goal
│
▼
Understand Objective
│
▼
Create Tasks
│
▼
Start Task
│
▼
Perform Work
│
▼
Prepare Email
│
▼
Request Explicit Approval
│
▼
Send Through Gmail
│
▼
Verify Result
│
▼
Complete Task
The agent is instructed to use the task-management tools throughout the workflow rather than simply claiming that work was completed.
Taskmaster is designed around controlled execution and evidence-based state changes.
Important safeguards include:
- Tasks must be created through the task-management tools.
- Pending tasks must be started before execution.
- Tasks cannot be completed without confirmation.
- Completed tasks cannot be started again.
- Emails must be prepared before they can be sent.
- Emails cannot be sent without explicit user approval.
- Failed actions are reported instead of being falsely marked as successful.
- The agent must not invent task IDs or task statuses.
- Gmail message IDs provide evidence of successful email transmission.
- Firestore provides persistent task state.
- API keys and OAuth credentials are excluded from version control.
- Sensitive credentials must never be included in source code.
Taskmaster uses Google Cloud Firestore as its persistence layer.
Google Cloud Firestore
│
└── taskflow-db
│
└── tasks
│
├── 1
├── 2
├── 3
└── ...
Each document contains the information required to track the task lifecycle.
Example:
{
"id": 1,
"title": "Example Task",
"description": "Example description",
"status": "pending"
}Task states are:
pending
in_progress
completed
Task data stored in Firestore survives application restarts and can be accessed by different instances of the agent.
The Firestore connection can be tested locally with:
.\.venv\Scripts\python -c "from google.cloud import firestore; db=firestore.Client(project='gen-lang-client-0349849444', database='taskflow-db'); print('Firestore connection successful')"A successful connection returns:
Firestore connection successful
The task-management tools can be tested directly.
.\.venv\Scripts\python -c "from agent.tools import create_task, list_tasks; print(create_task('Firestore integration test', 'Verify Taskmaster can create tasks in Firestore.')); print(list_tasks())".\.venv\Scripts\python -c "from agent.tools import start_task, complete_task, list_tasks; print(start_task(1)); print(complete_task(1, 'Firestore integration test was successfully performed.')); print(list_tasks())"Expected lifecycle:
Create
│
▼
Firestore
│
▼
Pending
│
▼
Start
│
▼
In Progress
│
▼
Complete
│
▼
Completed
The Firestore integration has been verified against the actual Google Cloud Firestore database.
The task-management system has been tested for:
- Task creation
- Task listing
- Firestore persistence
- Firestore connection
- Firestore document creation
- Starting pending tasks
- Completing tasks
- Complete task lifecycle
- Prevention of completion without confirmation
- Prevention of starting completed tasks
- Unique task IDs
- Email approval safety
- Task persistence across application restarts
The Firestore integration was tested by:
- Connecting the Python application to the Firestore database.
- Creating a task through
create_task. - Reading the task through
list_tasks. - Starting the task through
start_task. - Completing the task through
complete_task. - Confirming the resulting completed state.
- Deleting the temporary integration test document.
- The application is currently primarily designed for local development and testing.
- Gmail is currently the primary external communication integration.
- The application depends on Gemini API availability and quota.
- Google Cloud authentication must be configured for Firestore access.
- The current user interface is primarily provided through the Google ADK development interface.
- The application does not currently provide a dedicated production web interface.
- Advanced workflow recovery and retry mechanisms are not yet implemented.
- Firestore task IDs are generated by checking existing task IDs before creating a new task, which could require improved concurrency handling for high-volume production workloads.
Potential future extensions include:
- Google Drive integration
- Web research capabilities
- Additional communication platforms
- Cloud Run deployment
- Dedicated web-based user interface
- Advanced workflow retry and recovery
- Scheduled and recurring workflows
- Additional agent tools
- Multi-agent workflow coordination
- Long-running workflow support
- Persistent agent memory
- Improved workflow observability and monitoring
- Better concurrency handling for task ID generation
- Automated testing with a dedicated test suite
Sensitive configuration should never be committed to the repository.
The project ignores:
credentials.json
token.json
tasks.json
agent/.env
tasks.json is retained in .gitignore to prevent accidental use of an old local persistence file, although the current application uses Firestore for task persistence.
Developers should verify Git status before committing changes:
git statusIf sensitive information appears as a tracked or staged file, remove it before pushing to the repository.
Never include the following in source code or public repositories:
- Gemini API keys
- OAuth client secrets
- Gmail authentication tokens
- Google Cloud service account private keys
- Other private credentials
Check repository status:
git statusRun Python syntax checks:
python -m py_compile agent/agent.py
python -m py_compile agent/tools.py
python -m py_compile agent/email_tools.py
python -m py_compile agent/calendar_tools.py
python -m py_compile agent/gmail_auth.pyInstall dependencies:
pip install -r requirements.txtCheck the README and source changes before committing:
git diffCheck for whitespace errors:
git diff --checkThe project uses the following primary dependencies:
google-adk==2.8.0
google-genai==2.20.0
google-api-python-client==2.199.0
google-auth-oauthlib==1.4.1
python-dotenv==1.2.3
uvicorn==0.52.4
google-cloud-firestore==2.29.0
Taskmaster uses the following Google Cloud project for its cloud services:
Project ID:
gen-lang-client-0349849444
Firestore configuration:
Database:
taskflow-db
Collection:
tasks
Edition:
Standard
Mode:
Firestore Native
Location:
nam5
The project uses the Gemini API and Google Cloud Firestore as core parts of the agent architecture.
Taskmaster is designed for the All Things Agentic Hackathon and incorporates the required Google technologies.
Taskmaster uses Gemini as its agent intelligence layer.
Gemini is responsible for understanding natural-language goals, planning workflows, selecting available tools, and coordinating task execution.
Taskmaster is built using Google Agent Development Kit (Google ADK).
Google ADK provides the agent framework used to define and run the Taskmaster agent and its tools.
Taskmaster uses Google Cloud Firestore as its persistent cloud database.
Firestore stores task state outside the local application process and allows task data to persist across application restarts and agent instances.
The core Google technology architecture is:
Gemini
│
▼
Google ADK
│
▼
Taskmaster Agent
│
├── Task Management
│
├── Gmail
│
└── Google Calendar
│
▼
Google Cloud Firestore
GitHub repository:
https://github.com/gideonagbavor8/agentic-taskmaster
This project is currently developed as a hackathon project.