MCPcopy Create free account

hub / github.com/google/adk-samples / functions

Functions4,953 in github.com/google/adk-samples

↓ 9 callersFunctionstack_and_canvas_images
Create 4K canvases for images, stacking the last two if there are 4 images. For 1-3 images: Creates individual canvases with consistent height sc
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/image_utils.py:883
↓ 8 callersMethod_build_prompt
Build full prompt with investigator guidelines prepended.
python/agents/invoice-processing/invoice_processing/shared_libraries/investigation/investigate_agent_reconst.py:2472
↓ 8 callersFunction_get_driver
Lazily initializes Selenium driver to avoid import-time startup failures.
python/agents/brand-search-optimization/brand_search_optimization/sub_agents/search_results/agent.py:37
↓ 8 callersFunction_get_llm_model
()
python/agents/invoice-processing/invoice_processing/shared_libraries/alf_engine.py:194
↓ 8 callersFunction_load_hris
Load HRIS data.
python/agents/nexshift-agent/nexshift_agent/sub_agents/tools/hris_tools.py:19
↓ 8 callersFunction_safe_json_loads
Parse JSON/dict input from LLM, handling all common formats.
python/agents/invoice-processing/invoice_processing/tools/tools.py:48
↓ 8 callersFunction_save_hris
Save HRIS data.
python/agents/nexshift-agent/nexshift_agent/sub_agents/tools/hris_tools.py:28
↓ 8 callersFunction_text_progress_bar
Generates a compact text-based progress bar.
python/agents/brand-aligner/brand_aligner_agent/utils.py:56
↓ 8 callersFunctionclassify_shoe_closure
Detect velcro/hook-and-loop fasteners in shoe images.
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/classify_shoes.py:136
↓ 8 callersFunctiondataUrlToBlob
(dataUrl: string)
python/agents/genmedia-for-commerce/frontend/src/image_vto/services/imageVtoApi.ts:83
↓ 8 callersMethodeq
(self, value: "Value")
python/agents/camel/camel/camel_library/interpreter/camel_value.py:153
↓ 8 callersMethodevaluate_all
Evaluate all conditions (AND-joined). Returns: (all_passed, evaluation_details)
python/agents/invoice-processing/invoice_processing/shared_libraries/alf_engine.py:318
↓ 8 callersFunctionevaluate_glasses
Evaluate how faithfully the glasses in the generated image match the reference. Args: client: Gemini client instance generated_im
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/image_vto/glasses/glasses_eval.py:30
↓ 8 callersFunctiongenerate_gemini
Generate text content using Gemini. Args: content_pieces: List of text strings, image/doc bytes, or GCS paths. client: Gemini cli
python/agents/multiformat-hybrid-rag/src/utils/gemini.py:28
↓ 8 callersFunctiongetAvailableProducts
(capability: Capability)
python/agents/genmedia-for-commerce/frontend/src/config/featureConstraints.ts:217
↓ 8 callersFunctionget_bigquery_toolset
Create and configure the ADK BigQuery toolset. Uses Application Default Credentials for authentication.
python/agents/hierarchical-workflow-automation/cookie_scheduler_agent/bigquery_utils/bigquery_tools.py:21
↓ 8 callersMethodget_dependencies
( self, visited_objects: frozenset[int] = frozenset() )
python/agents/camel/camel/camel_library/interpreter/camel_value.py:83
↓ 8 callersFunctionget_job_client
Creates a Dataproc JobControllerClient for a specific region. Args: region: The GCP region for the client. Returns: A J
python/agents/plumber-data-engineering-assistant/plumber_agent/sub_agents/dataproc_agent/tools/dataproc_jobs.py:19
↓ 8 callersFunctionisClickable
(categoryId: string)
python/agents/genmedia-for-commerce/frontend/src/pages/GenMediaCategories/index.tsx:98
↓ 8 callersMethodis_available
Check if LangChain Gmail toolkit is available and initialized.
python/agents/hierarchical-workflow-automation/cookie_scheduler_agent/gmail_langchain/gmail_manager.py:323
↓ 8 callersFunctionis_valid_path
Check if a sequence of nodes represents a valid path through the allowed graph.
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/video_validation_r2v.py:36
↓ 8 callersFunctionmodel_armor_interceptor
ADK Agent Callback that intercepts user input before the agent runs.
python/agents/brand-aligned-presentations/presentation_agent/shared_libraries/model_armor.py:78
↓ 8 callersFunctionmodel_armor_response_interceptor
ADK Agent Callback that intercepts model output after the LLM runs.
python/agents/brand-aligned-presentations/presentation_agent/shared_libraries/model_armor.py:141
↓ 8 callersFunctionparse_amount
Parse a formatted amount string like '1,100.00' into a float.
python/agents/invoice-processing/eval/eval.py:112
↓ 8 callersFunctionparse_timestamp_to_seconds
Parses a timestamp string into an integer representing total seconds. Supports formats: raw seconds ('322'), MM:SS ('05:22'), or HH:MM:SS ('
python/agents/youtube-analyst/youtube_analyst/tools.py:583
↓ 8 callersFunctionpost_with_retry
POST with exponential backoff on 5xx, 429, and connection errors. - 5xx + ConnectionError + Timeout: retried up to `attempts` times, backof
python/agents/multiformat-hybrid-rag/src/utils/http_utils.py:35
↓ 8 callersMethodrender
(self, mode="human")
python/agents/personalized-shopping/personalized_shopping/shared_libraries/web_agent_site/envs/web_agent_text_env.py:305
↓ 8 callersFunctionupload_bytes_to_gcs
Upload bytes directly to Google Cloud Storage.
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/gcs_utils.py:171
↓ 7 callersMethodSessionID
()
go/agents/sail-researcher/tools/setup_test.go:52
↓ 7 callersFunction_assign
Evaluates an assignment statement (e.g., x = 1). Args: evaled_value: The value to assign. target: The AST node representing the t
python/agents/camel/camel/camel_library/interpreter/interpreter.py:1328
↓ 7 callersFunction_build_description_block
Build a description block for VTO prompts from garment descriptions. Args: garment_descriptions: List of dicts with "general" and "detail
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/image_vto/clothes/vto_generation.py:147
↓ 7 callersFunction_heading_for
Pick a heading for an item from common identifier fields.
python/agents/multiformat-hybrid-rag/src/document_preprocessing/parser/json_parser.py:66
↓ 7 callersFunction_is_empty_row
(row: tuple)
python/agents/multiformat-hybrid-rag/src/document_preprocessing/parser/xlsx_parser.py:26
↓ 7 callersFunction_load_json
Load JSON file, return empty dict if not found.
python/agents/nexshift-agent/nexshift_agent/sub_agents/tools/empathy_tools.py:36
↓ 7 callersFunction_parse_dollar_amount
Parse a dollar string like '$150,000' into a float.
python/agents/small-business-loan-agent/small_business_loan_agent/sub_agents/pricing/tools.py:25
↓ 7 callersFunction_render_object
Render a JSON object as markdown. Scalar fields → `**key**: value` lines. Nested objects/arrays → sub-section under their own heading.
python/agents/multiformat-hybrid-rag/src/document_preprocessing/parser/json_parser.py:90
↓ 7 callersMethod_resolve_dynamic_value
Resolve dynamic field references in condition values. If the value is a string matching the pattern _DYNAMIC_<field_path>_,
python/agents/invoice-processing/invoice_processing/shared_libraries/alf_engine.py:245
↓ 7 callersFunction_staging_table_name
Per-run staging name: prevents two concurrent pipeline runs from clobbering each other. If a run crashes the table is left behind under its ru
python/agents/multiformat-hybrid-rag/src/chunking/chunk_and_index.py:87
↓ 7 callersFunctionaddSystemMessage
(text)
python/agents/bidi-demo/app/static/js/app.js:278
↓ 7 callersFunctioncalculate_ssim
Calculate SSIM similarity between two images. Args: img1_bytes: First image as bytes img2_bytes: Second image as bytes Retur
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/product_consistency_validation.py:61
↓ 7 callersFunctioncreate_canvas_with_height_scaling
Create canvases for multiple images with consistent height scaling. Calculates the maximum safe height that fits all images within the margins,
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/image_utils.py:784
↓ 7 callersFunctioncreate_color_image_bytes
Create an image of a solid color.
python/agents/genmedia-for-commerce/tests/workflows/video_vto/glasses/test_glasses_eval.py:31
↓ 7 callersFunctiondetermine_halt_action
Determine whether a tool execution should be halted (pure function).
python/agents/small-business-loan-agent/small_business_loan_agent/callbacks/before_tool_callback.py:33
↓ 7 callersFunctionevaluate_garments
Evaluate all reference garments against the generated VTO image in parallel. Uses the product fitting's evaluate_garment (0-10 scale) with EX
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/image_vto/clothes/garment_eval.py:32
↓ 7 callersFunctionevaluate_person_match
Evaluate if the person in a generated image matches the reference face. This is the main function to use. It handles: 1. Cropping face from g
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/person_eval.py:309
↓ 7 callersMethodextract_step
Extract a specific step (e.g., "15", "22", "33"). Handles formats: - ### Step 15: Duplicate Invoice Detection -
python/agents/invoice-processing/invoice_processing/shared_libraries/investigation/investigate_agent_reconst.py:656
↓ 7 callersFunctionextract_upscale_product
Extract product from background and upscale it. Performs background removal, upscaling, and optionally reapplies the scaled original mask to
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/image_utils.py:944
↓ 7 callersFunctiongenerate_background_change
Generate an image with the person placed in a new background using 2-step approach. Args: client: Gemini client instance preproce
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/other/background_changer/background_changer.py:125
↓ 7 callersFunctiongenerate_visual
Generates a visual from a single string prompt using a multi-modal model. Returns the GCS URI of the generated image or a temp local path if
python/agents/brand-aligned-presentations/presentation_agent/tools/visual_generator.py:32
↓ 7 callersMethodget_agent_file_map
(self)
python/agents/invoice-processing/invoice_processing/shared_libraries/master_data_loader.py:157
↓ 7 callersFunctionget_cluster_client
Creates a Dataproc ClusterControllerClient for a specific region. Args: region: The GCP region for the client. Returns:
python/agents/plumber-data-engineering-assistant/plumber_agent/sub_agents/dataproc_agent/tools/dataproc_clusters.py:20
↓ 7 callersFunctionget_id_token
Return a fresh-enough ID token for the given audience. Thread-safe. Caches token per audience and refreshes 10 min before the 60-min expiry.
python/agents/multiformat-hybrid-rag/src/utils/auth.py:85
↓ 7 callersFunctionget_interpolation_prompt
Generate the prompt used for interpolation video generation with a generic product title. Args: client: Gemini client for title generatio
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/interpolation/other/interpolation_utils.py:86
↓ 7 callersFunctionis_people_ok
Return True if person count is acceptable (0 or 1).
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/video_vto/glasses/glasses_eval.py:218
↓ 7 callersMethodmain
(String[] args)
java/agents/software-bug-assistant/software-bug-assistant/src/main/java/SoftwareBugAssistant.java:39
↓ 7 callersMethodnext_rule_id
Generate the next ALF-NNN rule ID.
python/agents/invoice-processing/invoice_processing/core/rule_writer.py:68
↓ 7 callersFunctionpreprocess_images
Preprocess images with optional upscaling and canvas creation. Used by both Interpolation and R2V modes for video generation. Args:
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/image_utils.py:991
↓ 7 callersFunctionprocess_frames_to_target_size
Process a list of frame bytes, detect product boundaries, and crop to maximize product size. Returns the processed frames as a bytelist at the sp
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/images_utils.py:145
↓ 7 callersFunctionrun_catalog_search
Search the product catalog for items matching a text query. Uses vector similarity search to find products matching the description. Args:
python/agents/genmedia-for-commerce/genmedia4commerce/mcp_server/shared/catalog/catalog_mcp.py:25
↓ 6 callersFunction_build_rechunk_query
Build the SQL query to find files needing chunking. Two modes: - Incremental (default): files re-extracted since last successful index,
python/agents/multiformat-hybrid-rag/src/chunking/chunk_and_index.py:153
↓ 6 callersFunction_create_three_framings
Create three framings from a full-body image: lower body, upper body, face. Matches the animation flow: video starts on the lower body, reveals u
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/video_vto/clothes/generate_video_util.py:57
↓ 6 callersFunction_determine_risk_tier
Determine risk tier and base rate from underwriting results. Returns: Tuple of (risk_tier_name, base_interest_rate)
python/agents/small-business-loan-agent/small_business_loan_agent/sub_agents/pricing/tools.py:36
↓ 6 callersMethod_get_asset_type
Determines if the asset is a video or image based on MIME type.
python/agents/brand-aligner/brand_aligner_agent/services.py:518
↓ 6 callersFunction_get_metrics
Return the current METRICS dict.
python/agents/invoice-processing/invoice_processing/shared_libraries/acting/general_invoice_agent.py:188
↓ 6 callersFunction_load_json
Load JSON file, return empty dict if not found.
python/agents/nexshift-agent/nexshift_agent/sub_agents/tools/compliance_tools.py:17
↓ 6 callersMethod_make_row
( self, file_id="f1", gcs_uri="gs://b/f.pdf", md5_hash="abc", file_nam
python/agents/multiformat-hybrid-rag/tests/unit/document_preprocessing/test_preprocess.py:29
↓ 6 callersMethod_run_agent
Helper method to run an agent and get the final response.
python/agents/supply-chain/tests/test_agents.py:64
↓ 6 callersFunction_strip_images_from_result
( result: dict, tool_name: str )
python/agents/genmedia-for-commerce/genmedia4commerce/agents/style_advisor_agent/agent.py:160
↓ 6 callersFunction_truncate
Truncate a value for display.
python/agents/invoice-processing/invoice_processing/core/impact_assessor.py:233
↓ 6 callersFunctioncheck_contour_count
Check if the mask contains exactly one distinct object. This is useful for discarding empty masks (0 contours) or fragmented masks (2+ contou
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/split_multiple_shoes.py:171
↓ 6 callersFunctionclassify_product_images
Classify product type and each image's view angle in a single Gemini call. Returns: dict: { "product_type": "shoes" | "cars"
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/other/image_selection.py:40
↓ 6 callersFunctioncleanupData
cleanupData removes data created during tests.
go/agents/navallist/internal/data/db_helper_integration_test.go:30
↓ 6 callersFunctionfetch_hud_fmr_data
Fetches HUD FMR with Title Case key matching for FY2026. Args: county_fips: 5-digit County FIPS code or common city name (e.g. "
python/agents/economic-research-agent/economic_research/tools/hud_skill.py:53
↓ 6 callersFunctionfind_most_similar_frame_index
Find the index of the frame most similar to a reference frame. Compares frames against the reference frame using Structural Similarity Index
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/video_utils.py:320
↓ 6 callersFunctionfind_second_occurrence_range
Find the initial and ending original indices where the starting class appears for the second time. If not second appearance return None None.
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/video_validation_r2v.py:282
↓ 6 callersFunctionforward_fill_labels
Forward-fill null/None labels with the previous non-null label. All frames between two consecutive labeled frames get assigned the label of the f
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/product_consistency_validation.py:99
↓ 6 callersFunctionget_background_mask_vertex
Generate a background mask using Vertex AI image segmentation. Automatically resizes large images before segmentation to stay within API limits.
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/image_utils.py:202
↓ 6 callersFunctionget_config
Helper to get config from env or user input.
python/agents/adk-ae-oauth/tools/register_oauth.py:23
↓ 6 callersFunctionget_environment
Fixture to provide a mock environment with tools and policy.
python/agents/tau2-benchmark-agent/tests/conftest.py:37
↓ 6 callersMethodget_existing_rules
Return list of rule dicts from rule_base.json.
python/agents/invoice-processing/invoice_processing/core/rule_writer.py:55
↓ 6 callersFunctionget_frame_similarity_bytes
Calculate the Structural Similarity Index (SSIM) between two images. Args: frame1_bytes: First image as bytes frame2_bytes: Secon
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/video_utils.py:160
↓ 6 callersFunctionget_json_schema_from_content
Reads a JSON/JSONL string and returns a schema representation of all objects.
python/agents/policy-as-code/policy_as_code_agent/utils/llm.py:40
↓ 6 callersFunctionget_latest_order_from_bigquery
Fetch the latest order with 'order_placed' status from BigQuery using ADK tools. This is a wrapper function that uses the ADK execute_sql too
python/agents/hierarchical-workflow-automation/cookie_scheduler_agent/bigquery_utils/bigquery_tools.py:53
↓ 6 callersFunctionget_nested_value
Get nested value from dictionary
python/agents/invoice-processing/eval/compare_postprocessing.py:46
↓ 6 callersFunctionget_storage_client
Return a standard GCS client. Transfer Manager handles connection pooling internally, so custom adapters are rarely needed.
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/gcs_utils.py:36
↓ 6 callersMethodget_tools
(self)
python/agents/tau2-benchmark-agent/tests/conftest.py:54
↓ 6 callersFunctionimage_closure_selection
Select images for closure classification based on desirable views. Args: bytes_list: List of image bytes. images_classes: List of
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/images_utils.py:433
↓ 6 callersFunctionis_video_valid
Validate video based on people counts per frame. A video is valid if there is no more than 1 person from a given point onwards. Returns the i
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/video_vto/glasses/glasses_eval.py:239
↓ 6 callersFunctionload_prompt_from_file
Reads instruction text from a file relative to this script.
python/agents/short-movie-agents/app/utils/utils.py:23
↓ 6 callersFunctionmerge_videos_from_bytes
Merge multiple MP4 videos (in bytes) into a single video using temporary files. Apply a specific speed to each clip. Args: videos_by
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/video_utils.py:86
↓ 6 callersMethodreceive
Map action to the corresponding page
python/agents/personalized-shopping/personalized_shopping/shared_libraries/web_agent_site/envs/web_agent_text_env.py:577
↓ 6 callersFunctionrun
Execute the full cleanup step. Main entry point, called by the Vertex AI Pipeline cleanup component. It performs: 1. **Detect** — Query
python/agents/multiformat-hybrid-rag/src/removal/propagate_gcs_deletions.py:68
↓ 6 callersFunctionrun_product_fitting
Generate product fitting images for catalogue enrichment (B2B). Product fitting is designed for enriching product catalogues: it takes a sing
python/agents/genmedia-for-commerce/genmedia4commerce/mcp_server/product_enrichment/product_fitting/product_fitting_mcp.py:81
↓ 6 callersFunctionscrollToBottom
()
python/agents/bidi-demo/app/static/js/app.js:287
↓ 6 callersFunctionsort_masks_by_horizontal_position
Sorts a list of (mask, value) tuples based on the mask's horizontal position. The score is calculated by summing the transformed x-coordinates of
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/spinning/r2v/shoes/split_multiple_shoes.py:36
↓ 6 callersFunctionstack_images_horizontally
Stack two images horizontally side by side. Resizes both images to have the same height (using the smaller height) while maintaining aspect r
python/agents/genmedia-for-commerce/genmedia4commerce/workflows/shared/image_utils.py:838
↓ 5 callersMethodDSN
DSN constructs the PostgreSQL Data Source Name.
go/agents/navallist/internal/config/config.go:85
↓ 5 callersMethodHandle
(ctx context.Context, r slog.Record)
go/agents/sail-researcher/logging/handler.go:21
↓ 5 callersMethodState
()
go/agents/sail-researcher/tools/setup_test.go:56
↓ 5 callersFunction_append_to_session_state
Appends a value to a list in the session state.
python/agents/brand-aligner/brand_aligner_agent/tools.py:107
← previousnext →101–200 of 4,953, ranked by callers