Review: Intro to AI Agents
https://www.notion.so/GenAI-apps-in-Amazon-Bedrock-19686c7395e7816286c1fbcb380e78ec?source=copy_link#19686c7395e781e88586c9ddcd4cbbd6
Multi-Agent Workflows
Ref: https://www.udemy.com/course/ultimate-aws-certified-generative-ai-developer-professional/learn/lecture/53684333
- ‼️ When to use multiple different specialized agents instead of a single agent with multiple different tools?
- If too many tools
- A single agent may struggle to select right tool for appropriate task
- If complex logic
- Prompts can get complicated with many conditional statements → many different specialized agents is better
- ❗ If your use case can be built with just a simple deterministic workflow, stick to simplicity (multi-agents can get complex and expensive)
- Basic Multi-Agent Workflow (also known as Manager or Orchestrator Workflow)
- Other examples/types of Multi-Agent Architectures
- Router: simply chooses one of multiple specialized agents to complete task
- Parallelization: independent subtasks running in parallel (❗ no need for complex orchestration)
- Prompt chaining: output of previous prompt serves as input of next prompt, gates can validate/break flow
- Evaluator/Optimizer: an LLM produces output, a different LLM evaluates quality of output, provides feedback until output is good enough (back & forth)
Agentic Memory: Short- vs Long-Term Memory
Ref: https://www.udemy.com/course/ultimate-aws-certified-generative-ai-developer-professional/learn/lecture/53684337
- Short-term Memory
- 🔧 Immediate context from current session
- Chat history → enables conversations
- Also events within sessions
- When storing, optimize for latency → in-memory DBs, big distributed caches…
- e.g. Amazon ElastiCache, Amazon MemoryDB… even DynamoDB can be OK for this
- Long-term Memory
- 🔧 Information that should persist across sessions
- User profiling: preferences, past interactions…
- Facts you wish agent to remember
- Summaries of past sessions
- Knowledge Bases
- Stored in "memory records” containing structured data
- Different strategies for storage and retrieval
- When storing, optimize for persistence → e.g. SQL DBs, RDS, Aurora, DynamoDB, AgentCore Memory, Mem0…
Model Context Protocol (MCP)
Ref: https://modelcontextprotocol.io/docs/getting-started/intro and https://www.udemy.com/course/ultimate-aws-certified-generative-ai-developer-professional/learn/lecture/53684373