Metadata-Version: 2.5
Name: arvex.ai
Version: 0.1.2
Summary: A Python foundation for project-local AI agents
Requires-Python: >=3.11
Requires-Dist: filelock<5,>=3.16
Requires-Dist: pyjwt[crypto]<3,>=2.10.1
Description-Content-Type: text/markdown

# arvex.ai

Arvex is a Python foundation for agents that live in your project.
It requires Python 3.11 or later. [Feature history](VERSIONS.md)

## Install with uv

From the checkout, install the package and run the demos.

```sh
uv sync
uv run python demo/1_chat.py
uv run python demo/2_setup.py
uv run python demo/3_create_agent.py
```

`uv build` creates a source distribution and wheel in `dist/`. The version
comes from the latest version tag reachable from the checked-out commit. Tags
such as `0.1.1` and `v0.1.1` both produce version `0.1.1`. Later commits and
local edits use that same version until a new tag is reachable. A checkout
needs a version tag to build. The source distribution carries its resolved
version so it can be built without Git.

Install the resulting wheel into a virtual environment with
`uv pip install PATH_TO_WHEEL`, using the path printed by `uv build`.

## Chat from Python

```python
from arvex.ai import create_agent, load_agent, setup

setup()
agent = create_agent("aras", instructions="Be concise.")
print(agent.chat("Hello, Aras.", demo=True))

# In a later process in the same directory
agent = load_agent("aras")
print(agent.history())
```

Pass a directory to `setup()` to use a custom location for shared settings.
Pass `api_key=` to record an OpenAI credential from Python.

## Chat from the terminal

```sh
uv run arvex setup
uv run arvex create-agent aras --instructions "Be concise."
uv run arvex chat aras --demo
```

Use `/exit` to leave interactive chat or `-m "Hello"` to send one message.

## Connect your ChatGPT account

```sh
uv run arvex setup --chatgpt
uv run arvex chat aras -m "Hello"
```

Complete the browser sign-in and approve use of your ChatGPT plan. Eligible
requests use that plan. Arvex picks an available model for the connected
account. Use `arvex setup --chatgpt --model MODEL` to choose another available
model or `arvex setup --chatgpt work` to connect under a separate account label.
Existing agents use the selected account and its model the next time you chat.
[OpenAI sign-in and plan usage](https://developers.openai.com/siwc/token-sharing-open-source)

In Python, use `setup(chatgpt=True)`. The
[live sign-in demo](demo/4_chatgpt.py) opens the browser and sends one request
using the connected plan.

To use API-key billing, set `OPENAI_API_KEY` and run
`uv run arvex setup --use-api-key`, or record a key with
`uv run arvex setup --prompt-key`. Agents use their own configured model in
API-key mode. The default for newly created agents is `gpt-4.1-mini`.
