Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/coleam00/PydanticAI-Research-Agent
/ functions
Functions
185 in github.com/coleam00/PydanticAI-Research-Agent
⨍
Functions
185
◇
Types & classes
71
↓ 13 callers
Function
print_error
Print an error message.
scripts/validate_gmail_oauth.py:36
↓ 11 callers
Function
print_success
Print a success message.
scripts/validate_gmail_oauth.py:41
↓ 9 callers
Function
print_info
Print an info message.
scripts/validate_gmail_oauth.py:46
↓ 8 callers
Function
search_brave_api
Search using Brave Search API with comprehensive error handling and rate limiting. Args: query: Search query string api_
agents/tools.py:93
↓ 6 callers
Method
execute
(self)
tools/gmail_tools.py:59
↓ 6 callers
Method
users
(self)
tools/gmail_tools.py:28
↓ 5 callers
Function
print_step
Print a formatted step with status.
scripts/validate_gmail_oauth.py:30
↓ 4 callers
Method
record_request
Record a request timestamp.
agents/tools.py:33
↓ 4 callers
Function
retry_with_backoff
Retry function with exponential backoff.
agents/tools.py:60
↓ 4 callers
Function
validate_search_query
Validate and sanitize search query. Args: query: Raw search query Returns: Validated SearchQuery object
agents/tools.py:234
↓ 3 callers
Method
can_make_request
Check if a request can be made within rate limits.
agents/tools.py:25
↓ 3 callers
Function
check_credentials_file
Check if credentials file exists and is valid.
gmail_setup.py:48
↓ 3 callers
Method
drafts
(self)
tools/gmail_tools.py:36
↓ 2 callers
Method
__init__
(self, message: str, api_name: str, status_code: Optional[int] = None)
agents/tools.py:443
↓ 2 callers
Function
analyze_data
Analyze data and return structured report. Args: data_input: Raw data or description to analyze dependencies: Optional a
examples/structured_output_agent/agent.py:196
↓ 2 callers
Function
ask_agent
Ask the tool-enabled agent a question. Args: question: Question or request for the agent dependencies: Optional tool dep
examples/tool_enabled_agent/agent.py:302
↓ 2 callers
Function
authenticate_gmail_service
Authenticate and return Gmail service instance.
tools/gmail_tools.py:63
↓ 2 callers
Method
create
Mock draft creation.
tools/gmail_tools.py:44
↓ 2 callers
Function
extract_key_insights
Extract key insights from search results. Args: results: List of SearchResult objects max_insights: Maximum number of in
agents/tools.py:301
↓ 2 callers
Function
format_search_results
Format search results for display or agent consumption. Args: results: List of SearchResult objects query: Original sear
agents/tools.py:268
↓ 2 callers
Function
get_llm_model
Get LLM model configuration based on environment variables. Args: model_choice: Optional override for model choice Retu
examples/main_agent_reference/providers.py:12
↓ 2 callers
Function
get_llm_model
Get configured LLM model based on environment settings.
agents/providers.py:10
↓ 2 callers
Function
test_gmail_connection
Test Gmail API connection.
gmail_setup.py:125
↓ 2 callers
Method
wait_if_needed
Wait if rate limit is exceeded.
agents/tools.py:37
↓ 1 callers
Function
authenticate_gmail
Authenticate with Gmail API and return credentials.
scripts/validate_gmail_oauth.py:113
↓ 1 callers
Function
chat_with_agent
Main function to chat with the agent. Args: message: User's message to the agent context: Optional conversation context
examples/basic_chat_agent/agent.py:114
↓ 1 callers
Function
check_credentials_directory
Check if credentials directory exists.
scripts/validate_gmail_oauth.py:51
↓ 1 callers
Function
check_credentials_file
Check if credentials.json exists and is valid.
scripts/validate_gmail_oauth.py:66
↓ 1 callers
Function
create_env_example
Create .env.example with Gmail configuration.
gmail_setup.py:150
↓ 1 callers
Function
demo_conversation
Demonstrate the basic chat agent with a simple conversation.
examples/basic_chat_agent/agent.py:164
↓ 1 callers
Function
demo_structured_output
Demonstrate structured output validation.
examples/structured_output_agent/agent.py:239
↓ 1 callers
Function
demo_tools
Demonstrate the tool-enabled agent capabilities.
examples/tool_enabled_agent/agent.py:345
↓ 1 callers
Function
display_welcome
Display welcome message and setup instructions.
gmail_setup.py:26
↓ 1 callers
Function
get_llm_model
Get configured LLM model from environment settings.
examples/tool_enabled_agent/agent.py:48
↓ 1 callers
Function
get_llm_model
Get configured LLM model from environment settings.
examples/basic_chat_agent/agent.py:41
↓ 1 callers
Function
get_llm_model
Get configured LLM model from environment settings.
examples/structured_output_agent/agent.py:41
↓ 1 callers
Function
get_llm_model
Get LLM model configuration based on environment variables. Args: model_choice: Optional override for model choice Retu
config/providers.py:11
↓ 1 callers
Function
get_settings
Get global settings instance, creating it if needed.
config/settings.py:72
↓ 1 callers
Function
guide_credentials_download
Guide user through credentials download process.
gmail_setup.py:64
↓ 1 callers
Function
load_settings
Load settings with proper error handling and environment loading.
config/settings.py:55
↓ 1 callers
Function
main
Main conversation loop.
research_email_cli.py:179
↓ 1 callers
Function
main
Main setup function.
gmail_setup.py:171
↓ 1 callers
Function
main
Main conversation loop.
cli/chat.py:155
↓ 1 callers
Function
main
Main validation function.
scripts/validate_gmail_oauth.py:238
↓ 1 callers
Function
main
Main conversation loop.
examples/main_agent_reference/cli.py:155
↓ 1 callers
Function
run_oauth_flow
Run OAuth2 authentication flow.
gmail_setup.py:99
↓ 1 callers
Function
search_web_tool
Pure function to search the web using Brave Search API. Args: api_key: Brave Search API key query: Search query
tools/brave_search.py:12
↓ 1 callers
Function
search_web_tool
Pure function to search the web using Brave Search API. Args: api_key: Brave Search API key query: Search query
examples/main_agent_reference/tools.py:19
↓ 1 callers
Function
stream_agent_interaction
Stream agent interaction with real-time tool call display.
cli/chat.py:26
↓ 1 callers
Function
stream_agent_interaction
Stream agent interaction with real-time tool call display.
examples/main_agent_reference/cli.py:26
↓ 1 callers
Function
stream_agent_response
Stream agent response with real-time tool call visibility.
research_email_cli.py:19
↓ 1 callers
Function
test_gmail_api
Test Gmail API access.
scripts/validate_gmail_oauth.py:162
↓ 1 callers
Function
validate_environment_variables
Validate required environment variables.
scripts/validate_gmail_oauth.py:213
↓ 1 callers
Function
validate_setup
Validate that required setup is complete.
research_email_cli.py:154
Method
__init__
(self)
tools/gmail_tools.py:25
Method
__init__
(self, drafts_created)
tools/gmail_tools.py:33
Method
__init__
(self, drafts_created)
tools/gmail_tools.py:41
Method
__init__
(self, response_data)
tools/gmail_tools.py:56
Method
__init__
(self, max_retries: int = 3, base_delay: float = 1.0, backoff_factor: float = 2.0)
agents/tools.py:54
Method
__init__
(self, api_name: str, retry_after: Optional[int] = None)
agents/tools.py:452
Method
__init__
(self, api_name: str)
agents/tools.py:463
Method
__post_init__
(self)
agents/dependencies.py:15
Method
always_failing_func
()
tests/test_tools.py:332
Function
analyze_data_sync
Synchronous version of analyze_data. Args: data_input: Raw data or description to analyze dependencies: Optional analysi
examples/structured_output_agent/agent.py:217
Function
analyze_numerical_data
Analyze numerical data and provide statistical insights. Args: data_description: Description of what the numbers represent
examples/structured_output_agent/agent.py:142
Function
ask_agent_sync
Synchronous version of ask_agent. Args: question: Question or request for the agent Returns: String response fr
examples/tool_enabled_agent/agent.py:330
Function
authenticate_gmail
Handles OAuth2 authentication with Gmail API.
agents/email_agent.py:57
Function
calculate
Perform mathematical calculations safely. Args: expression: Mathematical expression to evaluate description: Optional de
examples/tool_enabled_agent/agent.py:187
Function
chat_with_agent_sync
Synchronous version of chat_with_agent for simple use cases. Args: message: User's message to the agent context: Optiona
examples/basic_chat_agent/agent.py:137
Function
compose_email_content
Compose email content based on context and research findings. Args: recipient_email: Email address of the recipient subj
agents/email_agent.py:172
Function
create_email_draft
Create an email draft based on research context using the Email Agent. Args: recipient_email: Email address of the recipient
examples/main_agent_reference/research_agent.py:94
Function
create_email_draft
Create an email draft based on research context using the Email Agent. Args: recipient_email: Email address of the recipient
agents/research_agent.py:94
Function
create_email_message
Create email message structure for Gmail API. Args: to: List of recipient email addresses subject: Email subject
agents/tools.py:361
Function
create_gmail_draft
Create a Gmail draft email.
tools/gmail_tools.py:128
Function
create_gmail_draft
Creates a draft email in Gmail without sending.
agents/email_agent.py:110
Function
create_research_agent
Create a research agent with specified dependencies. Args: brave_api_key: Brave Search API key gmail_credentials_path: P
examples/main_agent_reference/research_agent.py:245
Method
custom_response_func
Custom function to generate specific responses.
examples/testing_examples/test_agent_patterns.py:215
Function
display_welcome
Display welcome banner.
research_email_cli.py:131
Function
dynamic_context_prompt
Dynamic system prompt that includes conversation context.
examples/basic_chat_agent/agent.py:98
Function
email_deps
Create test dependencies for email agent.
tests/test_agents.py:20
Function
event_loop
Create an instance of the default event loop for the test session.
examples/testing_examples/test_agent_patterns.py:380
Method
failing_dependencies
Create dependencies that will fail for testing error handling.
examples/testing_examples/test_agent_patterns.py:347
Method
failing_func
()
tests/test_tools.py:311
Function
format_data
Format data into structured output. Args: data: Raw data to format format_type: Type of formatting (table, list, json)
examples/tool_enabled_agent/agent.py:233
Method
from_settings
Create dependencies from application settings.
agents/dependencies.py:31
Method
full_mock_dependencies
Create fully configured mock dependencies.
examples/testing_examples/test_agent_patterns.py:302
Function
get_current_time
Get the current date and time. Returns: Current timestamp in a readable format
examples/tool_enabled_agent/agent.py:291
Function
get_model_info
Get information about current model configuration. Returns: Dictionary with model configuration info
examples/main_agent_reference/providers.py:32
Function
get_model_info
Get information about current model configuration. Returns: Dictionary with model configuration info
config/providers.py:31
Function
get_settings
()
agents/settings.py:43
Function
handle_api_error
Handle and format API errors for user-friendly messages. Args: error: The exception that occurred api_name: Name of the
agents/tools.py:467
Function
log_api_usage
Log API usage for monitoring and debugging. Args: api_name: Name of the API (e.g., "Brave Search", "Gmail") endpoint: AP
agents/tools.py:409
Function
make_request
()
agents/tools.py:153
Function
mock_api_call
Mock API call tool for testing.
examples/testing_examples/test_agent_patterns.py:61
Function
mock_database_query
Mock database query tool for testing.
examples/testing_examples/test_agent_patterns.py:47
Method
mock_dependencies
Create mock dependencies with configured responses.
examples/testing_examples/test_agent_patterns.py:137
Function
pytest_configure
Configure pytest with custom markers.
examples/testing_examples/test_agent_patterns.py:387
Function
research_deps
Create test dependencies for research agent.
tests/test_agents.py:14
Function
sample_search_results
Create sample search results for testing.
tests/test_tools.py:21
Function
search_web
Search the web using Brave Search API. Args: query: Search query max_results: Maximum number of results to return (1-20)
examples/main_agent_reference/research_agent.py:60
next →
1–100 of 185, ranked by callers