Installation Guide¶
This guide covers how to install the different parts of the AgentVault ecosystem, depending on your needs.
1. Installing for Usage (CLI & Client Library)¶
If you want to use the AgentVault CLI to interact with agents or use the agentvault
client library in your own Python projects, install the desired components directly from PyPI (Python Package Index).
Prerequisites:
- Python 3.10 or 3.11 installed.
pip
(Python's package installer, usually included with Python).- (Optional but Recommended) OS Keyring Backend: For secure credential storage with the CLI/Library (
keyring
library extras might be needed depending on your OS - see Keyring documentation).
Installation Options:
-
CLI Tool (
agentvault-cli
):- Includes the core
agentvault
library as a dependency.
- Includes the core
-
Client Library Only (
agentvault
):- Use this if you only need to interact with agents programmatically from your own Python code and don't need the CLI application.
-
Server SDK Only (
agentvault-server-sdk
):- Use this if you are building your own A2A-compliant agent server.
- Installs the
agentvault
client library as a dependency.
Verification (CLI):
After installing the CLI, check that the command is available:
Using the Public Registry:
The CLI and library can interact with the publicly hosted AgentVault Registry.
- Registry URL:
https://agentvault-registry-api.onrender.com
- Configure:
- Environment Variable (Recommended):
- Linux/macOS:
export AGENTVAULT_REGISTRY_URL=https://agentvault-registry-api.onrender.com
- Windows PowerShell:
$env:AGENTVAULT_REGISTRY_URL='https://agentvault-registry-api.onrender.com'
- Windows Cmd:
set AGENTVAULT_REGISTRY_URL=https://agentvault-registry-api.onrender.com
- Linux/macOS:
- CLI Flag: Use
--registry https://agentvault-registry-api.onrender.com
with commands likediscover
orrun
(if using an agent ID).
- Environment Variable (Recommended):
- Note (Cold Start): The public registry runs on Render's free tier. It may take up to 60 seconds to respond to the first request after inactivity. Visit
/health
or/ui
to wake it up. - Developer Account: Register at
https://agentvault-registry-api.onrender.com/ui/register
.
2. Setting up for Development (Contributing or Running from Source)¶
If you want to contribute to AgentVault, run components locally from the source code (like the registry API), or use features not yet released on PyPI, follow these steps to set up the monorepo development environment.
Prerequisites:
- Git
- Python 3.10 or 3.11
- Poetry (version 1.2+ recommended)
- (Optional) PostgreSQL Server: Required only if running the
agentvault_registry
locally. - (Optional) SMTP Server/Service: Required only for local registry email features (verification, password reset).
Steps:
-
Clone the Repository:
-
Install Dependencies (using Poetry): Navigate to the project root (
AgentVault/
) and install dependencies for the entire workspace:# Installs ALL production AND development dependencies for ALL packages poetry install --with dev # To include optional OS Keyring support across components: # poetry install --with dev --extras os_keyring
- This reads all
pyproject.toml
files. - It creates a single shared virtual environment (usually
.venv/
in the root). - It installs all packages (library, cli, sdk, registry, testing-utils) in editable mode, along with their dependencies and development tools (like
pytest
,httpx
,uvicorn
,alembic
,mkdocs
).
- This reads all
-
Activate Virtual Environment: Before running any code, tests, or tools from source, activate the Poetry-managed environment:
- Recommended: Use
poetry shell
from the project root. This spawns a new shell with the environment activated. - Manual Activation (Example):
- Linux/macOS:
source .venv/bin/activate
- Windows PowerShell:
.\.venv\Scripts\Activate.ps1
- Windows Cmd:
.\.venv\Scripts\activate.bat
Your prompt should now indicate you are inside the(.venv)
environment.
- Linux/macOS:
- Recommended: Use
-
Verify Setup: Check access to installed tools:
You can now run components directly from source (e.g., uvicorn agentvault_registry.main:app
from the agentvault_registry
directory) or run tests (pytest agentvault_library/tests/
).
3. Running the Registry Locally (Development)¶
To run the agentvault_registry
API service locally:
- Complete Development Setup: Follow the steps in section 2 above. Ensure PostgreSQL is running.
- Navigate:
cd agentvault_registry
- Configure
.env
:- Copy
.env.example
to.env
. - Edit
.env
and setDATABASE_URL
to your PostgreSQL connection string (usingasyncpg
driver, e.g.,postgresql+asyncpg://user:pass@host:port/dbname
). - Set
API_KEY_SECRET
(e.g.,openssl rand -hex 32
). - (Optional) Configure
MAIL_...
variables for email features.
- Copy
- Database Migrations: Activate the virtual environment (
poetry shell
orsource .venv/bin/activate
) and run from theagentvault_registry/
directory: - Run Server: From the
agentvault_registry/
directory (with venv active):
The local registry API will be available at http://localhost:8000
. Docs at /docs
, UI at /ui
.