Skip to main content

AI assistant

๐Ÿš€ Early release

AI-powered features are in early release and may not be available in your organization yet. If you'd like to try them or want to know more, reach out to us and we'll get you set up.

The nullplatform AI assistant is a chat panel embedded directly in the console. You can ask questions about your applications, deployments, and scopes, generate np CLI commands on demand, and investigate failures, all without leaving your current view.

What you can doโ€‹

๐Ÿ’ก The assistant responds in the same language you write in, including English, Spanish, and more.

  • Explore resources: applications, deployments, scopes, and builds
  • Investigate failures: current state, recent changes, and audit logs
  • Generate CLI commands: ready-to-run np commands and shell scripts
The assistant is read-only

It can't create, update, or delete resources directly. For write operations, it generates the command or script for you to run.

Click the AI assistant icon in nullplatform to open the chat panel and ask a question.

You don't need to provide IDs or contextโ€‹

The assistant knows what entity you're currently viewing. If you're on a deployment page, a question like "Why did this fail?" is enough. No need to specify the deployment ID or application name.

"Why did this fail?" "Show me recent deployments" "ยฟQuรฉ pasรณ con este scope?"

See it in actionโ€‹

Investigate a failed deploymentโ€‹

Prompt: "Why did my deployment fail?"

Assistant response

Let me investigate deployment #1847362 for your payment-service application.

๐Ÿ” Current state

FieldValue
Applicationpayment-service
Environmentproduction
Build#284 (commit a7f3d91)
StatusFailed
Duration5m 27s

๐Ÿšจ Root cause analysis

The deployment failed during the health check phase:

  1. Build & push: โœ… Successful โ€” image built and pushed to registry
  2. Container deployment: โœ… Successful โ€” container started on prod-cluster-us-east-1
  3. Health check: โŒ Failed โ€” http://payment-service.internal:8080/health timed out after 10 attempts

๐Ÿ“‹ What I found

The container started but couldn't respond to health checks because of a database connection failure:

FATAL: password authentication failed for user "payment_svc"
Connection to postgres-prod.internal:5432 refused

The DATABASE_PASSWORD parameter is missing from the deployment:

ParameterStatus
DATABASE_HOSTโœ… Set
DATABASE_USERโœ… Set
DATABASE_PASSWORDโŒ Not configured
DATABASE_NAMEโœ… Set

๐Ÿ’ก Timeline

  • Apr 27, 10:15 UTC โ€” DATABASE_PASSWORD was removed from the production scope by admin@company.com during a credential rotation
  • Apr 27, 14:23 UTC โ€” your deployment started without the updated parameter

โœ… How to fix

Add the missing parameter and redeploy:

# Set the parameter
np scope parameter create \
--scope-id 3847291056 \
--key "DATABASE_PASSWORD" \
--value "your-secure-password" \
--secret true

# Trigger a new deployment
np build deploy \
--application-id 5739284610 \
--build-id 284

Build and deploy all applicationsโ€‹

Prompt: "Create a script that builds and deploys all my apps in the production namespace"

Assistant response
#!/bin/bash
# Build and deploy all applications in production namespace
# Usage: ./deploy-all-apps.sh

set -e

NAMESPACE_ID="2847139502"

echo "๐Ÿ” Fetching applications..."
APPS=$(np application list --namespace_id "${NAMESPACE_ID}" --format json)

echo "$APPS" | jq -r '.[].id' | while read -r APP_ID; do
APP_NAME=$(echo "$APPS" | jq -r ".[] | select(.id==$APP_ID) | .name")

echo ""
echo "๐Ÿš€ Deploying ${APP_NAME}..."

# Start build
BUILD_ID=$(np build start --application_id "${APP_ID}" --format json | jq -r '.id')
echo " โณ Build ${BUILD_ID} in progress..."

# Wait for completion
while true; do
STATUS=$(np build read --id "${BUILD_ID}" --format json | jq -r '.status')
[ "$STATUS" == "success" ] && break
[ "$STATUS" == "failed" ] && { echo " โŒ Failed"; exit 1; }
sleep 10
done

# Deploy
np deployment create --body "{\"application_id\": ${APP_ID}, \"build_id\": ${BUILD_ID}}" > /dev/null
echo " โœ… Deployed successfully"
done

echo ""
echo "๐ŸŽ‰ All applications deployed!"

Once you copy the script and run it, you'll see something like this:

๐Ÿ” Fetching applications...

๐Ÿš€ Deploying api-gateway...
โณ Build 7392841056 in progress...
โœ… Deployed successfully

๐Ÿš€ Deploying user-service...
โณ Build 7392841057 in progress...
โœ… Deployed successfully

๐Ÿš€ Deploying payment-service...
โณ Build 7392841058 in progress...
โœ… Deployed successfully

๐ŸŽ‰ All applications deployed!

Service specification with PostgreSQL and Redisโ€‹

Prompt: "I need to add PostgreSQL and Redis to my application. Show me the service spec"

Assistant response
{
"name": "backend-datastore",
"application_id": 5739284610,
"specifications": [
{
"name": "postgres",
"type": "postgresql",
"version": "15",
"parameters": {
"database_name": "appdb",
"instance_class": "db.t3.medium",
"storage_size_gb": 100,
"backup_retention_days": 7
}
},
{
"name": "redis",
"type": "redis",
"version": "7",
"parameters": {
"node_type": "cache.t3.small",
"num_cache_nodes": 1
}
}
]
}

To create the service, run:

np service create --body '{
"name": "backend-datastore",
"application_id": 5739284610,
"specifications": [
{"name": "postgres", "type": "postgresql", "version": "15",
"parameters": {"database_name": "appdb", "storage_size_gb": 100}},
{"name": "redis", "type": "redis", "version": "7",
"parameters": {"node_type": "cache.t3.small"}}
]
}'

Nullplatform automatically injects these environment variables into your deployments once the service is provisioned:

  • POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DATABASE, POSTGRES_USER, POSTGRES_PASSWORD
  • REDIS_HOST, REDIS_PORT

Rollback to the previous deploymentโ€‹

Prompt: "Create a script that rolls back my application to the previous deployment if the current one is failing"

Assistant response
#!/bin/bash
# Rollback to previous deployment
# Usage: ./rollback.sh <application_id>

set -e

APP_ID="${1}"

if [ -z "$APP_ID" ]; then
echo "Usage: $0 <application_id>"
exit 1
fi

echo "๐Ÿ” Fetching deployment history..."

DEPLOYMENTS=$(np deployment list \
--application_id "${APP_ID}" \
--limit 2 \
--format json)

CURRENT_ID=$(echo "$DEPLOYMENTS" | jq -r '.[0].id')
CURRENT_STATUS=$(echo "$DEPLOYMENTS" | jq -r '.[0].status')
PREVIOUS_BUILD=$(echo "$DEPLOYMENTS" | jq -r '.[1].build_id')

echo "๐Ÿ“Š Current deployment: ${CURRENT_ID} (${CURRENT_STATUS})"

if [ "$CURRENT_STATUS" == "healthy" ]; then
echo "โœ… Current deployment is healthy. No rollback needed."
exit 0
fi

echo "โš ๏ธ Current deployment is ${CURRENT_STATUS}"
echo "๐Ÿ”„ Rolling back..."

NEW_DEPLOYMENT=$(np deployment create --body "{
\"application_id\": ${APP_ID},
\"build_id\": ${PREVIOUS_BUILD}
}" --format json)

NEW_ID=$(echo "$NEW_DEPLOYMENT" | jq -r '.id')
echo "โœ… Rollback deployment created: ${NEW_ID}"

Once you copy the script and run it, you'll see something like this:

$ ./rollback.sh 5739284610

๐Ÿ” Fetching deployment history...
๐Ÿ“Š Current deployment: 9374628510 (failed)

โš ๏ธ Current deployment is failed
๐Ÿ”„ Rolling back...
โœ… Rollback deployment created: 9374628587

Summaryโ€‹

PromptWhat the assistant generates
"Why did my deployment fail?"Root cause analysis with timeline, logs, and a fix with ready-to-run CLI commands
"Build and deploy all apps"Script that iterates applications and deploys each one
"PostgreSQL + Redis spec"Service spec JSON and the np service create command
"Rollback script"Script that reverts to the previous deployment if the current one is failing

Next stepsโ€‹

  • AI usage and quotas: monitor token and session consumption for your organization and individual users
  • AI-powered features: overview of all AI capabilities in nullplatform, including Insights and Action items