Official NeevCloud SDK for the Neev platform — Python. First up: agent sandboxes.
Project description
NeevAI Python SDK
Official Python client for the NeevCloud AI platform. Use it to provision sandboxes, run commands, manage files, and integrate with agent workflows.
Prerequisites
- Python ≥ 3.10
- Supported OS: Windows, macOS, Linux
- uv (recommended for running examples from this repo; optional if you use pip and a virtual environment)
See docs/getting-started.md for per-OS uv install commands and a full walkthrough.
Installation
pip install neevai
Install from source (contributors)
Clone the repository and install in editable mode with uv:
git clone https://github.com/NeevCloudAI/neev-sdk-python.git
cd neev-sdk-python
uv sync
uv sync creates a local environment and installs the package in editable mode. Run examples from the repo root with uv run python ....
Configure credentials
Set these environment variables before running scripts, or pass equivalent kwargs to NeevAI(...) / AsyncNeevAI(...).
| Variable | Purpose |
|---|---|
NEEVCLOUD_API_KEY |
Bearer token (required) |
NEEVCLOUD_ORG_ID |
Default organization ID |
NEEVCLOUD_PROJECT_ID |
Default project ID |
NEEVCLOUD_REGION |
Default deployment region for sandbox create |
NEEVCLOUD_BASE_URL |
Control-plane base URL (default: https://agent.ai.neevcloud.com) |
NEEVCLOUD_SANDBOX_TEMPLATE_ID |
Optional template id (defaults to sb-ubuntu-26-04-minimal in examples) |
Linux / macOS (bash/zsh) — current session:
export NEEVCLOUD_API_KEY="your-api-key"
export NEEVCLOUD_ORG_ID="org-abc123"
export NEEVCLOUD_PROJECT_ID="proj-xyz789"
export NEEVCLOUD_REGION="as-south-1"
Windows PowerShell — current session:
$env:NEEVCLOUD_API_KEY = "your-api-key"
$env:NEEVCLOUD_ORG_ID = "org-abc123"
$env:NEEVCLOUD_PROJECT_ID = "proj-xyz789"
$env:NEEVCLOUD_REGION = "as-south-1"
Windows CMD — current session:
set NEEVCLOUD_API_KEY=your-api-key
set NEEVCLOUD_ORG_ID=org-abc123
set NEEVCLOUD_PROJECT_ID=proj-xyz789
set NEEVCLOUD_REGION=as-south-1
You can also pass credentials directly when creating the client:
from neevai import NeevAI
with NeevAI(api_key="...", org_id="...", project_id="...", region="...") as client:
...
Quick start (from clone)
If you just cloned the repo, follow these steps to reach your first successful run:
-
Clone and enter the repo (see Install from source (contributors) above if you have not already).
-
Install dependencies:
uv sync. -
Set the four required environment variables (
NEEVCLOUD_API_KEY,NEEVCLOUD_ORG_ID,NEEVCLOUD_PROJECT_ID,NEEVCLOUD_REGION) using the platform-specific blocks above. -
Verify the install:
uv run python -c "from neevai import NeevAI; print('ok')"
-
Run your first example:
uv run python examples/templates_list.py
-
Expected outcome: the script lists available sandbox templates, fetches one by id, creates a sandbox from it, waits until it is ready, then deletes it.
-
Next: read
docs/getting-started.mdfor full sync/async quick-start scripts and the documentation map.
Minimal code example
from neevai import NeevAI
with NeevAI(api_key="...", org_id="...", project_id="...", region="...") as client:
sandbox = client.sandboxes.create({
"name": "my-sandbox",
"sandbox_template_id": "<your-sandbox-template-id>",
"image": "ubuntu:22.04",
})
sandbox.wait_until_ready()
result = sandbox.exec("echo Hello World")
print(result.stdout)
client.sandboxes.delete(sandbox.id)
Examples
Runnable examples live under examples/. From the repo root, run any example with:
uv run python examples/<script>.py
See examples/README.md for the full catalogue and learning path.
| Example | What it shows |
|---|---|
templates_list.py |
List templates → get by id → create sandbox |
sandbox_lifecycle.py |
Create → wait → metrics → pause → delete |
snapshot_fork_restore.py |
Snapshot → from_snapshot rollback → fork |
async_sandbox.py |
End-to-end AsyncNeevAI workflow |
files_api.py |
files.write / read_text / list |
streaming_exec.py |
Live sandbox.exec_stream() output |
parallel_fanout.py |
3 sandboxes, parallel repo analysis, aggregated file counts |
sandbox_metrics.py |
Metrics under CPU load |
raw_request.py |
Untyped client.raw.request() |
agent_patterns/minimal_agent.py |
Hand-rolled agent with streaming tool output |
agent_patterns/langchain_agent.py |
LangGraph ReAct agent (uv sync --extra agents) |
workflow_examples/repo_analyzer.py |
Clone & audit untrusted repos in a sandbox |
sandbox_lifecycle_controller.py |
CLI for individual sandbox CRUD ops |
Documentation
Start with docs/getting-started.md for installation, credentials, and your first sync/async script.
| Doc | Purpose |
|---|---|
getting-started.md |
Install, env vars, quick starts, doc map |
api-reference.md |
Control-plane vs data-plane API lists + copy-paste snippets |
api-inventory.md |
Full method signatures, types, errors, symbol index |
example-coverage.md |
Example catalog and API → examples lookup |
architecture.md |
SDK layout and module responsibilities |
Contributors: update docs when the public API changes. See docs/development.md for the contributor workflow, typing notes, and test commands.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neevai-0.5.0b0.tar.gz.
File metadata
- Download URL: neevai-0.5.0b0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8db4edc002fe1942b621e5441b672951f8aea06750c20c921eb86f18ce22f85
|
|
| MD5 |
b642b1c9085a238b988f261f975f2115
|
|
| BLAKE2b-256 |
6e182f2c5a4fd243a8fe64debfd0db0ce52cea6129feceedb6b04a0706e30a2e
|
Provenance
The following attestation bundles were made for neevai-0.5.0b0.tar.gz:
Publisher:
release.yml on NeevCloudAI/neev-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neevai-0.5.0b0.tar.gz -
Subject digest:
a8db4edc002fe1942b621e5441b672951f8aea06750c20c921eb86f18ce22f85 - Sigstore transparency entry: 1808181336
- Sigstore integration time:
-
Permalink:
NeevCloudAI/neev-sdk-python@bea4cda68912cb4e8b207c6d1c2a4274bc41a644 -
Branch / Tag:
refs/tags/v0.5.0b0 - Owner: https://github.com/NeevCloudAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bea4cda68912cb4e8b207c6d1c2a4274bc41a644 -
Trigger Event:
push
-
Statement type:
File details
Details for the file neevai-0.5.0b0-py3-none-any.whl.
File metadata
- Download URL: neevai-0.5.0b0-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7c065b664e6dbf22dc09d16a2d38142bd721befd3f73ab657888e16f8ec9f51
|
|
| MD5 |
31cb7af83fd5fb5a47dd74ad331de159
|
|
| BLAKE2b-256 |
16e340f8053d8b052489a596087ffab39d7345e5cb937a88c903f962263033f3
|
Provenance
The following attestation bundles were made for neevai-0.5.0b0-py3-none-any.whl:
Publisher:
release.yml on NeevCloudAI/neev-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neevai-0.5.0b0-py3-none-any.whl -
Subject digest:
a7c065b664e6dbf22dc09d16a2d38142bd721befd3f73ab657888e16f8ec9f51 - Sigstore transparency entry: 1808181401
- Sigstore integration time:
-
Permalink:
NeevCloudAI/neev-sdk-python@bea4cda68912cb4e8b207c6d1c2a4274bc41a644 -
Branch / Tag:
refs/tags/v0.5.0b0 - Owner: https://github.com/NeevCloudAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bea4cda68912cb4e8b207c6d1c2a4274bc41a644 -
Trigger Event:
push
-
Statement type: