AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified Apache-2.0 Self-run

Agentmesh

mcp-hupe1980-agentmesh Β· by hupe1980

πŸ€–πŸ•ΈοΈ Production-grade multi-agent orchestration framework powered by Pregel BSP. Build sophisticated AI workflows with parallel execution, state management, and observability.

β€” No reviews yet
0 installs
13 views
0.0% view→install

Install

$ agentstack add mcp-hupe1980-agentmesh

βœ“ scanned Β· βœ“ verified, works with Claude Code, Cursor, and more.

Security review

βœ“ Passed

No issues found. Passed automated security review. Β· v0.1.0 How review works β†’

  • βœ“ Prompt-injection patterns
  • βœ“ Secret / credential exfiltration
  • βœ“ Dangerous shell & filesystem operations
  • βœ“ Untrusted network calls
  • βœ“ Known-malicious package signatures

What it can access

  • βœ“ Network access No
  • βœ“ Filesystem access No
  • βœ“ Shell / process execution No
  • ● Environment & secrets Used
  • βœ“ Dynamic code execution No

From automated source analysis of v0.1.0. β€œUsed” means the capability is present in the source β€” more access means more to trust, not that it’s unsafe.

View the full security report β†’

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-hupe1980-agentmesh)

Reliability & compatibility

βœ“ Security review passed
0 installs to date
β€” no reviews yet
β—‹ 7mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work β†’
Are you the author of Agentmesh? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

πŸ€–πŸ•ΈοΈ AgentMesh

[](https://go.dev/) [](https://opensource.org/licenses/Apache-2.0) [](https://goreportcard.com/report/github.com/hupe1980/agentmesh) [](https://pkg.go.dev/github.com/hupe1980/agentmesh)

> Production-grade multi-agent orchestration framework powered by Pregel-style bulk-synchronous parallel (BSP) graph processing. Build sophisticated AI agent workflows with parallel execution, state management, and enterprise-grade observability.

Requires Go 1.24+


✨ Key Features

Core Engine

  • πŸ”„ Pregel BSP Execution - Parallel graph processing with optimized concurrency (4-10x faster state access)
  • 🧠 LLM Integration - Native support for OpenAI, Anthropic, Gemini, Amazon Bedrock, Ollama with streaming and reasoning models
  • πŸ’Ύ State Management - Lock-free channel-based state with checkpointing, managed value descriptors, and resume-time rehydration hooks
  • πŸ› οΈ Tool Orchestration - Type-safe function calling with automatic schema generation
  • πŸ”€ Model Routing - Intelligent model selection based on cost, capabilities, and availability

Production Ready

  • βœ… Graph Validation - Comprehensive compile-time error checking (cycles, missing nodes, unreachable paths)
  • πŸ’Ύ Checkpointing - Persistent state with auto-resume, encryption, and signing
  • ♻️ Zero-Copy Resume - Copy-on-write checkpoint restores reuse the saved map and only allocate when keys mutate (10k+ key checkpoints resume without GC spikes)
  • ⏸️ Human-in-the-Loop - Approval workflows with conditional guards and audit trails
  • πŸ“Š Observability - Built-in OpenTelemetry metrics, non-blocking event bus fan-out, and distributed tracing
  • πŸ” Resilience - Configurable retry policies, circuit breakers, and timeouts
  • πŸ”’ Security - WASM sandboxing and integrity checks

AI/ML Features

  • πŸ”’ Embeddings & Memory - Semantic search and long-term conversation storage
  • πŸ” RAG Integration - Vector stores (pgvector, Qdrant, Pinecone, Weaviate), AWS Bedrock Knowledge Bases, Kendra, and automatic query rephrasing
  • 🧠 Native Reasoning - First-class support for o1, o3, Gemini 2.0, Claude reasoning models
  • πŸ“ Prompt Templates - Variable substitution with reusable patterns

Extensibility

  • 🀝 A2A Protocol - Multi-agent collaboration with standardized communication
  • πŸ”Œ MCP Support - Dynamic tool discovery from Model Context Protocol servers
  • 🌐 LangChainGo Tools - Import existing tool ecosystem
  • βš™οΈ Custom Backends - Pluggable MessageBus for distributed execution (Redis, Kafka)

πŸš€ Quick Start

Installation

go get github.com/hupe1980/agentmesh@latest

Hello World ReAct Agent

package main

import (
    "context"
    "fmt"
    "log"
    "os"
    "strings"

    "github.com/hupe1980/agentmesh/pkg/agent"
    "github.com/hupe1980/agentmesh/pkg/graph"
    "github.com/hupe1980/agentmesh/pkg/message"
    "github.com/hupe1980/agentmesh/pkg/model/openai"
    "github.com/hupe1980/agentmesh/pkg/tool"
)

// WeatherArgs defines the JSON schema for the weather tool.
type WeatherArgs struct {
    Location string `json:"location" jsonschema:"description=The city to get weather for"`
}

func main() {
    ctx := context.Background()

    // Validate API key
    if strings.TrimSpace(os.Getenv("OPENAI_API_KEY")) == "" {
        log.Fatal("OPENAI_API_KEY environment variable is required")
    }

    // Create OpenAI model (uses OPENAI_API_KEY env var)
    model := openai.NewModel()

    // Define a tool with typed arguments
    weatherTool, err := tool.NewFuncTool(
        "get_weather",
        "Get current weather for a location",
        func(ctx context.Context, args WeatherArgs) (string, error) {
            return fmt.Sprintf("Weather in %s: Sunny, 72Β°F", args.Location), nil
        },
    )
    if err != nil {
        log.Fatal(err)
    }

    // Create ReAct agent
    reactAgent, err := agent.NewReAct(model,
        agent.WithTools(weatherTool),
        agent.WithMaxIterations(5),
    )
    if err != nil {
        log.Fatal(err)
    }

    // Execute agent and get the final result
    messages := []message.Message{
        message.NewHumanMessage("What's the weather in San Francisco?"),
    }

    lastMsg, err := graph.Last(reactAgent.Run(ctx, messages))
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(lastMsg.String())
}

Output:

Thought: I need to check the weather in San Francisco
Action: get_weather("San Francisco")
Observation: Weather in San Francisco: Sunny, 72Β°F
The weather in San Francisco is currently sunny with a temperature of 72Β°F.

πŸ“š Documentation

Getting Started

  • πŸ“˜ [Getting Started Guide](docs/getting-started.md) - Complete tutorial with examples
  • πŸ—οΈ [Architecture Overview](docs/architecture.md) - Understanding the Pregel BSP design
  • πŸ“– API Reference - Complete godoc

Core Concepts

  • πŸ•ΈοΈ [Graph Building](docs/core-concepts.md) - Nodes, edges, and execution flow
  • πŸ—‚οΈ [State Management](docs/state-management.md) - Channels, reducers, checkpointing, and approval workflows
  • πŸ”§ [Tools Guide](docs/tools.md) - Building and integrating tools
  • πŸ€– [Model Integration](docs/models.md) - LLM provider setup and configuration

Advanced Features

  • πŸ€– [Agent Patterns](docs/agents.md) - ReAct, RAG, and Supervisor agents
  • πŸ“Š [Observability](docs/observability.md) - Metrics, tracing, and monitoring
  • πŸ”Œ [Middleware](docs/middleware.md) - Caching, rate limiting, circuit breakers
  • πŸ“… [Custom Schedulers](docs/advanced.md#custom-schedulers) - Priority-based and resource-aware vertex execution
  • 🧠 [Memory & Embeddings](docs/memory.md) - Semantic search and conversation storage
  • 🀝 [A2A Protocol](docs/a2a.md) - Multi-agent collaboration
  • πŸ”’ [WASM Sandboxing](docs/wasm-sandboxing.md) - Secure untrusted code execution

🎨 Examples

Explore 41 comprehensive examples in the [examples/](examples/) directory:

| Example | Description | |---------|-------------| | [basicagent](examples/basicagent/) | Simple ReAct agent with tools | | [blogwriter](examples/blogwriter/) | Multi-agent blog writing with progress tracking | | [conversationalagent](examples/conversationalagent/) | Agent with long-term memory across turns | | [documentloader](examples/documentloader/) | Document loading and ingestion pipeline | | [supervisoragent](examples/supervisoragent/) | Multi-agent coordination with supervisor | | [reflectionagent](examples/reflectionagent/) | Self-critique and iterative refinement | | [checkpointing](examples/checkpointing/) | State persistence and resume | | [humanapproval](examples/humanapproval/) | Approval workflows with conditional guards | | [paralleltasks](examples/paralleltasks/) | Concurrent node execution | | [streaming](examples/streaming/) | Real-time response streaming | | [middleware](examples/middleware/) | Rate limiting and circuit breakers | | [customscheduler](examples/customscheduler/) | Priority and resource-aware scheduling | | [observability](examples/observability/) | OpenTelemetry integration | | [a2aintegration](examples/a2aintegration/) | Agent-to-agent communication | | [wasmtool](examples/wasmtool/) | Sandboxed tool execution |

[See all examples β†’](examples/)

Running Examples

# Run any example
cd examples/basic_agent
go run main.go

# Set required environment variables
export OPENAI_API_KEY=your-key-here
export ANTHROPIC_API_KEY=your-key-here  # For Anthropic examples

πŸ—οΈ Architecture

AgentMesh uses a layered architecture with clean separation of concerns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Application Layer (pkg/agent)                     β”‚
β”‚  β€’ ReActAgent, SupervisorAgent, RAGAgent                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Graph Orchestration (pkg/graph)                   β”‚
β”‚  β€’ Workflow construction β€’ State management β€’ Validation    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Execution Engine (pkg/pregel)                     β”‚
β”‚                                                             β”‚
β”‚  β€’ BSP Runtime      β€’ Worker pools      β€’ MessageBus        β”‚
β”‚  β€’ Superstep sync   β€’ Sharded frontier  β€’ Backpressure      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Components:

  • Graph - Define nodes, edges, and execution flow with NodeFunc
  • BSPState - Copy-on-write state with typed Key[T] and ListKey[T]
  • Pregel Runtime - Bulk-synchronous parallel execution with sharded message passing
  • Checkpointer - State persistence with encryption, signing, and two-phase commit
  • Agents - High-level abstractions (ReAct, Supervisor, RAG)

[Learn more about the architecture β†’](docs/architecture.md)


πŸ§ͺ Testing

# Run all tests
go test ./...

# With coverage
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out

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

Testing Utilities

The pkg/testutil package provides mock implementations and builders for testing agents and workflows. See the [Testing Guide](docs/testing.md) 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()

// Create a mock tool
tool := testutil.NewToolBuilder("search").
    WithResult("search results").
    Build()

// Record and assert model interactions
recorder := testutil.NewConversationRecorder()
// ... run agent ...
recorder.AssertRequestCount(t, 1)
recorder.AssertToolCallMade(t, "search")

🀝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for your changes
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Development Guidelines

  • All new code must have tests (target 85%+ coverage)
  • Run go fmt and golangci-lint before committing
  • Update documentation for public API changes
  • Add examples for new features

πŸ“„ License

Licensed under the Apache License 2.0 - see [LICENSE](LICENSE) for details.


πŸ™ Acknowledgments

  • Pregel Paper - Google's bulk-synchronous parallel graph processing model
  • Go Community - Exceptional tooling and ecosystem
  • OpenTelemetry - Production-grade observability standards

⭐ Star this repo if you find it useful!

Made with ❀️ by hupe1980

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source β€” we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.