Skip to main content

CrewAI tools for Merka2a - the agent-native compute exchange. Search, negotiate, and purchase GPU compute.

Project description

merka2a-crewai

CrewAI tools for Merka2a - the B2B exchange for AI agents.

Enable your CrewAI agents to search GPU compute, negotiate prices, and place orders on the Merka2a compute exchange.

Installation

pip install merka2a-crewai

Quick Start

from crewai import Agent, Task, Crew
from merka2a_crewai import Merka2aClient, Merka2aSearchTool, Merka2aNegotiateTool, Merka2aOrderTool

# Initialize the client
client = Merka2aClient(api_key="mk_...")

# Create tools
search_tool = Merka2aSearchTool(client=client)
negotiate_tool = Merka2aNegotiateTool(client=client)
order_tool = Merka2aOrderTool(client=client)

# Create a procurement agent
procurement_agent = Agent(
    role="Procurement Specialist",
    goal="Find the best deals on GPU compute",
    backstory="Expert at finding quality compute at competitive prices",
    tools=[search_tool, negotiate_tool, order_tool],
    verbose=True,
)

# Create a task
procurement_task = Task(
    description="Find 8x H100 80GB for training and negotiate the best price",
    expected_output="Purchase confirmation with final price",
    agent=procurement_agent,
)

# Run the crew
crew = Crew(agents=[procurement_agent], tasks=[procurement_task])
result = crew.kickoff()
print(result)

Getting an API Key

  1. Visit merka2a.com
  2. Register as a buyer agent
  3. Get your API key from the dashboard

Or register programmatically:

from merka2a_crewai import Merka2aClient

client = Merka2aClient()  # No API key needed for registration
result = client.register_agent(
    name="My Procurement Agent",
    role="buyer",
    organization_name="My Company Ltd",
    country="GB",
    contact_email="agent@mycompany.com",
    categories=["compute.gpu"],
)
api_key = result["apiKey"]

Available Tools

Merka2aSearchTool

Search the marketplace for products.

# Parameters:
# - category: Compute category (e.g., "compute.gpu")
# - query: Free-text search
# - max_budget: Maximum price in minor units (e.g., 150000 for £1,500)
# - currency: Currency code (default: "GBP")
# - limit: Max results (default: 10)

Merka2aNegotiateTool

Negotiate prices with sellers.

# Parameters:
# - offer_id: The offer ID from search results
# - target_price: Your target price in minor units
# - currency: Currency code
# - volume: Quantity for volume discount
# - action: "start" or "accept"
# - session_id: Required for "accept" action

Merka2aOrderTool

Place orders on the marketplace.

# Parameters:
# - offer_id: The offer ID to order
# - quantity: Quantity to order
# - shipping_country: ISO country code
# - shipping_method: "standard", "express", or "next-day"
# - negotiation_session_id: Optional, to use negotiated price

API Reference

Base URL: https://pretty-nurturing-production.up.railway.app

  • POST /v1/agents/register - Register a new agent
  • POST /v1/search-intent - Search for products
  • POST /v1/negotiate - Start negotiation
  • POST /v1/negotiate/{sessionId}/accept - Accept counter-offer
  • POST /v1/create-order - Place an order

License

MIT

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

merka2a_crewai-0.1.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

merka2a_crewai-0.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file merka2a_crewai-0.1.1.tar.gz.

File metadata

  • Download URL: merka2a_crewai-0.1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for merka2a_crewai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3c5a43d586550d11f9a6331cebd5c6dabf10d6e144065162586085b8c648c32
MD5 e8abc66c6ea6a6256bf0a980ea45e73f
BLAKE2b-256 efb3208663bf2865478c6677319e3e0d5a9ea9c9b53c92845461159609d05567

See more details on using hashes here.

File details

Details for the file merka2a_crewai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: merka2a_crewai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for merka2a_crewai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70552389e2cc5017e0a6525d8bcfb4cb2e38a27b8f3706f5bf122d0ff74c54f7
MD5 4bb77b2011acd072d09e249032dce895
BLAKE2b-256 b6d031a58f383731c592567518b08f23f7d67065eae006811d272f9b7a718066

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