KEMBAR78
Introduction to AI agent development with MCP | PDF
Introduction
To
Agent
Development
Dori waldman
Agent Description
Software program designed to act
autonomously
Interact with its environment
Achieve speci
fi
c goals based on its own
decisions
They distinct from regular software because
they possess greater autonomy & learning
capabilities, allowing them to perform tasks
on behalf of users with minimal direct
intervention ~
fi
re and forget
Agent has 3 main parts
Model
Memory
Tools
To make model results to be consistent, set temperature=0
Memory ~ more than session context
• User: Hi my name is bob
• System: Hi bob nice to meet you
• User: What is my name ?
• System: I dont know …
Long history cost more money/token , make LLM to have confusion
Short history can return wrong answers as context is partial
Tools (function call)
• User: What is the weather now in london ?
• System: I cant say it but I can give you weather during May in general
Adding weather tool - now LLM can use it to get the weather at london today
Agent needs to verify it handle tools failure
Agent loop (ā€œmax_iterationsā€, default = 5)
Agent dont return result right away, instead it has an
ā€œobservationā€ loop to verify the result before it return
the
fi
nal answer
Multi Agents
Requires:
1) cross agents shared memory:
If i am booking a vacation i dont need
to tell hotel &
fl
ight agents the vacation
date and location i can tell it once and
they can update each other using
shared KV storage
2) Orchestration:
which agent is going to handle the next
task ?
Orchestration types - Sequence / Swarm / Supervisor
https://www.youtube.com/watch?v=WTr6mHTw5cM
https://langchain-ai.github.io/langgraph/agents/multi-agent/#swarm
https://langchain-ai.github.io/langgraph/agents/multi-agent/#swarm
https://google.github.io/adk-docs/agents/work
fl
ow-agents/
Multi agent orchestration types…
https://pub.towardsai.net/supervisor-style-the-king-of-multi-agent-systems-139f0990ed17
https://medium.com/@siddharthc96/building-multi-agent-swarms-a-powerful-architecture-for-complex-ai-systems-37e8d7d9c0a5
https://langchain-ai.github.io/langgraph/concepts/multi_agent/#multi-agent-architectures
MCP ~ Wrapper
Provide a standard way to expose tools to LLM
MCP has main 3 parts
Tools - allow LLM to perform actions
Resources - provide information to the LLM
(static data like db schema)
Prompt - reusable message templates
https://medium.com/@mowhobuilds/mcp-server-resources-or-tools-for-exposing-get-endpoints-162d17c4c134
https://pypi.org/project/fastmcp/#resources--templates
https://mail.google.com/mail/u/0/#sent/QgrcJHsTjWBSvvxSnzcKcBkbwqGqxKGtthg?projector=1
https://www.descope.com/learn/post/mcp
https://www.newsletter.swirlai.com/p/everything-you-need-to-know-about
FastMcp
FastMcp - prompts
Dynamic Tools
Generate tools from con
fi
g
fi
le
https://github.com/doriwal/Agent/
Multi agent - ADK Code example
Agent goal is to analyze incident by getting relevant logs from elasticSearch and send them to git agent that return
relevant code and send them to analyze agent that can check logs and code in order to analyze incident root cause
Agent code example
Agent can have set of tools
that will be used by the
model
Agent save
fi
nal result in
output_key which is KV
shared memory and can be
used by other agents
Multi Agent - LangGraph (low level framework)
https://levelup.gitconnected.com/gentle-introduction-to-langgraph-a-step-by-step-tutorial-2b314c967d3c
Agent 2 Agent
Communication protocol (not agent
framework) to invoke ā€˜remote’ agent
over http
https://www.devshorts.in/p/agent2agent-a2a-protocol-explained
https://towardsdatascience.com/inside-googles-agent2agent-a2a-protocol-teaching-ai-agents-to-talk-to-each-other/
Agent 2 Agent
Card - service endpoint , agent capabilities , authenticaiton
Task - what agent needs to do like book a
fl
ight , task has id and status
(submitted, working , failed, complited)
Communication - request-response , push noti
fi
cation , stream
https://medium.com/@shamim_ru/google-agent-to-agent-a2a-protocol-explained-with-real-working-examples-99e362b61ba8
https://google-a2a.github.io/A2A/topics/key-concepts/
What to use ?
No code
• https://github.com/langchain-ai/open-agent-platform
• https://www.youtube.com/watch?v=kEtYJOijCBM&t=2s (n8n)
• https://www.youtube.com/watch?v=Ey18PDiaAYI&t=8999s
• https://www.lang
fl
ow.org/
AI Framework (from high to low level framework)
• Google ADK
• https://www.youtube.com/watch?v=P4VFL9nIaIA
• CrewAI
• https://www.deeplearning.ai/short-courses/multi-ai-agent-systems-with-crewai/
• Aws - https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/
• LangGraph
• https://youtu.be/jGg_1h0qzaM?si=B4UtWqrrPTsqNuxR
• https://langchain-ai.github.io/langgraph/
• https://langchain-ai.github.io/langgraph/tutorials/get-started/5-customize-state/
• https://www.langchain.com/langsmith
• https://academy.langchain.com/courses/intro-to-langgraph?
_gl=1*ijypf1*_gcl_au*MTQ5OTgzNTg2LjE3NDg5NTE3OTE.*_ga*NjM2NzAwODc5LjE3NDg5NTE3OTE.*_ga_47WX3HKKY2*czE3NDg5NTE3OTEkbzEkZzEkdDE3NDg5NTM0ODAkajYwJGwwJGgw
• Microsoft AutoGen
• https://www.youtube.com/watch?v=JmjxwTEJSE8&pp=0gcJCdgAo7VqN5tD
• OpenAI
• https://openai.github.io/openai-agents-python/
My 2 cents:
Start with google adk
Its simple and you will focus on your
buisness logic not of graphs
With AI Assistant we can run faster
But so can our competitors

Introduction to AI agent development with MCP

  • 1.
  • 2.
    Agent Description Software programdesigned to act autonomously Interact with its environment Achieve speci fi c goals based on its own decisions They distinct from regular software because they possess greater autonomy & learning capabilities, allowing them to perform tasks on behalf of users with minimal direct intervention ~ fi re and forget
  • 3.
    Agent has 3main parts Model Memory Tools To make model results to be consistent, set temperature=0
  • 4.
    Memory ~ morethan session context • User: Hi my name is bob • System: Hi bob nice to meet you • User: What is my name ? • System: I dont know … Long history cost more money/token , make LLM to have confusion Short history can return wrong answers as context is partial
  • 5.
    Tools (function call) •User: What is the weather now in london ? • System: I cant say it but I can give you weather during May in general Adding weather tool - now LLM can use it to get the weather at london today Agent needs to verify it handle tools failure
  • 6.
    Agent loop (ā€œmax_iterationsā€,default = 5) Agent dont return result right away, instead it has an ā€œobservationā€ loop to verify the result before it return the fi nal answer
  • 7.
    Multi Agents Requires: 1) crossagents shared memory: If i am booking a vacation i dont need to tell hotel & fl ight agents the vacation date and location i can tell it once and they can update each other using shared KV storage 2) Orchestration: which agent is going to handle the next task ?
  • 8.
    Orchestration types -Sequence / Swarm / Supervisor https://www.youtube.com/watch?v=WTr6mHTw5cM https://langchain-ai.github.io/langgraph/agents/multi-agent/#swarm https://langchain-ai.github.io/langgraph/agents/multi-agent/#swarm https://google.github.io/adk-docs/agents/work fl ow-agents/
  • 9.
    Multi agent orchestrationtypes… https://pub.towardsai.net/supervisor-style-the-king-of-multi-agent-systems-139f0990ed17 https://medium.com/@siddharthc96/building-multi-agent-swarms-a-powerful-architecture-for-complex-ai-systems-37e8d7d9c0a5 https://langchain-ai.github.io/langgraph/concepts/multi_agent/#multi-agent-architectures
  • 10.
    MCP ~ Wrapper Providea standard way to expose tools to LLM
  • 11.
    MCP has main3 parts Tools - allow LLM to perform actions Resources - provide information to the LLM (static data like db schema) Prompt - reusable message templates https://medium.com/@mowhobuilds/mcp-server-resources-or-tools-for-exposing-get-endpoints-162d17c4c134 https://pypi.org/project/fastmcp/#resources--templates https://mail.google.com/mail/u/0/#sent/QgrcJHsTjWBSvvxSnzcKcBkbwqGqxKGtthg?projector=1 https://www.descope.com/learn/post/mcp https://www.newsletter.swirlai.com/p/everything-you-need-to-know-about
  • 12.
  • 13.
  • 14.
    Dynamic Tools Generate toolsfrom con fi g fi le https://github.com/doriwal/Agent/
  • 15.
    Multi agent -ADK Code example Agent goal is to analyze incident by getting relevant logs from elasticSearch and send them to git agent that return relevant code and send them to analyze agent that can check logs and code in order to analyze incident root cause
  • 16.
    Agent code example Agentcan have set of tools that will be used by the model Agent save fi nal result in output_key which is KV shared memory and can be used by other agents
  • 17.
    Multi Agent -LangGraph (low level framework) https://levelup.gitconnected.com/gentle-introduction-to-langgraph-a-step-by-step-tutorial-2b314c967d3c
  • 18.
    Agent 2 Agent Communicationprotocol (not agent framework) to invoke ā€˜remote’ agent over http https://www.devshorts.in/p/agent2agent-a2a-protocol-explained https://towardsdatascience.com/inside-googles-agent2agent-a2a-protocol-teaching-ai-agents-to-talk-to-each-other/
  • 19.
    Agent 2 Agent Card- service endpoint , agent capabilities , authenticaiton Task - what agent needs to do like book a fl ight , task has id and status (submitted, working , failed, complited) Communication - request-response , push noti fi cation , stream https://medium.com/@shamim_ru/google-agent-to-agent-a2a-protocol-explained-with-real-working-examples-99e362b61ba8 https://google-a2a.github.io/A2A/topics/key-concepts/
  • 20.
  • 21.
    No code • https://github.com/langchain-ai/open-agent-platform •https://www.youtube.com/watch?v=kEtYJOijCBM&t=2s (n8n) • https://www.youtube.com/watch?v=Ey18PDiaAYI&t=8999s • https://www.lang fl ow.org/
  • 22.
    AI Framework (fromhigh to low level framework) • Google ADK • https://www.youtube.com/watch?v=P4VFL9nIaIA • CrewAI • https://www.deeplearning.ai/short-courses/multi-ai-agent-systems-with-crewai/ • Aws - https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/ • LangGraph • https://youtu.be/jGg_1h0qzaM?si=B4UtWqrrPTsqNuxR • https://langchain-ai.github.io/langgraph/ • https://langchain-ai.github.io/langgraph/tutorials/get-started/5-customize-state/ • https://www.langchain.com/langsmith • https://academy.langchain.com/courses/intro-to-langgraph? _gl=1*ijypf1*_gcl_au*MTQ5OTgzNTg2LjE3NDg5NTE3OTE.*_ga*NjM2NzAwODc5LjE3NDg5NTE3OTE.*_ga_47WX3HKKY2*czE3NDg5NTE3OTEkbzEkZzEkdDE3NDg5NTM0ODAkajYwJGwwJGgw • Microsoft AutoGen • https://www.youtube.com/watch?v=JmjxwTEJSE8&pp=0gcJCdgAo7VqN5tD • OpenAI • https://openai.github.io/openai-agents-python/ My 2 cents: Start with google adk Its simple and you will focus on your buisness logic not of graphs
  • 23.
    With AI Assistantwe can run faster But so can our competitors