ConduitAI CLOUD
Back to ConduitDEVELOPER DOCUMENTATION

Useful compute.
Clear contracts.

The first Conduit workflow runs public or synthetic text through a pinned MiniLM ONNX model on separate, consenting CPU workers.

1. Start your local network

python -m venv .venv
# Activate the environment, then:
pip install -e ".[dev]"
python scripts/fetch_model.py
alembic upgrade head
uvicorn services.api.nexus.main:app --host 127.0.0.1 --port 8000

# Separate terminal
python -m services.scheduler.main

# Web: Node 20.9+ required
cd apps/web
npm ci
npm run dev

Register an organization in the console, add simulated credit under Billing, and create an API key. The API serves its complete OpenAPI document at /openapi.json and interactive documentation at /docs on the API origin.

2. Connect a consenting worker

Create a contributor account first. The worker detects hardware, benchmarks the approved model, and enrolls with explicit consent. Each start requires a new opt-in flag.

python -m workers.agent.cli --detect
python -m workers.agent.cli \
  --email contributor@example.com \
  --name "My computer" --consent

The password is entered through a hidden prompt. Windows identities are encrypted with DPAPI; Linux identity files use owner-only permissions. Pause finishes the current task. Stop terminates current inference and exits when observed.

3. Submit a real embedding job

import os, uuid, httpx

api = "http://127.0.0.1:8000/api/v1"
headers = {
    "Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}",
    "Idempotency-Key": str(uuid.uuid4()),
}
response = httpx.post(f"{api}/jobs", headers=headers, json={
    "name": "First embedding batch",
    "texts": ["A cat on a mat.", "A kitten resting on a rug."],
    "data_classification": "synthetic",
})
response.raise_for_status()
job = response.json()

# Poll until state is completed, failed or canceled.
status = httpx.get(f"{api}/jobs/{job['id']}", headers=headers).json()
# After completion:
result = httpx.get(f"{api}/jobs/{job['id']}/results", headers=headers)
result.raise_for_status()
print(result.json()["embeddings"])

Each text is limited to 2,000 characters and truncated to 256 model tokens. Jobs accept up to 128 texts. Results preserve input order and contain 384 normalized dimensions per text. API keys can submit and inspect work but cannot manage identity or billing.

Trust has two sides.

Computer owners need protection from workloads. Businesses need protection from dishonest workers. The MVP restricts execution to one approved model and executor, validates results against full reference recomputation, and only accepts public or synthetic data.

A home computer owner can inspect task data. This platform does not provide confidential computing, cryptographic proof of work, or an OS-level sandbox. Memory and thermal thresholds are monitored; they are not hard kernel-enforced caps. GPU inference, private models, arbitrary code, speech, image generation, fine-tuning, signed automatic updates and real payments are not implemented.

All financial values are integer micro-USD (1 USD = 1,000,000 units). Reservations hold the estimate at submission. Verified tasks debit the customer once and credit simulated rewards. Canceling releases the unearned reservation. Already verified work remains charged.

Reproduce recovery.

python scripts/demo.py

The demonstration starts a dedicated local API and three independent worker processes, uses real ONNX inference, terminates one worker while holding a task, and checks lease expiry, reassignment and balanced accounting. Hardware overrides are explicitly marked simulated and cannot exceed detected resources.