Skip to main content

langchain-crossly

PyPI ci

LangChain tools for Crossly, the crosslisting platform for resellers. With them an agent can work a seller's Crossly account: find and price listings, crosspost them to eBay, Poshmark, Mercari, Depop, Etsy and other marketplaces, delist, keep stock counts right, ship orders, answer offers and read the sales numbers.

Installation

pip install -U langchain-crossly

Python 3.10 or newer, langchain-core 1.x.

Credentials

The tools authenticate with a Crossly Personal Access Token (it starts with crossly_pat_). Create one in Crossly under Settings → Developer (create a free account), then set it as CROSSLY_API_KEY:

export CROSSLY_API_KEY="crossly_pat_..."

or pass it in code: CrosslyToolkit(api_key="crossly_pat_..."). The token's scopes limit what the tools can do; a read-only token is enough for the read-only toolkit below.

CROSSLY_BASE_URL (default https://crossly.net/api) points the tools at another server, for example the Crossly mock API in tests.

Toolkit

from langchain_crossly import CrosslyToolkit

toolkit = CrosslyToolkit()
tools = toolkit.get_tools()

for tool in tools:
    print(tool.name)
Tool What it does
crossly_search Search inventory, listings, orders, sales, customers and offers at once (SKU, order number, URL, title…)
crossly_list_listings List listings across marketplaces, filtered by status, marketplace or SKU
crossly_get_listing One listing with every marketplace copy, its status, URL and any publish error
crossly_create_draft_listing Save an item to inventory as an unlisted draft
crossly_update_listing_price Change a price on every marketplace, or only the ones named
crossly_crosspost_listing Publish a listing or a draft item to one or more marketplaces
crossly_delist_listing Destructive. End a listing everywhere, or on the marketplaces named
crossly_list_inventory List inventory items with quantities and where each is listed
crossly_adjust_inventory_quantity Change available stock by a delta or to a count, with a reason
crossly_list_orders List orders with prices, fees, buyer and shipping status
crossly_get_order One order with line items, address and tracking
crossly_mark_order_shipped Mark an order shipped and upload tracking to the marketplace
crossly_list_offers Offers on Crossly Shop listings, or marketplace conversations waiting on a reply
crossly_respond_to_offer Destructive. Accept, decline or counter an offer
crossly_get_sales_summary Sales, units, revenue, fees, net sales and net profit for the last N days

Every tool returns the API's JSON response as a string. Errors (a missing token, an unknown id, a marketplace that isn't connected) come back as the tool's output, so the agent can fix its arguments or tell the user.

Choosing tools

# Only tools that read data: nothing is listed, repriced, shipped or answered.
CrosslyToolkit(read_only=True).get_tools()

# Everything except the destructive tools (delist, respond to offer).
CrosslyToolkit(include_destructive=False).get_tools()

# A hand-picked set.
CrosslyToolkit(selected_tools=["crossly_list_orders", "crossly_mark_order_shipped"]).get_tools()

Each tool also has a destructive attribute, so you can put the destructive ones behind a human approval step (for example LangChain's human-in-the-loop middleware).

Using one tool

from langchain_crossly import CrosslyListListingsTool

tool = CrosslyListListingsTool()
print(tool.invoke({"status": "active", "platform": "ebay", "sort_by": "days_listed", "sort_order": "desc", "limit": 5}))

Tools are also async: await tool.ainvoke({...}).

Use within an agent

from langchain.agents import create_agent
from langchain_crossly import CrosslyToolkit

tools = CrosslyToolkit(include_destructive=False).get_tools()

agent = create_agent(
    "anthropic:claude-sonnet-4-5",
    tools,
    system_prompt="You help a reseller run their Crossly store. Prices are in dollars.",
)

result = agent.invoke(
    {"messages": [("user", "Which of my eBay listings have been up longest? Drop the oldest one by 10%.")]}
)
print(result["messages"][-1].content)

Any chat model with tool calling works; install its LangChain package (here langchain-anthropic) and langchain.

Prefer MCP?

Crossly also runs a hosted MCP server with the full API at https://crossly.net/mcp (crossly-mcp). Use it with langchain-mcp-adapters when you want every endpoint rather than this focused tool set.

Development

uv sync --group test
uv run pytest tests/unit_tests                     # mocked HTTP + langchain-tests standard unit tests
CROSSLY_API_KEY=crossly_pat_... uv run pytest tests/integration_tests   # read-only tools against the live API

The integration tests only call read-only tools and are skipped when CROSSLY_API_KEY is not set.

Releases

Pushing a v* tag builds, tests and publishes to PyPI with signed build provenance. Check a downloaded file with:

gh attestation verify langchain_crossly-0.1.0-py3-none-any.whl --repo crossly-dev/langchain-crossly

MIT licensed.

Metadata

Release files for langchain-crossly 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-crossly 0.1.0
File Size Uploaded Provenance Actions
langchain_crossly-0.1.0.tar.gz 19.5 kB Without provenance Details for langchain_crossly-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-crossly 0.1.0
File Interpreter ABI Platform Actions
langchain_crossly-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_crossly-0.1.0-py3-none-any.whl

Total release size: 37.7 kB

Release files / langchain_crossly-0.1.0.tar.gz

Download URL langchain_crossly-0.1.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
437550d35c6ce51a2bb420da149cffafee0017b178235c7c4a1a5389f834819a
BLAKE2b-256 checksum
How to use checksums
8515f87c4b7f0246c6c3e73a4e5fdf94d997a473fe3c8653caf9c6b8a412804d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / langchain_crossly-0.1.0-py3-none-any.whl

Download URL langchain_crossly-0.1.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89d4f07c79a35885194b5d2e6cf60c4bc5a8e85a0c56970e7d732a555d903ef1
BLAKE2b-256 checksum
How to use checksums
dc7a1313ede82a30d005790ab164b02641eeadf7182e16be2887f8a75e7cc4bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for langchain-crossly 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page