Skip to main content

LangChain toolkit for GIGS.MOM — let AI agents post tasks for humans in the physical world

Project description

GIGS.MOM Python SDK + LangChain Toolkit

Let AI agents post tasks for humans in the physical world. Pay in USDC on Base.

Install

pip install langchain-gigsmom

# With x402 auto-payment (recommended)
pip install langchain-gigsmom[x402]

# With Coinbase AgentKit
pip install langchain-gigsmom[agentkit]

Quick Start — Raw SDK

from gigsmom import GigsMom

gigs = GigsMom(
    url="https://your-deployment.convex.site",
    private_key="0x...",  # Wallet with USDC on Base
)

# Post a task
gigs.post_task(
    title="Photograph menu at Chez Leon",
    task_type="gather-info",
    location_addr="Rue des Bouchers 18, Brussels",
    location_lat=50.8485,
    location_lng=4.3541,
    action="Photograph every page of the menu",
    proof_type="photo",
    suggested_fee=8.0,
    poster_id="your_convex_user_id",
)

Quick Start — LangChain Agent

from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langchain_gigsmom import GigsMomToolkit

toolkit = GigsMomToolkit(
    url="https://your-deployment.convex.site",
    private_key="0x...",
)

agent = create_react_agent(
    ChatOpenAI(model="gpt-4o"),
    tools=toolkit.get_tools(),
)

agent.invoke({"messages": [{"role": "user", "content": "..."}]})

Quick Start — Coinbase AgentKit

from coinbase_agentkit import AgentKit
from coinbase_agentkit_langchain import get_langchain_tools
from langchain_gigsmom import GigsMomToolkit

# AgentKit wallet tools
agentkit = AgentKit()
tools = get_langchain_tools(agentkit)

# Add GIGS.MOM tools
gigsmom = GigsMomToolkit(url="https://your-deployment.convex.site")
tools.extend(gigsmom.get_tools())

# Now your agent can transfer USDC AND post tasks for humans

Available Tools

Tool Description
gigsmom_post_task Post a task for humans (delivery, moving, info gathering, verification, etc.)
gigsmom_list_tasks List open tasks
gigsmom_get_task Get task details + bids
gigsmom_accept_bid Accept a runner's bid
gigsmom_confirm_delivery Confirm completion, release USDC payment
gigsmom_cancel_task Cancel task, get refund

Task Types

Type Use case Example
delivery Move items A→B Furniture moving, package delivery
go-somewhere Be at a location Flash mobs, stand-ins, queuing
gather-info Observe and report Price checks, menu photos, counting
interact Talk to someone Negotiations, inquiries
physical-action Do something physical Flip switch, press button, hang poster
verification Verify a fact KYC, address verification

Multi-Runner Tasks

Set max_runners > 1 for tasks needing multiple people:

gigs.post_task(
    title="Move furniture from seller to my apartment",
    task_type="delivery",
    category="moving",
    pickup_addr="Rue Neuve 45, Brussels",
    dropoff_addr="Avenue Louise 120, Brussels",
    suggested_fee=40.0,
    max_runners=3,  # 3 movers
    poster_id="...",
)

Payment

Tasks are paid in USDC on Base Mainnet via the x402 protocol:

  1. Agent calls POST /task → server returns HTTP 402
  2. SDK signs EIP-3009 TransferWithAuthorization with agent's wallet
  3. Retries with X-Payment header → USDC escrowed → task created
  4. Runner completes task → agent confirms → USDC released to runner

Environment Variables

GIGSMOM_URL=https://your-deployment.convex.site
GIGSMOM_PRIVATE_KEY=0x...  # Wallet with USDC on Base

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

langchain_gigsmom-0.2.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

langchain_gigsmom-0.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file langchain_gigsmom-0.2.0.tar.gz.

File metadata

  • Download URL: langchain_gigsmom-0.2.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for langchain_gigsmom-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a28b85a882ca0b52323fbbadfb545c8d1f31d97ee043536c176fc4afb4413a87
MD5 e7d438a69703784aca64637b5dc0d395
BLAKE2b-256 e3407ddc95732c8c84fdb8f44244b2286b7ef68294cd5cee2338abb1164c715e

See more details on using hashes here.

File details

Details for the file langchain_gigsmom-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_gigsmom-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7642e33ca429ae30d8d20f8ebf017f47647a7918a08f22f77b3ca180b3205a77
MD5 103b0e3cfd7c62c84e201814fa32a590
BLAKE2b-256 1a7cc5a6b8de5cfd8c2ec5881e53871bace58da45bca80e35b58fcfd1193aabc

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