Metadata-Version: 2.5
Name: stackresolve
Version: 0.1.0
Summary: Official Python SDK for the StackResolve API (AgentReady + CompanyData).
Project-URL: Homepage, https://stackresolve.dev
Author: StackResolve
License: MIT
Keywords: agent,agentready,companydata,mcp,sdk,stackresolve
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24
Description-Content-Type: text/markdown

# stackresolve

Official Python SDK for the [StackResolve](https://stackresolve.dev) API.

StackResolve helps agents discover, evaluate, select, install, and use software
(AgentReady), and compresses web research into structured company data calls
(CompanyData). This SDK is a thin wrapper over the live REST API.

## Install

```bash
pip install stackresolve
```

Requires Python 3.9+. Depends on `httpx`.

## Quickstart

```python
from stackresolve import StackResolve

sr = StackResolve(api_key="ar_...")  # or set STACKRESOLVE_API_KEY

# 1. Audit a domain: AgentReady scores, facts, and issues.
report = sr.audit("stripe.com")
print(report["scores"]["agentready"], report["issues"])

# 2. Structured company data.
company = sr.get_company("vercel.com")
print(company["name"], company.get("description"))

# 3. Task -> ranked, agent-ready tools.
tools = sr.find_tools("send transactional email from a Python service")
print(tools["results"])

# 4. Run an Agent Discovery check (needs an API key).
discovery = sr.run_discovery("firecrawl")
print(discovery)
```

## Authentication

Get an API key at [stackresolve.dev](https://stackresolve.dev). Pass it to the
constructor, or set the `STACKRESOLVE_API_KEY` environment variable:

```python
sr = StackResolve(api_key="ar_...")
# or, reading STACKRESOLVE_API_KEY from the environment:
sr = StackResolve()
```

The key is sent as the `x-api-key` header on every request. Public endpoints
(audit, search, profiles, company data, ...) work without a key, subject to an
anonymous rate limit. Gated endpoints (monitors, usage, discovery runs) need one.

Point the client at a different host with `base_url` or the
`STACKRESOLVE_BASE_URL` environment variable:

```python
sr = StackResolve(api_key="ar_...", base_url="https://api.stackresolve.dev")
```

## Errors

Any non-2xx response raises a `StackResolveError` carrying the HTTP `status` and
the parsed `body`:

```python
from stackresolve import StackResolve, StackResolveError

sr = StackResolve()
try:
    sr.get_usage()
except StackResolveError as err:
    print(err.status, err.body)
```

## Methods

AgentReady:
`audit(domain)`, `find_tools(task)`, `search(query, requirements=None)`,
`compare(slugs)`, `get_profile(slug)`, `list_registry(...)`, `get_categories()`,
`get_category(slug)`, `get_discovery(slug)`, `run_discovery(slug)`,
`get_score_history(slug)`, `generate(domain, openapi_url=None)`,
`deploy(domain, openapi_url=None)`.

CompanyData:
`get_company(domain)`, `get_pricing(domain)`, `get_competitors(domain)`,
`research(domain, question=None)`, `compare_companies(domains)`.

Monitors + account (API key required):
`list_monitors()`, `add_monitor(slug, ...)`, `run_monitor_now(slug)`,
`get_usage()`, `get_my_profile()`.

## License

MIT
