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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shopagent_core-0.1.0.tar.gz | 16.0 kB | Without provenance | Details for shopagent_core-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shopagent_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for shopagent_core-0.1.0-py3-none-any.whl |
Total release size: 35.9 kB
Release files / shopagent_core-0.1.0.tar.gz
| Download URL | shopagent_core-0.1.0.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a5e57f6eaeb56eaf280008e95ea948bf3c17ebbb0ced03cb463a8073a863d14
|
|
BLAKE2b-256 checksum How to use checksums |
eed1a9f95259b343e1958187a668d4d06ad5e4fe3ec891d17558d8e8e9b16ad9
|
| 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.0-py3-none-any.whl
| Download URL | shopagent_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edbef4f6f961f3328db6d5d8888c9b79cb4d45e9c2c3f867d4b97fcb94fb9847
|
|
BLAKE2b-256 checksum How to use checksums |
8faa213f3716594815bd6b29feb4569fb2812ca250d9b076ec1cf77b063df1dd
|
| 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.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.