How to deploy an AI agent

Google Cloud TechAbout 4 min readMay 15, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

  • AI Agents as Services
  • Deployment Strategies for AI Agents
  • Asynchronous Execution of AI Agents
  • AI Agent Intercommunication (Tools)
  • Chatbot vs. Service-Oriented Architecture
  • Latency Considerations
  • Human-in-the-Loop Evaluation

1. Deployment Strategies for AI Agents

  • Chatbot Interface: The initial assumption is that AI agents are primarily deployed as chatbots, either text-based or voice-based, suitable for multi-turn conversations like customer service or ordering systems.
    • Example: Customer service bots resolving issues, pizza ordering systems.
  • Service-Oriented Architecture: An alternative approach is to treat AI agents as services within an application, callable by code like any other API or function.
    • Example: The AI-powered cooking school uses an agent to proactively suggest lessons based on user data.

2. AI Agents as Services

  • Encapsulation: AI agents can be encapsulated within code and treated as services, similar to traditional software development practices.
    • Example: The "generate next lesson" agent in the cooking school is treated as a service.
  • Context Passing: Relevant user context or identifiers can be passed to the AI agent, allowing it to generate appropriate responses.
    • Example: Passing user dietary preferences and lesson history to the "generate next lesson" agent.

3. Asynchronous Execution and Latency

  • Latency Issues: Generating customized AI-powered cooking videos can introduce significant latency, impacting user experience if executed synchronously.
  • Asynchronous Calls: AI agent calls can be executed asynchronously or non-blocking to avoid blocking the main application thread.
  • Caching: Pre-generating and caching AI agent responses (e.g., next lesson videos) can improve performance by serving cached results on user login.
    • Example: Generating the next lesson video nightly and storing it in the user profile.

4. AI Agent Intercommunication (Tools)

  • AI Agents Calling Other AI Agents: AI agents can call other AI agents, which are wrapped as tools, to perform specific tasks.
    • Example: The "generate next lesson" agent uses a "grocery ordering" agent as a tool to find ingredients and create shopping lists.
  • Tool Abstraction: Abstracting AI agents as services allows for both human and computer interaction.

5. Evaluation and Human-in-the-Loop

  • Risk Analysis: Carefully analyze the risks associated with AI agent responses to determine the necessary evaluation methods.
  • Human-in-the-Loop: Consider incorporating a human-in-the-loop for critical use cases to validate or correct AI agent outputs.
  • AI Agent as Code: Emphasizes that AI agents are ultimately code and can be managed and integrated like any other code component.

6. Notable Quotes

  • "I want to proactively suggest lessons based on what we've learned about the user including their dietary preferences what lessons they've done previously how those lessons went and what foods are in season where they live and maybe like any seasonal celebrations" - Aza, highlighting the proactive nature of the AI agent.
  • "Your program can treat an AI agent like any other API or service your program interacts with" - Jason, emphasizing the integration of AI agents into existing systems.

7. Technical Terms

  • LLM (Large Language Model): The underlying model used by the AI agent to generate responses.
  • API (Application Programming Interface): A set of rules and specifications that software programs can follow to communicate with each other.
  • Asynchronous/Non-Blocking: Execution model where the program doesn't wait for a task to complete before continuing.
  • Latency: The delay between a request and a response.
  • Encapsulation: Bundling data and methods that operate on that data within a class or object.

8. Logical Connections

The discussion progresses from the initial assumption of AI agents as chatbots to the more flexible concept of AI agents as services. This shift allows for proactive, automated interactions rather than solely reactive, chat-based ones. The conversation then addresses the practical challenges of latency and proposes solutions like asynchronous execution and caching. Finally, it explores the idea of AI agents interacting with each other as tools, enabling more complex and automated workflows.

9. Synthesis/Conclusion

The main takeaway is that AI agents should not be limited to chatbot interfaces. They can be treated as services within an application, callable by code, and integrated into existing systems. This approach allows for more proactive and automated interactions, but requires careful consideration of latency, evaluation, and the potential need for human oversight. The key is to treat AI agents as code and manage them like any other component in a software application.

AI summaries can miss context or contain errors. Check important details against the original video.

MAKE IT YOURS

Read. Remember. Reuse.

Free tools

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.