Skip to main content

shopagent-core

Core LangGraph agent, RAG pipeline, and store-data tools for ShopAgent-OS — a self-hosted e-commerce AI agent. Import this into your own Python backend if you already have one and just want the agent logic, rather than running ShopAgent-OS's own prebuilt FastAPI server.

If you don't have an existing backend, it's usually simpler to deploy the full backend/ app from the repo as-is (see the main repo README) instead of wiring this library in by hand.

Install

pip install shopagent-core

Optional extras:

pip install "shopagent-core[langfuse]"   # tracing/observability
pip install "shopagent-core[shopify]"    # Shopify Admin API store adapter

Configuration

Reads these environment variables (e.g. via a .env file with python-dotenv, which this package already depends on):

Variable Required Purpose
GROQ_API_KEY yes Your Groq account's API key, used for the LLM calls.
STORE_ADAPTER_TYPE no (default json) json for flat-file product/order/policy data, or shopify for a live Shopify store.
SHOPAGENT_PRODUCTS_PATH, SHOPAGENT_ORDERS_PATH, SHOPAGENT_POLICIES_PATH no Paths to your own JSON/Markdown store data files, when using the json adapter.
SHOPIFY_SHOP_DOMAIN, SHOPIFY_CLIENT_ID, SHOPIFY_CLIENT_SECRET only with shopify adapter Your Shopify Admin API credentials.
LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY no Enables Langfuse tracing when both are set; the agent runs normally without them.

Usage

from shopagent_core.agent.graph import run_agent

reply = run_agent(
    user_message="What shoes do you have in stock?",
    session_id="some-session-id",       # optional: keeps conversation history in memory
    customer_email="jane@example.com",  # optional: enables automatic order-ownership verification
)
print(reply)

run_agent is synchronous and returns a plain string reply. It's up to your own backend to wrap this in a route, handle authentication, and apply rate limiting — this package only provides the agent itself, not a server.

License

MIT

Metadata

Release files for shopagent-core 0.1.1

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

Source distribution (sdist)

Source distribution for shopagent-core 0.1.1
File Size Uploaded Provenance Actions
shopagent_core-0.1.1.tar.gz 16.6 kB Without provenance Details for shopagent_core-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shopagent-core 0.1.1
File Interpreter ABI Platform Actions
shopagent_core-0.1.1-py3-none-any.whl Python 3 none any Details for shopagent_core-0.1.1-py3-none-any.whl

Total release size: 37.0 kB

Release files / shopagent_core-0.1.1.tar.gz

Download URL shopagent_core-0.1.1.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6ec5e7be5274516a208b676bd7aeb5f83bb9b9db430e90fa50c7a4d55ce8c9b1
BLAKE2b-256 checksum
How to use checksums
47bcc05916f126f6df39d4a8a5e6e753f19781e80dc5f5a50ead3f8d04a99797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / shopagent_core-0.1.1-py3-none-any.whl

Download URL shopagent_core-0.1.1-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0b2ea4cec81a63abd36154068af5e201f73ee4609936ff3849e99e92ddd1317
BLAKE2b-256 checksum
How to use checksums
d80a16f75e97ca43a6cfa209d249fba7c62207e701632b4c6088f7442aa7d0c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for shopagent-core 0.1.1

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.1 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