Go 1.24+ GitHub

Explore AgentMesh further

Find examples, API documentation, and contribution guidelines.

Examples

The repository includes 18 comprehensive examples demonstrating core features and production patterns:

Getting started

  • basic_agent – Simple ReAct agent with tool calling and message handling
  • state_builder – Simplified state initialization with fluent API
  • streaming – Real-time event streaming for responsive UIs and progress tracking

Tool integration

  • mcp_tools – Model Context Protocol integration with dynamic tool discovery

Advanced workflows

  • conditional_flow – Dynamic routing and branching based on state
  • parallel_tasks – Concurrent execution with fan-out/fan-in patterns
  • subgraph – Modular workflows with reusable graph components

State management

  • checkpointing – Automatic state persistence and fault recovery
  • time_travel – Debug workflows by replaying from any superstep
  • message_retention – Conversation history management and pruning strategies

Production features

  • observability – OpenTelemetry metrics, distributed tracing, and monitoring
  • human_pause – Human-in-the-loop workflows with interrupt/resume
  • human_approval – Approval workflows with conditional guards, state edits, and audit trails
  • a2a_integration – Agent-to-Agent protocol for multi-agent coordination
  • middleware – Middleware system for graph/model/tool execution layers
  • circuit_breaker – Circuit breaker middleware for fault tolerance
  • guardrails – Content filtering, PII protection with custom middleware

Embeddings & RAG

  • semantic_caching – Text embeddings for semantic search and RAG workflows

Browse all examples: github.com/hupe1980/agentmesh/tree/main/examples


API documentation

Complete API reference with examples:


Community

Get help

Contributing

Contributions are welcome! See:


Development

Running tests

# Run all tests
go test ./...

# Run with race detection
go test ./... -race

# Run with coverage
go test ./... -cover

Testing utilities

The pkg/testutil package provides mock implementations and builders for testing agents and workflows. See the Testing Guide for comprehensive documentation.

import "github.com/hupe1980/agentmesh/pkg/testutil"

// Create a mock model with builder pattern
model := testutil.NewModelBuilder().
    WithResponse("Hello!").
    WithToolCalls(message.ToolCall{Name: "search"}).
    Build()

Benchmarks

# Run all benchmarks
go test ./... -bench=.

# Run specific benchmark
go test ./pkg/graph -bench=BenchmarkOptimized

Local documentation

Preview documentation locally:

cd docs
bundle install
bundle exec jekyll serve --livereload

Navigate to http://localhost:4000