{"id":28196,"library":"solace-agent-mesh","title":"Solace Agent Mesh","description":"Solace Agent Mesh is an open-source framework for building event-driven, multi-agent AI systems where specialized agents collaborate on complex tasks. Current version: 1.24.1. Released under Apache 2.0, with active development and frequent releases.","status":"active","version":"1.24.1","language":"python","source_language":"en","source_url":"https://github.com/SolaceLabs/solace-agent-mesh","tags":["event-driven","multi-agent","ai-agents","solace","llm","orchestration"],"install":[{"cmd":"pip install solace-agent-mesh","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for Solace Event Mesh integration","package":"solace-cloud-client","optional":false},{"reason":"Used for agent orchestration and LLM integration","package":"langchain","optional":false},{"reason":"Provides community LLM integrations","package":"langchain-community","optional":true},{"reason":"Alternative LLM framework for agent RAG capabilities","package":"llama-index","optional":true},{"reason":"Optional caching and state store","package":"redis","optional":true}],"imports":[{"note":"AgentMesh is directly under solace_agent_mesh, not a submodule","wrong":"from solace_agent_mesh import AgentMesh; from solace_agent_mesh.core import AgentMesh","symbol":"AgentMesh","correct":"from solace_agent_mesh import AgentMesh"},{"note":"create_agent is in the agents submodule, not the top-level package","wrong":"from solace_agent_mesh import create_agent","symbol":"create_agent","correct":"from solace_agent_mesh.agents import create_agent"}],"quickstart":{"code":"from solace_agent_mesh import AgentMesh\n\n# Initialize the mesh with Solace event broker credentials\nmesh = AgentMesh(\n    solace_host=os.environ.get('SOLACE_HOST', ''),\n    solace_vpn=os.environ.get('SOLACE_VPN', ''),\n    solace_username=os.environ.get('SOLACE_USERNAME', ''),\n    solace_password=os.environ.get('SOLACE_PASSWORD', '')\n)\n\n# Define a simple agent\n@mesh.agent(name=\"echo_agent\", description=\"Repeats messages back\")\nasync def echo_agent(message: str) -> str:\n    return f\"Echo: {message}\"\n\n# Start the mesh\nmesh.run()","lang":"python","description":"Initialize a Solace Agent Mesh with event broker credentials and define an agent."},"warnings":[{"fix":"Use keyword arguments: @mesh.agent(name='my_agent', description='...')","message":"In v1.20.0, the agent decorator signature changed from @mesh.agent(name, description) to @mesh.agent(name=..., description=...). Using positional arguments will raise a TypeError.","severity":"breaking","affected_versions":">=1.20.0"},{"fix":"Set protocol='http' explicitly in AgentMesh constructor if you rely on HTTP.","message":"In v1.22.0, the default event broker protocol changed from HTTP to MQTT. Existing configurations using HTTP must be updated.","severity":"breaking","affected_versions":">=1.22.0"},{"fix":"Set all environment variables or pass them explicitly as parameters.","message":"The AgentMesh constructor requires SOLACE_HOST, SOLACE_VPN, SOLACE_USERNAME, SOLACE_PASSWORD environment variables. If any are missing, the mesh fails silently at startup.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace create_mesh(...) with AgentMesh(...).","message":"The 'create_mesh' function is deprecated since v1.18.0 and will be removed in v2.0. Use AgentMesh constructor directly.","severity":"deprecated","affected_versions":">=1.18.0, <2.0"},{"fix":"Always define agent functions as async def agent_name(...).","message":"Async agents must be defined with 'async def', but the @mesh.agent decorator does not enforce this; a sync function will cause runtime errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Upgrade to latest: pip install --upgrade solace-agent-mesh","cause":"Outdated version of solace-agent-mesh (pre-1.0). The package structure changed.","error":"ImportError: cannot import name 'AgentMesh' from 'solace_agent_mesh'"},{"fix":"Use keyword arguments: @mesh.agent(name='agent_name', description='...')","cause":"Using positional arguments for decorator in v1.20+.","error":"TypeError: agent() takes 1 positional argument but 2 were given"},{"fix":"Set SOLACE_HOST, SOLACE_VPN, SOLACE_USERNAME, SOLACE_PASSWORD environment variables or pass them to AgentMesh().","cause":"Environment variables not set or passed to AgentMesh constructor.","error":"ValueError: Missing required environment variable: SOLACE_HOST"},{"fix":"Use nest_asyncio.apply() or run in a separate script. For Jupyter: import nest_asyncio; nest_asyncio.apply()","cause":"Calling mesh.run() in an environment with an already closed event loop (e.g., Jupyter notebook).","error":"RuntimeError: Event loop is closed"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}