Skip to main content
This guide helps 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 the CLI
  3. ✅ Deploy Agent - One-click deployment to the cloud
  4. ✅ Invoke Agent - Call your Agent using the 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

Integrate SDK into Your Agent

1

Create Agent Code

Create app.py in your project directory:
2

Prepare Dependencies File

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

Local Testing

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

Generate Configuration Files with CLI

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

Deploy to Novita AI with One-click

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

Deploy Command

Deploy with one click using the CLI:
2

View Deployment Results

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

Invoke Agent via CLI or SDK

Option 1: Quick Test with CLI

Quickly test your Agent using the 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 the 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 11, 2026