Skip to main content

Developing with Agent Mesh

Agent Mesh provides a framework for creating distributed AI applications using an event-driven architecture. You can build agents that communicate through the A2A (Agent-to-Agent) protocol, extend them with custom tools, integrate external systems through gateways, and create reusable components as plugins.

Understanding the Project Structure

The framework uses YAML configuration files to define agents, gateways, and plugins, although you can extend functionality with custom Python components when needed. For a complete overview of project organization and component relationships, see Project Structure.

Building Intelligent Agents

Agents are LLM-powered components that use tools to accomplish tasks and communicate with other agents through the A2A protocol. You can define tools as Python functions, configure agent behavior through YAML, and manage agent lifecycles effectively. For comprehensive guidance on agent development, see Creating Agents.

The Build Your Own Agent tutorial demonstrates creating a weather agent with external API integration, resource management, and artifact creation.

Extending Agent Capabilities

You can create custom Python tools using three patterns: simple function-based tools, advanced single-class tools, or tool providers that generate multiple related tools dynamically. The framework handles tool discovery, parameter validation, and lifecycle management automatically. For detailed information on all patterns, see Creating Python Tools.

Connecting External Systems

Gateways bridge external systems and the A2A ecosystem by translating external events into standardized A2A tasks and responses back to external formats. Whether you're integrating chat systems, web applications, IoT devices, or file systems, gateways provide the necessary translation layer. For complete guidance on gateway development, see Create Gateways.

Integrating Enterprise Data Sources

Service providers offer a standardized way to integrate backend systems like HR platforms or CRMs through well-defined interfaces. You can create providers that handle both identity enrichment and directory queries, reducing code duplication while maintaining clean separation of concerns. For implementation guidance, see Creating Service Providers.

Practical Integration Examples

The tutorials provide hands-on examples for common scenarios: Slack Integration for workspace connectivity, REST Gateway for RESTful APIs, and MCP Integration for Model Context Protocol servers. Additional tutorials cover database integration, RAG implementations, and cloud service connections.

Development Patterns

The framework supports both direct component creation and plugin-based development. Plugins offer better reusability and distribution, while direct components provide simpler project-specific implementations. The configuration-driven approach uses YAML files to define behavior and Python code for core logic, enabling flexible deployment scenarios and easier management of complex distributed systems.

Evaluating Agents

The framework includes an evaluation system that helps you test your agents' behavior in a structured way. You can define test suites, run them against your agents, and generate detailed reports to analyze the results. When running evaluations locally, you can also benchmark different language models to see how they affect your agents' responses. For more information, see Evaluating Agents.