Abi cli allowing you to build your AI system.
Project description
naas-abi-cli
Command Line Interface (CLI) tool for building and managing ABI (Agentic Brain Infrastructure) projects.
Overview
naas-abi-cli provides a comprehensive set of commands to create, configure, deploy, and interact with ABI projects. It serves as the primary entry point for developers working with the ABI framework, enabling quick project setup, agent interaction, and cloud deployment.
Installation
Install the CLI tool using pip:
pip install naas-abi-cli
Available Commands
Project Management
abi new project <project-name> [project-path] [--with-local-deploy/--without-local-deploy]
Creates a new ABI project with all necessary starter files and dependencies.
What it does:
- Creates a new project directory (must be empty or non-existent)
- Generates project structure with configuration files, Docker setup, and Python package structure
- Generates local deployment scaffolding (
docker-compose.yml,.deploy/, and local.envvalues) by default - Automatically installs required dependencies (
naas-abi-core,naas-abi-marketplace,naas-abi, andnaas-abi-cli) - Customizes project files with your project name
Example:
abi new project my-abi-project
abi new project my-abi-project --without-local-deploy
abi init <path>
Initializes a new ABI project in the specified directory.
Example:
abi init .
Agent Interaction
abi chat [module-name] [agent-name]
Starts an interactive chat session with an AI agent.
Parameters:
module-name: The module containing the agent (default:naas_abi)agent-name: The specific agent class to use (default:AbiAgent)
What it does:
- Loads the ABI engine and specified module
- Launches an interactive terminal chat interface
- Saves conversations to
storage/datastore/interfaces/terminal_agent/
Example:
abi chat naas_abi AbiAgent
abi agent list
Lists all available agents across all loaded modules.
What it does:
- Loads the ABI engine with all configured modules
- Displays a formatted table showing module names and agent class names
Example:
abi agent list
Configuration Management
abi config validate [--configuration-file <path>]
Validates the ABI configuration file for correctness.
Options:
--configuration-file: Path to configuration file (default: usesconfig.yamlfrom current directory)
Example:
abi config validate
abi config validate --configuration-file config.prod.yaml
abi config render [--configuration-file <path>]
Renders the loaded configuration as YAML output, useful for debugging and verification.
Options:
--configuration-file: Path to configuration file (default: usesconfig.yamlfrom current directory)
Example:
abi config render
abi module list
Lists all available modules and their enabled/disabled status.
What it does:
- Loads the engine configuration
- Displays a formatted table showing module names and their enabled status
Example:
abi module list
Deployment
abi deploy naas [-e/--env <environment>]
Deploys your ABI project to Naas cloud infrastructure.
Options:
-e, --env: Environment to use (default:prod). Determines which configuration file to load (e.g.,config.prod.yaml,config.yaml)
What it does:
- Builds a Docker image of your ABI project
- Pushes the image to your Naas container registry
- Creates or updates a space on Naas infrastructure
- Exposes your ABI REST API at
https://{space-name}.default.space.naas.ai
Requirements:
- Naas API key configured in your configuration file
- Docker installed and running
- Deploy section in your
config.yamlfile
Example:
abi deploy naas
abi deploy naas --env prod
Secret Management
abi secrets naas list
Lists all secrets stored in your Naas workspace.
Options:
--naas-api-key: Naas API key (default:NAAS_API_KEYenvironment variable)--naas-api-url: Naas API URL (default:https://api.naas.ai)
Example:
abi secrets naas list
abi secrets naas push-env-as-base64
Pushes a local .env file to Naas as a base64-encoded secret.
Options:
--naas-api-key: Naas API key (default:NAAS_API_KEYenvironment variable)--naas-api-url: Naas API URL (default:https://api.naas.ai)--naas-secret-name: Name for the secret in Naas (default:abi_secrets)--env-file: Path to the environment file (default:.env.prod)
Example:
abi secrets naas push-env-as-base64 --env-file .env.prod
abi secrets naas get-base64-env
Retrieves a base64-encoded secret from Naas and displays it as environment variables.
Options:
--naas-api-key: Naas API key (default:NAAS_API_KEYenvironment variable)--naas-api-url: Naas API URL (default:https://api.naas.ai)--naas-secret-name: Name of the secret to retrieve (default:abi_secrets)
Example:
abi secrets naas get-base64-env
Script Execution
abi run script <path>
Runs a Python script in the context of a loaded ABI engine.
What it does:
- Loads the ABI engine with all configured modules
- Executes the specified Python script with access to the engine and all loaded modules
Example:
abi run script scripts/my_script.py
Architecture
The CLI is built using:
- Click: For command-line interface framework
- naas-abi-core: Core ABI engine and configuration management
- naas-abi-marketplace: Marketplace modules and agents
- naas-abi: Main ABI package
When run inside an ABI project, the CLI auto-detects the project root and re-runs itself in that project context via uv run --project ....
Project Structure
When you create a new project with abi new project, the CLI:
- Uses template files from
cli/new/templates/project/ - Customizes templates with your project name
- Sets up proper Python package structure
- Sets up local deployment files from
cli/deploy/templates/local/(unless disabled) - Installs all required dependencies via
uv
Integration with ABI Framework
The CLI integrates seamlessly with the ABI ecosystem:
- Engine Loading: Automatically loads modules and agents from your configuration
- Configuration Management: Validates and renders YAML configuration files
- Cloud Deployment: Handles Docker builds and Naas API interactions
- Secret Management: Integrates with Naas secret storage for secure credential management
Dependencies
- Python 3.10+
naas-abi>=1.0.6naas-abi-core[qdrant]>=1.1.2naas-abi-marketplace[ai-chatgpt]>=1.1.0uvpackage manager (for dependency management)
See Also
- ABI Main README - Complete ABI framework documentation
- naas-abi-core - Core engine documentation
- naas-abi-marketplace - Marketplace modules documentation
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 naas_abi_cli-1.28.0.tar.gz.
File metadata
- Download URL: naas_abi_cli-1.28.0.tar.gz
- Upload date:
- Size: 379.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9fbab67fb644f7e40699d4d2629d5794124773e7bb8ffe86f8ea2ead03b06ea
|
|
| MD5 |
940b31e27a2e057a94e7cb1b4e6dfad4
|
|
| BLAKE2b-256 |
fe15a2c17f91f61cc855f662bbb967caf54cf7c7c003ce5684a6f6de2e5627bf
|
Provenance
The following attestation bundles were made for naas_abi_cli-1.28.0.tar.gz:
Publisher:
release.yml on jupyter-naas/abi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
naas_abi_cli-1.28.0.tar.gz -
Subject digest:
b9fbab67fb644f7e40699d4d2629d5794124773e7bb8ffe86f8ea2ead03b06ea - Sigstore transparency entry: 1436983503
- Sigstore integration time:
-
Permalink:
jupyter-naas/abi@ac4e34598b1d03aa98b2ffdfa16b64a1dd8d8d6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jupyter-naas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ac4e34598b1d03aa98b2ffdfa16b64a1dd8d8d6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file naas_abi_cli-1.28.0-py3-none-any.whl.
File metadata
- Download URL: naas_abi_cli-1.28.0-py3-none-any.whl
- Upload date:
- Size: 84.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae3620c18c96f9943d6bf9f09daafb485b9bd5a6ffbc8d1862e0b164debbd45d
|
|
| MD5 |
4b5fb10588dac12fd5c917e954a724b8
|
|
| BLAKE2b-256 |
11656f23aa115830891101da0a21307375cc7877e1bbf60f60a90e000e3d248a
|
Provenance
The following attestation bundles were made for naas_abi_cli-1.28.0-py3-none-any.whl:
Publisher:
release.yml on jupyter-naas/abi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
naas_abi_cli-1.28.0-py3-none-any.whl -
Subject digest:
ae3620c18c96f9943d6bf9f09daafb485b9bd5a6ffbc8d1862e0b164debbd45d - Sigstore transparency entry: 1436983505
- Sigstore integration time:
-
Permalink:
jupyter-naas/abi@ac4e34598b1d03aa98b2ffdfa16b64a1dd8d8d6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jupyter-naas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ac4e34598b1d03aa98b2ffdfa16b64a1dd8d8d6d -
Trigger Event:
push
-
Statement type: