AI assistant
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
npcommands and shell scripts
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
| Field | Value |
|---|---|
| Application | payment-service |
| Environment | production |
| Build | #284 (commit a7f3d91) |
| Status | Failed |
| Duration | 5m 27s |
๐จ Root cause analysis
The deployment failed during the health check phase:
- Build & push: โ Successful โ image built and pushed to registry
- Container deployment: โ
Successful โ container started on
prod-cluster-us-east-1 - Health check: โ Failed โ
http://payment-service.internal:8080/healthtimed 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:
| Parameter | Status |
|---|---|
DATABASE_HOST | โ Set |
DATABASE_USER | โ Set |
DATABASE_PASSWORD | โ Not configured |
DATABASE_NAME | โ Set |
๐ก Timeline
- Apr 27, 10:15 UTC โ
DATABASE_PASSWORDwas removed from the production scope byadmin@company.comduring 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_PASSWORDREDIS_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โ
| Prompt | What 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