MCPcopy Create free account

hub / github.com/coleam00/PydanticAI-Research-Agent / functions

Functions185 in github.com/coleam00/PydanticAI-Research-Agent

↓ 13 callersFunctionprint_error
Print an error message.
scripts/validate_gmail_oauth.py:36
↓ 11 callersFunctionprint_success
Print a success message.
scripts/validate_gmail_oauth.py:41
↓ 9 callersFunctionprint_info
Print an info message.
scripts/validate_gmail_oauth.py:46
↓ 8 callersFunctionsearch_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 callersMethodexecute
(self)
tools/gmail_tools.py:59
↓ 6 callersMethodusers
(self)
tools/gmail_tools.py:28
↓ 5 callersFunctionprint_step
Print a formatted step with status.
scripts/validate_gmail_oauth.py:30
↓ 4 callersMethodrecord_request
Record a request timestamp.
agents/tools.py:33
↓ 4 callersFunctionretry_with_backoff
Retry function with exponential backoff.
agents/tools.py:60
↓ 4 callersFunctionvalidate_search_query
Validate and sanitize search query. Args: query: Raw search query Returns: Validated SearchQuery object
agents/tools.py:234
↓ 3 callersMethodcan_make_request
Check if a request can be made within rate limits.
agents/tools.py:25
↓ 3 callersFunctioncheck_credentials_file
Check if credentials file exists and is valid.
gmail_setup.py:48
↓ 3 callersMethoddrafts
(self)
tools/gmail_tools.py:36
↓ 2 callersMethod__init__
(self, message: str, api_name: str, status_code: Optional[int] = None)
agents/tools.py:443
↓ 2 callersFunctionanalyze_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 callersFunctionask_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 callersFunctionauthenticate_gmail_service
Authenticate and return Gmail service instance.
tools/gmail_tools.py:63
↓ 2 callersMethodcreate
Mock draft creation.
tools/gmail_tools.py:44
↓ 2 callersFunctionextract_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 callersFunctionformat_search_results
Format search results for display or agent consumption. Args: results: List of SearchResult objects query: Original sear
agents/tools.py:268
↓ 2 callersFunctionget_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 callersFunctionget_llm_model
Get configured LLM model based on environment settings.
agents/providers.py:10
↓ 2 callersFunctiontest_gmail_connection
Test Gmail API connection.
gmail_setup.py:125
↓ 2 callersMethodwait_if_needed
Wait if rate limit is exceeded.
agents/tools.py:37
↓ 1 callersFunctionauthenticate_gmail
Authenticate with Gmail API and return credentials.
scripts/validate_gmail_oauth.py:113
↓ 1 callersFunctionchat_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 callersFunctioncheck_credentials_directory
Check if credentials directory exists.
scripts/validate_gmail_oauth.py:51
↓ 1 callersFunctioncheck_credentials_file
Check if credentials.json exists and is valid.
scripts/validate_gmail_oauth.py:66
↓ 1 callersFunctioncreate_env_example
Create .env.example with Gmail configuration.
gmail_setup.py:150
↓ 1 callersFunctiondemo_conversation
Demonstrate the basic chat agent with a simple conversation.
examples/basic_chat_agent/agent.py:164
↓ 1 callersFunctiondemo_structured_output
Demonstrate structured output validation.
examples/structured_output_agent/agent.py:239
↓ 1 callersFunctiondemo_tools
Demonstrate the tool-enabled agent capabilities.
examples/tool_enabled_agent/agent.py:345
↓ 1 callersFunctiondisplay_welcome
Display welcome message and setup instructions.
gmail_setup.py:26
↓ 1 callersFunctionget_llm_model
Get configured LLM model from environment settings.
examples/tool_enabled_agent/agent.py:48
↓ 1 callersFunctionget_llm_model
Get configured LLM model from environment settings.
examples/basic_chat_agent/agent.py:41
↓ 1 callersFunctionget_llm_model
Get configured LLM model from environment settings.
examples/structured_output_agent/agent.py:41
↓ 1 callersFunctionget_llm_model
Get LLM model configuration based on environment variables. Args: model_choice: Optional override for model choice Retu
config/providers.py:11
↓ 1 callersFunctionget_settings
Get global settings instance, creating it if needed.
config/settings.py:72
↓ 1 callersFunctionguide_credentials_download
Guide user through credentials download process.
gmail_setup.py:64
↓ 1 callersFunctionload_settings
Load settings with proper error handling and environment loading.
config/settings.py:55
↓ 1 callersFunctionmain
Main conversation loop.
research_email_cli.py:179
↓ 1 callersFunctionmain
Main setup function.
gmail_setup.py:171
↓ 1 callersFunctionmain
Main conversation loop.
cli/chat.py:155
↓ 1 callersFunctionmain
Main validation function.
scripts/validate_gmail_oauth.py:238
↓ 1 callersFunctionmain
Main conversation loop.
examples/main_agent_reference/cli.py:155
↓ 1 callersFunctionrun_oauth_flow
Run OAuth2 authentication flow.
gmail_setup.py:99
↓ 1 callersFunctionsearch_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 callersFunctionsearch_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 callersFunctionstream_agent_interaction
Stream agent interaction with real-time tool call display.
cli/chat.py:26
↓ 1 callersFunctionstream_agent_interaction
Stream agent interaction with real-time tool call display.
examples/main_agent_reference/cli.py:26
↓ 1 callersFunctionstream_agent_response
Stream agent response with real-time tool call visibility.
research_email_cli.py:19
↓ 1 callersFunctiontest_gmail_api
Test Gmail API access.
scripts/validate_gmail_oauth.py:162
↓ 1 callersFunctionvalidate_environment_variables
Validate required environment variables.
scripts/validate_gmail_oauth.py:213
↓ 1 callersFunctionvalidate_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
Methodalways_failing_func
()
tests/test_tools.py:332
Functionanalyze_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
Functionanalyze_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
Functionask_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
Functionauthenticate_gmail
Handles OAuth2 authentication with Gmail API.
agents/email_agent.py:57
Functioncalculate
Perform mathematical calculations safely. Args: expression: Mathematical expression to evaluate description: Optional de
examples/tool_enabled_agent/agent.py:187
Functionchat_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
Functioncompose_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
Functioncreate_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
Functioncreate_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
Functioncreate_email_message
Create email message structure for Gmail API. Args: to: List of recipient email addresses subject: Email subject
agents/tools.py:361
Functioncreate_gmail_draft
Create a Gmail draft email.
tools/gmail_tools.py:128
Functioncreate_gmail_draft
Creates a draft email in Gmail without sending.
agents/email_agent.py:110
Functioncreate_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
Methodcustom_response_func
Custom function to generate specific responses.
examples/testing_examples/test_agent_patterns.py:215
Functiondisplay_welcome
Display welcome banner.
research_email_cli.py:131
Functiondynamic_context_prompt
Dynamic system prompt that includes conversation context.
examples/basic_chat_agent/agent.py:98
Functionemail_deps
Create test dependencies for email agent.
tests/test_agents.py:20
Functionevent_loop
Create an instance of the default event loop for the test session.
examples/testing_examples/test_agent_patterns.py:380
Methodfailing_dependencies
Create dependencies that will fail for testing error handling.
examples/testing_examples/test_agent_patterns.py:347
Methodfailing_func
()
tests/test_tools.py:311
Functionformat_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
Methodfrom_settings
Create dependencies from application settings.
agents/dependencies.py:31
Methodfull_mock_dependencies
Create fully configured mock dependencies.
examples/testing_examples/test_agent_patterns.py:302
Functionget_current_time
Get the current date and time. Returns: Current timestamp in a readable format
examples/tool_enabled_agent/agent.py:291
Functionget_model_info
Get information about current model configuration. Returns: Dictionary with model configuration info
examples/main_agent_reference/providers.py:32
Functionget_model_info
Get information about current model configuration. Returns: Dictionary with model configuration info
config/providers.py:31
Functionget_settings
()
agents/settings.py:43
Functionhandle_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
Functionlog_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
Functionmake_request
()
agents/tools.py:153
Functionmock_api_call
Mock API call tool for testing.
examples/testing_examples/test_agent_patterns.py:61
Functionmock_database_query
Mock database query tool for testing.
examples/testing_examples/test_agent_patterns.py:47
Methodmock_dependencies
Create mock dependencies with configured responses.
examples/testing_examples/test_agent_patterns.py:137
Functionpytest_configure
Configure pytest with custom markers.
examples/testing_examples/test_agent_patterns.py:387
Functionresearch_deps
Create test dependencies for research agent.
tests/test_agents.py:14
Functionsample_search_results
Create sample search results for testing.
tests/test_tools.py:21
Functionsearch_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