Development Setup
Install Dependencies
AgenticPal uses This will install all required dependencies including:
uv for dependency management:google-api-python-client- Google API accessgoogle-auth-oauthlib- OAuth 2.0 authenticationlangchain-qwq- LLM integrationpydantic- Schema validationpython-dateutil- Date parsing
Configure Google Cloud
- Create a project in Google Cloud Console
- Enable the following APIs:
- Google Calendar API
- Gmail API
- Google Tasks API
- Create OAuth 2.0 credentials:
- Application type: Desktop application
- Download credentials as
credentials.json - Place in project root
- Add your email as a test user on the OAuth consent screen
Project Structure
Development Workflow
Adding Features
Follow the three-layer architecture:- Service Layer - Add API integration in
services/ - Tool Layer - Create tool wrapper in
agent/tools/registry.py - Definition Layer - Register in
agent/tools/tool_definitions.py
Making Changes
Make Your Changes
Follow the existing code style and patterns:
- Use type hints for all function parameters and returns
- Add docstrings to all public functions
- Follow PEP 8 style guidelines
- Keep functions focused and single-purpose
Test Your Changes
Test your changes thoroughly:Try various user inputs that exercise your new functionality.
Commit Your Changes
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Code Style
Python Style
- Follow PEP 8
- Use 4 spaces for indentation
- Maximum line length: 100 characters
- Use type hints:
Docstring Format
Use Google-style docstrings:Error Handling
Always return structured error responses:Testing Guidelines
While AgenticPal doesn’t currently have a formal test suite, you should:- Manual Testing - Test all code paths with various inputs
- Edge Cases - Test boundary conditions and error scenarios
- Integration Testing - Test with real Google APIs
- Regression Testing - Ensure existing features still work
Example Test Scenarios
Calendar Tool:- Create event with valid data
- Create event with invalid date format
- Create event with missing required fields
- Update non-existent event
- Delete event with confirmation
- List messages with no results
- Search with complex query syntax
- Get details of non-existent message
Pull Request Guidelines
PR Checklist
- Code follows project style guidelines
- All functions have docstrings and type hints
- Changes have been manually tested
- Existing functionality still works
- Commit messages follow conventional format
- PR description is clear and complete
PR Description Template
Architecture Guidelines
Separation of Concerns
Maintain clean boundaries between layers:Return Value Consistency
All service and tool methods return dicts with consistent structure:Configuration Management
Use environment variables for configuration:Common Patterns
Date/Time Handling
Use the date utilities:Tool Parameter Validation
Use Pydantic schemas:Getting Help
- Questions: Open a GitHub Discussion
- Bugs: File a GitHub Issue
- Features: Start with a discussion to get feedback before implementing
Recognition
Contributors will be:- Added to the project README
- Credited in release notes
- Mentioned in documentation for significant contributions
See Also
Custom Tools
Guide to adding new tools
Service Integration
How to integrate new services
Graph Nodes
Creating custom graph nodes
Testing
Testing guidelines