How carlosbasto/sap-a2a-mcp-agentic-ai works
Project type and purpose
• From the file tree and README, this is a Python-based agent framework (“sap-a2a-mcp-agentic-ai”) designed for application-to-application (A2A) integration, specifically with an SAP system. It provides:
• Agent implementations (e.g., SAP agent, utility agent)
• A common client/server layer for inter-agent communication and task orchestration
• Shared types and utilities for caching, notifications, and data models
File structure
• Top-level directories:
• A2A/agents – concrete agent implementations, each in its own sub-module (sap, utils)
• A2A/common – the shared communications layer:
– client/ (client APIs, card_resolver, client abstractions)
– server/ (server, task_manager, utils)
– utils/ (in_memory_cache, push_notification_auth)
– types.py (shared data schemas)
• Project roots include pyproject.toml + lock files, indicating Poetry or pip-tools for dependency management.
• Patterns:
• Modular plugin style: each agent is an independent module with its own entry point (__main__.py)
• Shared client/server boundary for RPC or message passing
• Task manager pattern for coordinating work
Key insights from README
• Although very brief, the project name tells us the focus: a micro-service or agentic framework for SAP A2A communication.
Main components & their interactions
a. Agents
• SAP Agent (A2A/agents/sap)
• Utility Agent (A2A/agents/utils)
– Each agent:
– __main__.py: entry point
– agent.py: core behavior
– task_manager.py: schedules sub-tasks
b. Common Client Library (A2A/common/client)
– Exposes client interfaces for agents and external callers
– card_resolver: resolves payload formats
c. Common Server (A2A/common/server)
– Implements a central task server (server.py)
– task_manager: orchestrates tasks across agents
– utils: helper functions
d. Shared Utilities
• In-memory cache (for fast lookup)
• Push notification auth (for external notifications)
e. Data Schemas (common/types.py)
– Defines message formats, request/response types
Architectural patterns & design principles
• Modular architecture: decoupling agent implementations from communication layer
• Client-server pattern: all agents and external callers interact via a uniform RPC/API layer
• Task queue/manager pattern: server manages work distribution and state
• Shared types ensure consistency across modules
• Plugin/entry-point pattern: agents can be hot-swapped or extended
Diagramming recommendations
• From Agents → Common Client → Common Server (request flow)
• From Common Server → Agents (task dispatch)
• From Agents → External Systems (SAP API, Notification Service)
• Blue: Agents
• Green: Common Layer (client & server)
• Yellow: Shared Utilities & Types
• Grey: External Services
Summary
• Major Python modules as individual components