Metadata-Version: 2.4
Name: guepard-relml
Version: 0.1.2
Summary: RelML — relational deep learning with a natural-language agent over your database.
Keywords: relational,machine-learning,graph-neural-network,graphsage,database,agent,duckdb
Author: Guepard Corp
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C++
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Project-URL: Homepage, https://github.com/Guepard-Corp/relml
Project-URL: Repository, https://github.com/Guepard-Corp/relml
Project-URL: Issues, https://github.com/Guepard-Corp/relml/issues
Requires-Python: >=3.9
Requires-Dist: duckdb>=0.9
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: pytz
Requires-Dist: anthropic>=0.40
Requires-Dist: prompt_toolkit
Requires-Dist: scikit-learn
Provides-Extra: api
Requires-Dist: fastapi; extra == "api"
Requires-Dist: uvicorn; extra == "api"
Provides-Extra: plots
Requires-Dist: matplotlib; extra == "plots"
Description-Content-Type: text/markdown

# guepard-relml

A natural-language agent over your relational database. Ask a question in plain
English — it explores your schema, frames a predictive task, trains a model, and
answers you.

## Install

Requires Python 3.9+. Install into a virtual environment:

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install guepard-relml
```

> On Debian/Ubuntu, `error: externally-managed-environment` just means the venv
> step was skipped — the two commands above are the fix.

## Configure the model backend — AWS Bedrock

The agent runs **Claude on AWS Bedrock**. Set two environment variables (or put
them in a `.env` file in your working directory):

```bash
export RELML_AGENT_BACKEND=bedrock
export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key
# optional:
export AWS_REGION=us-east-1                       # default
export RELML_AGENT_MODEL=us.anthropic.claude-sonnet-4-5-20250929-v1:0
```

Create the key in the **AWS Bedrock console** (Bedrock → *API keys*), and make
sure Claude models are enabled for your account and region.

*Other backends:* the agent can also use the Anthropic API directly
(`RELML_AGENT_BACKEND=anthropic`, `ANTHROPIC_API_KEY=…`) or Ollama
(`RELML_AGENT_BACKEND=ollama`, `OLLAMA_API_KEY=…`).

## Use it — Python

`source` can be a **folder of CSVs**, a **CSV/Parquet file**, or a **Postgres DSN**.

```python
from guepard.tools.agent import Agent

agent = Agent("./data")
answer = agent.ask("Which customers are most likely to churn next month?")
print(answer)
```

Quiet mode (no live progress output) — handy in scripts:

```python
agent = Agent("./data", verbose=False)
print(agent.ask("Forecast next week's daily order volume."))
```

Choose the backend explicitly in code:

```python
from guepard.tools.agent import Agent, LLMClient

agent = Agent("./data", client=LLMClient(backend="bedrock"))
print(agent.ask("Rank drivers by DNF risk for the next race."))
```

## Use it — command line

```bash
relml-agent --source ./data                                        # interactive REPL
relml-agent "who is likely to churn next month?" --source ./data   # one-shot
```

Inside the REPL, `/help` lists commands (`/tables`, `/schema`, `/sql`,
`/models`, `/predict`, `/plot`, …).

## License

MIT
