Metadata-Version: 2.4
Name: vexp-sdk
Version: 0.1.2
Home-page: https://vexp.dev/sdk
Description-Content-Type: text/markdown
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page

<p align="center">
  <img src="https://vexp.dev/logo_horizontal.png" alt="vexp" width="380">
</p>

# vexp-sdk (Python)

Thin client for the **vexp SDK** — a self-hosted, machine-to-machine
code-intelligence engine. It gives your agents, PR bots, and pipelines
type-accurate context and cross-repo blast-radius over hundreds of repositories,
on your own infrastructure. Your code never leaves your network.

This package is only the client. It talks to a **vexp gateway** you run yourself
(see [the docs](https://vexp.dev/docs/sdk)); it needs the gateway's URL and a
bearer token. It is **dependency-free** (standard library only), so it installs
and runs anywhere, including air-gapped CI.

## Install

```bash
pip install vexp-sdk
```

## Quickstart

```python
from vexp_sdk import VexpClient

vx = VexpClient("https://vexp.your-company.internal", token="...")

# Context + impact for a task
res = vx.run_pipeline("why does checkout fail", repos=["payments-gateway"])
for p in res["pivots"]:
    print(p["repo"], p["file_path"], p["score"])

# Cross-repo blast-radius of a symbol
impact = vx.impact_graph("payments.Checkout.create_session")

# Drive a re-index after a deploy
vx.index_incremental(repo="payments-gateway", mode="incremental")
```

## API

```python
VexpClient(base_url: str, token: str | None = None, timeout: float = 60.0)

health() -> dict                                       # gateway liveness + shard count
run_pipeline(task: str, **kwargs) -> dict              # context + impact + memory
context_capsule(query: str, **kwargs) -> dict          # retrieval only
impact_graph(symbol_fqn: str, **kwargs) -> dict        # cross-repo blast-radius
index_incremental(repo=None, files=None, mode="incremental") -> dict
index_status() -> dict
call(tool: str, **params)                              # generic tool call
```

`run_pipeline` returns a dict with `pivots` (ranked code locations) and an optional
compressed `output`. Non-2xx responses raise `VexpError`.

## Requirements

- A running vexp gateway (self-hosted) reachable at `base_url`.
- A bearer token for the gateway, and a capacity `license.jwt` mounted in the
  gateway (issued with your plan).

Full deployment and API reference: **https://vexp.dev/docs/sdk**

## License

Proprietary. The client is free to install and use against a licensed gateway;
the engine itself is license-gated. See https://vexp.dev/sdk.
