Question 350
A custom agent must call an internal order-lookup service while keeping API credentials server-side. Which AI choice or business response BEST addresses the primary requirement?
Explanation
Correct Answer
Use Cloud Run or Cloud Functions to host appropriately controlled server-side tool endpoints rather than putting secrets or privileged logic in model prompts. This approach directly addresses the decision boundary. Serverless compute can implement tool business logic; it is not a foundation model and does not bypass service-level IAM. Validate key assumptions using: Check runtime needs, authenticated invocation, quotas, network and secret permissions, response contracts and logging. Scenario: A custom agent must call an internal order-lookup service while keeping API credentials server-side.
Incorrect Answers
Use Agent Studio for agent-oriented workflow creation and Google AI Studio for supported model prototyping, matching the environment to deployment and governance needs. This response is aimed at Agent Studio versus Google AI Studio environment selection, not the controlling requirement here. Testing a prompt in a studio does not demonstrate that a custom agent can safely execute privileged external actions. The targeted response is: Use Cloud Run or Cloud Functions to host appropriately controlled server-side tool endpoints rather than putting secrets or privileged logic in model prompts. Scenario: A custom agent must call an internal order-lookup service while keeping API credentials server-side.
Use supported RAG APIs when the application needs explicit control over ingesting, chunking, indexing or retrieving business evidence. This response is aimed at RAG APIs and custom retrieval integration, not the controlling requirement here. RAG interfaces assist with evidence retrieval and orchestration; they do not automatically resolve data quality or prove a model was fine-tuned. The targeted response is: Use Cloud Run or Cloud Functions to host appropriately controlled server-side tool endpoints rather than putting secrets or privileged logic in model prompts. Scenario: A custom agent must call an internal order-lookup service while keeping API credentials server-side.
Break complex tasks into bounded stages with validated intermediate outputs, using prompt chaining only where sequential dependencies are real. This response is aimed at Prompt chaining and staged transformations, not the controlling requirement here. A chain can improve control and traceability; more steps do not inherently improve correctness or justify unsafe automation. The targeted response is: Use Cloud Run or Cloud Functions to host appropriately controlled server-side tool endpoints rather than putting secrets or privileged logic in model prompts. Scenario: A custom agent must call an internal order-lookup service while keeping API credentials server-side.


