{"slug": "novita-artifact-hosting-tidb-deploying-ai-generated-apps-with-one-sdk-call", "title": "Novita Artifact Hosting + TiDB: Deploying AI-Generated Apps With One SDK Call", "summary": "Novita Artifact Hosting now integrates with TiDB Cloud to let AI coding agents deploy database-backed applications with a single SDK call. By adding `database=True` to the deploy command, developers automatically provision a TiDB Cloud instance, run migrations, and inject the database URL, eliminating manual infrastructure setup. The partnership addresses the deployment bottleneck that prevents most AI-generated code from reaching production.", "body_md": "**Key Moments**\n\n- Most AI-generated code never reaches production because deployment, not code quality, is the blocker.\n- Novita Artifact Hosting takes an agent’s sandbox output to a live URL with one SDK call.\n- Adding database=True to the deploy call provisions a TiDB Cloud instance, runs migrations, and injects DATABASE_URL automatically.\n- TiDB fits agent-built apps because it is MySQL compatible and requires zero database operations.\n\nAI coding agents such as Cursor, Claude Code, and Devin can now produce a working application from a single prompt. However, most of this code still never reaches production. The blocker is rarely code quality. It is deployment. This blog explains how Novita Artifact Hosting turns an agent’s sandbox output into a live application, and how a [TiDB](https://www.pingcap.com/what-is-tidb/) Cloud removes the last manual step: Provisioning and wiring up a database.\n\n**Why Most AI-Generated Apps Never Ship**\n\nAn agent finishes writing code, and the developer inherits an infrastructure checklist. A typical AI-generated app needs:\n\n- A runtime environment, such as a container or sandbox.\n- A database, such as PostgreSQL or MySQL.\n- A domain and SSL certificate.\n- Environment variable configuration.\n- Database migration scripts.\n\nAgents do not usually handle any of this when they write code. Each item pulls the developer into a different console, and shipping one small app can require coordinating three or more platforms. For teams generating dozens of apps through agents, that overhead compounds fast.\n\n**Novita Artifact Hosting: A Deployment Target for Agent-Built Apps**\n\nNovita Artifact Hosting is a fully managed deployment platform for applications created by AI coding agents. The division of labor is simple: Agents write the code, and Novita runs it. One SDK call takes a sandbox directory to a live URL.\n\nAgent generates code + Dockerfile in a sandbox\n\n```\nAgent generates code + Dockerfile in a sandbox\n        │\n        ▼\nOne SDK call: project.deploy(sandbox_id, arti_dir)\n        │\n        ▼\nDocker Build → image creation\n        │\n        ▼\nLight Runtime → deployment goes live\n        │\n        ▼\nUsers access the app through a domain: https://my-app.novita.space\n```\n\nUsers access the app through a domain: https://my-app.novita.space\n\nThis workflow is already live and supports custom domains. But it only solves the compute side of the problem. Real applications also need data.\n\n**Why AI-Generated Apps Need MySQL Compatibility and Zero Operations**\n\nFor AI-generated web applications, the database layer has two hard requirements: MySQL compatibility and zero operations. TiDB meets both, which is why Novita chose it for its managed database layer.\n\n**MySQL compatibility. **The frameworks agents reach for most often, such as Next.js, Django, and Laravel, work smoothly with the MySQL ecosystem, and AI-generated code frequently defaults to a MySQL driver. Because TiDB is [compatible with the MySQL protocol](https://docs.pingcap.com/tidb/stable/mysql-compatibility), AI-generated code connects and runs without rewriting SQL.\n\n**Zero operations. **Agent developers do not want to manage databases. They do not want to configure connection pools, tune parameters, or handle backups. TiDB’s distributed architecture scales automatically, so no dedicated DBA is required.\n\nTiDB also supports hybrid transactional/analytical processing (HTAP). This means the same database that handles an app’s transactions can also serve its analytical queries, [without adding a separate warehouse or CDC pipeline](https://docs.pingcap.com/tidb/stable/tidb-architecture/).\n\n**Adding a TiDB Cloud Instance With One Parameter**\n\nWith Novita Artifact Hosting, enabling TiDB Cloud takes one parameter in the deploy call:\n\n```\ndeployment = project.deploy(\n    sandbox_id=\"xxx\",\n    arti_dir=\"./workspace/my-app\",\n    database=True,  # ← this line\n    migrations=[\n        Path(\"./migrations/0001_schema.sql\").read_text(),\n        Path(\"./migrations/0002_seed.sql\").read_text(),\n    ],\n    http_port=3000,\n)\n```\n\nBehind the scenes, database=True triggers four automatic steps:\n\n- Novita creates or reuses a TiDB instance for the project.\n- Migrations run in order, creating tables, indexes, and seed data.\n- Novita injects DATABASE_URL into the deployment environment, and the app reads it directly from os.environ[“DATABASE_URL”].\n- The app deploys, connects to the database, and starts serving users.\n\nFor developers, this means no database signup, no connection string setup, and no manual migration steps. Just one line: database=True.\n\n**What This Changes for AI Coding Agents**\n\nThe table below compares the workflow before and after Novita Artifact Hosting with a TiDB database.\n\nStep | Before | Now |\n| Deployment | Agent writes code, then a developer manually deploys to Vercel or Railway | Agent writes code, then one SDK call deploys the app |\n| Database provisioning | Developer creates a database in TiDB Cloud, PlanetScale, or another platform | Novita creates the managed database automatically and injects connection details |\n| Migrations | Developer runs migration scripts manually | Migrations run automatically in order |\n| Environment variables | Developer configures variables by hand | DATABASE_URL is injected automatically |\n| Platform coordination | Shipping one app requires coordinating three platforms | One platform and one API handle the full flow |\n\n**Current Status and What’s Next**\n\nHere is where the integration stands today:\n\n- Artifact Hosting is live and supports custom domains.\n- TiDB Cloud is currently in trial.\n- Python SDK and CLI support are available.\n- Open-source examples are available on GitHub: ecomm-with-sql, ecomm-with-managed-db, and snake-game-static.\n\nOnce the managed database capability reaches general availability, the Novita + TiDB combination can expand further:\n\n**Multi-region deployment:** TiDB’s multi-data-center capabilities combined with Novita’s global sandbox nodes.**Data sovereignty:** Users choose where their data is stored.**Agent-native workflows:** Agents create projects, deploy applications, and provision databases directly through the SDK, making the entire process fully automated.\n\nAgents already write the code. With Novita handling deployment and TiDB handling data, the path from prompt to production finally has no manual steps left in the middle.\n\n*Want the same zero-ops database layer for your own AI-generated apps? **Spin up a TiDB Cloud cluster in minutes**.*\n\nExperience modern data infrastructure firsthand.\n\n## TiDB Cloud Dedicated\n\nA fully-managed cloud DBaaS for predictable workloads\n\n## TiDB Cloud Starter\n\nA fully-managed cloud DBaaS for auto-scaling workloads", "url": "https://wpnews.pro/news/novita-artifact-hosting-tidb-deploying-ai-generated-apps-with-one-sdk-call", "canonical_source": "https://www.pingcap.com/blog/novita-artifact-hosting-tidb/", "published_at": "2026-07-16 17:52:57+00:00", "updated_at": "2026-07-16 18:41:45.540217+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "ai-infrastructure", "ai-agents", "developer-tools"], "entities": ["Novita", "TiDB", "PingCAP", "Cursor", "Claude Code", "Devin"], "alternates": {"html": "https://wpnews.pro/news/novita-artifact-hosting-tidb-deploying-ai-generated-apps-with-one-sdk-call", "markdown": "https://wpnews.pro/news/novita-artifact-hosting-tidb-deploying-ai-generated-apps-with-one-sdk-call.md", "text": "https://wpnews.pro/news/novita-artifact-hosting-tidb-deploying-ai-generated-apps-with-one-sdk-call.txt", "jsonld": "https://wpnews.pro/news/novita-artifact-hosting-tidb-deploying-ai-generated-apps-with-one-sdk-call.jsonld"}}