CLI for the Ainfera AI agent infrastructure platform
Project description
ainfera
The CLI for Ainfera — trust scoring and agent discovery for the AI agent economy.
Connect your GitHub repo. Get a trust score. Get discovered.
Trust evaluation is powered by NVIDIA NeMo Guardrails (safety) and NVIDIA NIM inference (reliability, quality, performance, reputation).
Install
pip install ainfera
Quick Start
# Authenticate
ainfera auth login --key ainf_your_api_key
# Check the platform + your auth in one panel
ainfera status
# Initialize in your agent repo (interactive, or pass --non-interactive for CI)
cd my-agent
ainfera init --name my-agent --framework langchain --tier standard
# Deploy
ainfera deploy
# List your agents
ainfera agents list
# Check trust score for an agent
ainfera trust <agent-id>
# Stream live logs
ainfera logs <agent-id> --follow
# Emergency stop
ainfera kill <agent-id>
Want to see what deploy looks like before you connect the real API? Run
ainfera deploy --demo — the stage-ready showcase with mock data, zero
network calls.
Commands
| Command | Description |
|---|---|
ainfera login |
Authenticate with your API key (alias for auth login) |
ainfera auth login |
Authenticate with your API key |
ainfera auth status |
Show current auth + API health |
ainfera status |
Full platform overview (API/DB/Redis/auth/CLI) |
ainfera health |
Unauthenticated API health check |
ainfera init |
Scaffold an ainfera.yaml |
ainfera deploy |
Deploy from ainfera.yaml (add --demo for the showcase) |
ainfera agents list/get/create/delete |
Manage agents |
ainfera trust [--history|--anomalies] |
Trust score views |
ainfera trust-check --agent-id ID --threshold N |
CI/CD gate — exits non-zero below threshold |
ainfera billing |
Usage and cost breakdown |
ainfera kill |
Trigger or clear kill switch |
ainfera logs |
View or stream execution logs |
Pass --help to any subcommand for examples (e.g. ainfera agents create --help).
Configuration
The CLI stores config in ~/.ainfera/config.yaml:
api_key: ainf_your_key
api_url: https://api.ainfera.ai
default_agent: a1b2c3d4-...
Or use environment variables:
AINFERA_API_KEY— API key (overrides config file)AINFERA_API_URL— API endpoint (default: https://api.ainfera.ai)
JSON Output
Pass --json (a global flag) for machine-readable output, useful for
scripting and CI/CD pipelines:
ainfera --json status | jq '.api_version'
ainfera --json agents list | jq '.items[].name'
ainfera --json trust <agent-id> | jq '.score'
Overriding the API URL
Use the global --api-url flag to point the CLI at a different
environment (e.g. staging or a local dev server) without editing
~/.ainfera/config.yaml:
ainfera --api-url https://api.staging.ainfera.ai agents list
ainfera.yaml
Configuration for your agent lives in ainfera.yaml at the repo root.
Run ainfera init (interactive) or ainfera init --non-interactive --name my-agent --framework langchain --tier standard to scaffold one:
version: "1"
agent:
name: research-agent
framework: langchain
compute:
sandbox: docker # docker | firecracker
memory: 512mb
cpu: 1
timeout: 300s
trust:
anomaly_detection: true
quarantine_threshold: 400
billing:
model: per_call # per_call | per_token | per_minute
price_per_call: 0.003
kill_switch:
enabled: true
auto_quarantine: true
Trust check (CI/CD gate)
Run locally or from CI to block merges when an agent's trust score drops below a threshold:
ainfera trust-check --agent-id AGENT_ID --threshold 800
ainfera trust-check --agent-id AGENT_ID --threshold 800 --format json
With --format json the output includes a comment_markdown field suitable for
posting as a PR comment from a GitHub Action.
GitHub Actions
This repo ships three composite actions under actions/ that wrap the CLI
for CI workflows:
# Deploy on push to main
- uses: ainfera-ai/cli/actions/deploy-agent@v0.4.0
with:
api-key: ${{ secrets.AINFERA_API_KEY }}
# Comment a before/after trust diff on PRs; fail below threshold
- uses: ainfera-ai/cli/actions/trust-check@v0.4.0
with:
api-key: ${{ secrets.AINFERA_API_KEY }}
agent-id: ${{ vars.AINFERA_AGENT_ID }}
threshold: "800"
# Validate ainfera.yaml in PRs and run your test suite
- uses: ainfera-ai/cli/actions/sandbox-test@v0.4.0
with:
api-key: ${{ secrets.AINFERA_API_KEY }}
test-command: pytest -xvs
See actions/README.md for full docs.
Each action has its own README in actions/<name>/README.md.
Python SDK
The ainfera package also exposes a typed, synchronous SDK for
programmatic use — handy in agent servers, notebooks, or custom
automation:
from ainfera.sdk import AinferaSDK
with AinferaSDK(api_key="ainf_...") as sdk:
agent = sdk.create_agent(name="my-agent", framework="langchain")
trust = sdk.get_trust_score(agent["id"])
print(trust["score"], trust["grade"])
Links
License
Apache 2.0 — see LICENSE
Project details
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 ainfera-0.5.0.tar.gz.
File metadata
- Download URL: ainfera-0.5.0.tar.gz
- Upload date:
- Size: 48.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88eb423e76bfb3a250d0977bf326a9e3533f2f98531a39ba5d5d94fb8c2dd375
|
|
| MD5 |
3b71419b408c13fd01af79affda31328
|
|
| BLAKE2b-256 |
72cf5079d42cae61bef17227e347fef818d44decd46158a7f4b274959fb6eebc
|
File details
Details for the file ainfera-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ainfera-0.5.0-py3-none-any.whl
- Upload date:
- Size: 44.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aa2c2b68c41e1015cc9abe275729ac66351cbac170f554932bf1e337c763b86
|
|
| MD5 |
a1db4805f2a855ee0d8d8e60f213810f
|
|
| BLAKE2b-256 |
6063edfc03ad7328f924ba70c779c013948449ac4f8776d317ff06b12f866454
|