Skip to main content

Python SDK for interacting with AI Mesh platform

Project description

AI Mesh SDK

A lightweight Python SDK for discovering and calling agents on the AI Mesh platform.

Features

  • List available agents on the mesh
  • Call any agent by ID with custom inputs
  • Convert all Mesh agents into LangChain-compatible tools
  • Simple authentication with API tokens

Installation

pip install ai-mesh-sdk

Quick Start

from mesh_sdk import MeshSDK

# Initialize with your API token
sdk = MeshSDK(token="your-api-token")

# List all available agents
agents = sdk.list_agents()
print(f"Found {len(agents)} agents")

# Call a specific agent
result = sdk.call_agent(
    agent_id="agent-123",
    inputs={"prompt": "Hello, world!"}
)
print(result)

# Use with LangChain
from langchain.agents import initialize_agent, AgentType

tools = sdk.to_langchain_tools()
agent = initialize_agent(
    tools=tools,
    llm=your_llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION
)

API Reference

MeshSDK(token)

Initialize the SDK with your API token.

Parameters:

  • token (str): Your AI Mesh API token

list_agents()

Returns a list of all available agents on the mesh.

Returns: List[Dict] - Agent metadata including ID, name, and description

call_agent(agent_id, inputs)

Call a specific agent with provided inputs.

Parameters:

  • agent_id (str): The unique identifier of the agent
  • inputs (Dict): Input parameters for the agent

Returns: Dict - The agent's response

to_langchain_tools()

Convert all mesh agents into LangChain Tool objects.

Returns: List[Tool] - LangChain-compatible tools

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_mesh_sdk-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_mesh_sdk-0.1.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file ai_mesh_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ai_mesh_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ai_mesh_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c71683a40982adee0e837b14a29846630354645ae6fd38f3cfe959656b842ce6
MD5 02260a551ce4eecf4513449b7f7893e4
BLAKE2b-256 76f164686500497cc4b230e6e142d663af17ef87f3ed324cf558a95f821f932b

See more details on using hashes here.

File details

Details for the file ai_mesh_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ai_mesh_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ai_mesh_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16ae541a0804716923748c527fe96b7fccc8df0fb38274654fa02fc7d3a578d2
MD5 1544c25f0ce2af5caf05a17f942f2609
BLAKE2b-256 d94deb9175e057c57c53bb2b97cf73129cd37e2de87f2c35be5fbff9d99ea67c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page