Skip to main content
This guide will help you develop, deploy, and invoke your first Agent in 5 minutes.

Table of Contents


Overview

The complete workflow consists of 4 steps:
  1. Integrate SDK - Add decorators to your Agent code
  2. Configure Agent - Generate configuration files using CLI
  3. Deploy Agent - One-click deployment to the cloud
  4. Invoke Agent - Call your Agent using SDK or CLI

Prerequisites

Ensure you have the following prerequisites:
  • ✅ Python 3.9+ and Node.js 20+ installed
  • ✅ Beta version Python SDK and Node.js CLI installed (see Installation Guide)
  • ✅ Novita AI API Key obtained (from the Console)
  • Docker installed

Step 1: Integrate SDK into Your Agent

1.1 Create Agent Code

Create app.py in your project directory:

1.2 Prepare Dependencies File

Ensure your project root has a requirements.txt file with the required dependencies:

1.3 Local Testing

Test locally before deployment:
In another terminal, test the endpoints:
Expected output: Health check should return:
Agent invocation should return:

Step 2: Generate Configuration Files with CLI

Use CLI to interactively configure your Agent:
Follow the CLI prompts to configure the required information. When complete, the CLI will generate the following files in your project directory:
  • novita.Dockerfile - Docker build file
  • .dockerignore - Docker ignore file
  • .novita-agent.yaml - Agent configuration file

Step 3: Deploy to Novita AI with One-click

⚠️ Important: After successful deployment, an agent_id will be generated. This is the unique identifier for invoking your Agent—make sure to save it.

3.1 Deploy Command

Deploy with one-click using CLI:

3.2 View Deployment Results

After successful deployment, the .novita-agent.yaml file will update the status field:
Record the agent_id—you’ll need it for subsequent invocations.

Step 4: Invoke Agent via CLI or SDK

Option 1: Quick Test with CLI

Quickly test your Agent using CLI:
Note: The CLI automatically reads the Agent ID from the status.agent_id field in .novita-agent.yaml. Expected output:
Use the SDK to invoke your Agent in backend services:

Example Code


FAQ

Q1: How do I get the Agent ID?

After successful deployment, the Agent ID is saved in the status.agent_id field of the .novita-agent.yaml file:

Q2: What if deployment fails?

  1. Check dependencies file: Ensure requirements.txt contains all dependencies
  2. View detailed logs: Use the --verbose flag
  3. Check network connection: Ensure you can access the Novita AI Sandbox domain (e.g., sandbox.novita.ai)
  4. Verify API Key: Confirm NOVITA_API_KEY is correct

Q3: How do I update a deployed Agent?

Modify your code and redeploy:

Q4: Works locally but fails after deployment?

Possible causes:
  1. Environment variables not passed to sandbox instance
  2. Dependency package version inconsistencies
  3. File path issues
Solution: Pass environment variables to the sandbox instance via the envVars parameter:
Last modified on November 27, 2025