Agents: The Next Level of Software

A Seminar on Agent Oriented Programming

🤖

Table of Contents

  1. Introduction
  2. What are Agents?
  3. Agent Oriented Programming (AOP)
  4. Traditional vs. Agentic Programming
  5. Communication Technologies
  6. Development Frameworks
  7. Practical Examples
  8. Conclusion & Next Steps

Welcome Software Engineers! 👋

Who This Is For

Developers who know:

  • Object-Oriented Programming (OOP)
  • REST APIs
  • Client-server systems

What We'll Learn

  • Move from old programming to agent programming
  • Build real working systems
  • See real-world examples

Why Agents Matter Now?

🧠 AI Revolution

LLMs and AI make smart software easy to build

🔧 Handle Complex Systems

Modern systems need parts that can think and adapt

📈 Scale Better

Old systems can't handle smart, changing behaviors

👥 User Expectations

Users want smart apps that understand them

What is a Software Agent?

An agent is a smart software that:

  • Sees what's happening around it
  • Acts to change things
  • Has goals it tries to reach
  • Learns from what happens

Key Features

1. Works on Its Own

  • Runs without needing constant human help
  • Makes decisions based on its own logic and what's happening

2. Responds to Changes

  • Reacts when things around it change
  • Adjusts to new situations right away

3. Takes Action

  • Starts doing things to reach its goals
  • Plans and carries out strategies

4. Talks to Others

  • Communicates with other agents
  • Works together to reach shared goals

Agent vs. Old-Style Object

What Old Object Software Agent
How it Acts Waits for commands Does things on its own
What it Stores Data + functions Beliefs, wants, plans
How it Talks Direct function calls Messages and negotiation
Life Cycle Created/destroyed by code Lives long, driven by goals
Making Decisions Fixed logic AI-powered thinking

Types of Agents

1. Simple Reaction Agents

  • Simple if-then behavior
  • No memory or planning
  • Example: Thermostat, basic chatbot

2. Thinking Agents

  • Has a model of the world
  • Can plan and reason
  • Example: AI assistants, self-driving cars

3. Mixed Agents

  • Combines simple reactions with thinking
  • Has multiple layers
  • Example: Modern AI apps

What is Agent Programming?

Agent Programming is a way to build software where:

  • Software systems are made of many agents working together
  • Each agent can think and make decisions on its own
  • The whole system works because agents interact with each other

Environment

Agent
Sensors
Planning Engine
Actions

How Agents Think

🧠 Beliefs

What the agent knows about the world

🎯 Desires

What the agent wants to achieve

📋 Intentions

What the agent plans to do

How Agents Talk

  • Send messages to each other
  • Use rules for working together and making deals
  • Share common ways of talking about things

Agent Programming Rules

1. Each Agent Has One Job

  • Each agent does specific things well
  • Clear boundaries and duties
  • Connected but independent

2. Share the Work

  • Break big problems into smaller pieces across agents
  • Many agents can work at the same time
  • If one breaks, others keep working

3. Magic Happens When Agents Work Together

  • System behavior comes from agents talking to each other
  • Group intelligence is better than individual agents
  • Systems can adapt and organize themselves

Programming Paradigm Evolution

Procedural

Functions

Data Flow

Sequential

Object-Oriented

Objects

Encapsulation

Inheritance

Agent-Oriented

Agents

Autonomy

Intelligence

System Design Comparison

Old Way (Client-Server)

Client
Server
Database
Fixed Roles One Boss Dumb Storage

New Way (Multi-Agent System)

Agent
Agent
Agent
Changing Roles Shared Control Smart Parts

How Programs Run Comparison

Old Programming

  • One step after another
  • Always does the same thing
  • One part controls everything
  • Wait for each step to finish
vs

Agent Programming

  • Many things happen at once
  • Can do different things each time
  • Control is shared
  • Don't wait - keep working

Why Use Agent Programming?

🔄 Flexible

  • Agents can change how they work based on what's happening
  • Easy to add or remove agents without breaking everything

📊 Grows Well

  • Handle more work by adding more agents
  • Spread the work across many agents

🛡️ Keeps Working

  • If one agent breaks, the system doesn't crash
  • Can fix itself with backup agents

🔧 Easy to Maintain

  • Each part has a clear job
  • Can update agents one at a time

How Agents Talk to Each Other

Agent systems need good ways to communicate so agents can:

🤝 Work Together

Agents working toward the same goals

💬 Make Deals

Agents trading resources or services

📡 Share Information

Agents passing knowledge and data

⏰ Stay in Sync

Agents timing their actions together

Model Context Protocol (MCP)

Model Context Protocol is a standard way for AI models to connect to tools and data:

  • Connects AI models to outside data sources
  • Makes AI apps aware of what's happening around them
  • Standard way for AI agents to access tools and resources

Key Features

Same Interface
One way for tools and resources to work with AI
Remembers Context
Keeps track of conversations
Tool Integration
Standard way to give tools to AI models

MCP Architecture

AI Model

(Client)

MCP Protocol

MCP Server

MCP Protocol

Resources

(Tools)

Agent-to-Agent (A2A) Communication

Agent-to-Agent Protocol is a standard way for different AI agents to talk and work together. It helps:

  • Bridge gaps: Connect different agent systems
  • Work together: Agents can share tasks and context
  • Find each other: Agents can discover what other agents can do
  • Be flexible: Support different ways of talking (real-time, streaming, async)
  • Stay secure: Use standard web security practices
  • Handle long tasks: Support tasks that take time or need human help

A2A Transport Methods

1. JSON-RPC 2.0

Simple request-response using JSON over HTTP

  • Most common and supported
  • Easy to understand and debug

2. gRPC

High-performance protocol using Protocol Buffers

  • Fast and efficient
  • Good for heavy workloads

3. HTTP+JSON/REST

Standard REST API style

  • Familiar to web developers
  • Uses standard HTTP methods

4. Streaming (SSE)

Real-time updates using Server-Sent Events

  • Live updates as tasks progress
  • No need to keep asking for status

A2A Key Ideas

🏷️ Agent Card

  • Like a business card - tells what an agent can do
  • Lists skills, ways to connect, and security needs
  • Found at standard web locations

� Tasks

  • Units of work that agents do
  • Have states: submitted, working, completed, failed
  • Can take a long time and send updates

� Messages & Parts

  • How agents send information
  • Can contain text, files, or structured data
  • Support conversation history

Development Frameworks

The agent development ecosystem offers various frameworks, each with unique strengths and use cases.

Agent Development Kit (ADK)

Enterprise-grade reliability and scalability

LangChain

Popular framework for LLM applications

LangGraph

Graph-based agent architectures

AutoGen & CrewAI

Specialized agent coordination tools

Agent Development Kit (ADK)

ADK is a comprehensive framework specifically designed for building production-ready agent systems with emphasis on:

  • Enterprise-grade reliability
  • Scalable agent architectures
  • Built-in communication protocols
  • Integration with existing systems

Advantages

  • Production-ready out of the box
  • Comprehensive monitoring and logging
  • Built-in fault tolerance
  • Enterprise integration capabilities

Best For: Large-scale enterprise applications, mission-critical systems

ADK Simple Agent Example

Creating a Capital City Agent


capital_agent = LlmAgent(
    model="gemini-2.0-flash",
    name="capital_agent",
    description="Answers user questions about the capital city of a given country.",
    instruction="""You are an agent that provides the capital city of a country.
                    When a user asks for the capital of a country:
                    1. Identify the country name from the user's query.
                    2. Use the `get_capital_city` tool to find the capital.
                    3. Respond clearly to the user, stating the capital city.

                    Example Query: "What's the capital of {country}?"
                    Example Response: "The capital of France is Paris."
                    """,
    tools=[get_capital_city],
)

ADK Workflow Agents

Workflow Agents orchestrate complex multi-step processes by coordinating multiple agents and tools:

🔄 Sequential Agents

Execute agents one after another in a defined order

Agent A Agent B Agent C

🔁 Loop Agents

Repeat agent execution until a condition is met

Agent Until Complete

⚡ Parallel Agents

Run multiple agents simultaneously for faster processing

Agent A
Agent B
Agent C

Learn more: ADK Workflow Agents Documentation

LangChain Framework

LangChain is a popular framework for building applications with large language models, offering:

  • Modular components for LLM applications
  • Pre-built chains for common patterns
  • Extensive tool and data source integrations
  • Strong community and ecosystem

Advantages

  • Rapid prototyping and development
  • Extensive pre-built components
  • Strong LLM integration
  • Active community support

Best For: LLM-powered applications, rapid prototyping, research

LangGraph Framework

LangGraph extends LangChain with graph-based agent architectures, enabling:

  • Complex multi-agent workflows
  • Stateful agent interactions
  • Conditional routing and branching
  • Visual workflow representation

Advantages

  • Visual workflow representation
  • Complex multi-agent orchestration
  • Stateful agent interactions
  • Flexible routing logic

Best For: Complex multi-step workflows, agent coordination scenarios

Framework Selection Guide

Framework Strengths Use Cases Learning Curve
ADK Production-ready, enterprise features Large-scale systems, mission-critical Moderate
LangChain Rapid development, extensive tools LLM apps, prototyping Low
LangGraph Complex workflows, visual design Multi-step processes, research Moderate
AutoGen Conversational agents, code execution Interactive AI, coding assistance Low
CrewAI Role-based agents, task management Content creation, analysis Low

Practical Examples

🎧 Customer Service System

Multi-agent system for handling inquiries, processing orders, and providing support

  • Reception Agent (Entry Point)
  • Knowledge Agent (Information Provider)
  • Order Agent (Order Management)

📝 Content Management System

Collaborative content creation, review, and publishing

  • Content Planner
  • Research Agent
  • Editor Agent
  • SEO Agent

📈 Trading System

Real-time market analysis and trading decisions

  • Market Analysis Agent
  • Risk Manager
  • Portfolio Manager
  • Execution Agent

Customer Service System Architecture

Reception Agent
Knowledge Agent
Order Agent
MCP Protocol A2A Communication
Customer Interface
Database Server
Shipping Agent

Benefits

  • Intelligent inquiry routing and classification
  • Context-aware responses from knowledge base
  • Seamless integration with external systems
  • Scalable and fault-tolerant design

Content Management System Workflow

1. Planning

Content Planner analyzes requirements and creates strategy

2. Research

Research Agent gathers information from multiple sources

3. Creation

Editor Agent creates content based on research data

4. Optimization

SEO Agent optimizes for search engines

5. Verification

Fact Checker Agent verifies claims and accuracy

6. Publishing

Publisher Agent handles final review and publication

Trading System Agent Network

Portfolio Manager

Market Analysis

Real-time data processing and signal generation

Risk Manager

Risk assessment and position sizing

Execution Agent

Order execution and trade management

Key Features

  • Real-time market data analysis
  • Risk-aware decision making
  • Automated execution with safeguards
  • Continuous portfolio optimization

Main Points to Remember

1. Big Change in How We Think

  • From Objects to Agents: Move beyond simple objects to smart, independent parts
  • From Step-by-Step to All-at-Once: Do many things at the same time
  • From Fixed to Learning: Build systems that learn and change

2. Communication is Key

  • MCP: Makes AI-tool connections standard, helps context-aware apps
  • A2A: Lets agents work together and coordinate well
  • Pick the Right Way: Choose the right communication method for your needs

Tools & Real Uses

3. Development Tools

  • ADK: Ready-to-use, business-grade agent systems
  • LangChain: Fast development with lots of LLM connections
  • LangGraph: Complex workflows you can see and design
  • New Tools: Active community with special solutions

4. Real-World Uses

  • Customer Service: Smart, context-aware help systems
  • Content Creation: Teams working together to create and improve content
  • Trading: Real-time, risk-aware money decisions
  • Business Automation: Smart process management

Best Ways to Build Agents

Design Rules

  • One Job Each: Each agent should have a clear, focused job
  • Keep Separate: Don't make agents depend on each other too much
  • Group Related Things: Put similar functions together in agents
  • Safe to Retry: Make sure operations can be tried again safely

Communication Rules

  • Don't Wait by Default: Use non-blocking communication
  • Set Time Limits: Always set timeouts for agent talks
  • Handle Errors Well: Plan for failures and try again
  • Plan for Changes: Think about how messages might change over time

Testing & Watching Your Agents

Testing Ways

  • Test Parts: Test each agent's logic separately
  • Test Together: Test how agents work with each other
  • Test with Fake Data: Test with made-up data and situations
  • Break Things on Purpose: Test how well it handles problems

Watching and Understanding

  • Organized Logs: Use consistent, searchable log formats
  • Count Things: Track performance and business numbers
  • Follow Requests: Understand how requests move through agents
  • Get Alerts: Know about problems before users do

Next Steps for Continued Learning

1. Hands-On Projects

  • Build the customer service system from our examples
  • Create a simple trading bot with risk management
  • Develop a content generation pipeline

2. Advanced Topics

  • Agent Learning: Implement reinforcement learning in agents
  • Formal Verification: Ensure agent behavior correctness
  • Blockchain Integration: Decentralized agent coordination
  • Edge Computing: Deploying agents on edge devices

Community & Technology Evolution

3. Community and Resources

  • GitHub Repositories: Explore open-source agent projects
  • Research Papers: Stay current with academic research
  • Conferences: Attend agent and AI conferences
  • Online Communities: Join agent development forums

4. Technology Evolution

  • New Frameworks: Keep track of emerging frameworks
  • Standards: Follow MCP and other protocol developments
  • Hardware: Understand impact of new hardware (GPUs, quantum)
  • Regulations: Stay informed about AI and agent regulations

Questions for Further Exploration

🏗️ Architecture

How might agents change software architecture patterns?

🔒 Security

What security challenges are unique to agent systems?

🔍 Explainability

How do we ensure agent decisions are explainable?

🚀 Future

What role will agents play in future software development?

⚖️ Control

How do we balance agent autonomy with human control?

Thank You!

Questions & Discussion

Let's discuss the future of agent-oriented programming!

📚 Explore the Code & Examples

All presentation slides and example projects are available on GitHub

💡 Share your projects • 🚀 Contribute to the community • 📖 Build the future together

🤖
🚀
💡