Skip to main content
Once you’ve successfully built your graph, you can deploy it to Inworld Cloud using the Inworld CLI to create a persistent, production-ready endpoint. Deploying your graph is ideal if:
  • You’re building in a language other than Node.js and want to use your graph through a hosted API endpoint
  • You don’t want to manage graph execution directly and prefer a cloud-managed deployment that scales automatically.

Deploy your graph

To deploy your graph, you’ll need to have the Inworld CLI installed. Once installed, run the following command with the path to your graph file (for example, graph.ts). Once deployment completes, you’ll see the persistent endpoint URL printed in your console output.
inworld deploy ./graph.ts
You can use the following command-line flags to check on your deployment status and package your graph up for deployment without actually deploying.
CommandDescription
--infoCheck deployment information, status, and health metrics for an existing deployment
--package-onlyPackage graph for deployment without actually deploying (creates graph-deployment.zip in current directory)
--package-only ./my-deployment.zipPackage graph for deployment without actually deploying (creates graph-deployment.zip in custom output path)
Once deployed, your clients can integrate with the persistent endpoint. Below is an example integration:
// Client code (never needs to change)
const response = await fetch('https://api.inworld.ai/cloud/workspaces/workspace-123/graphs/my-graph-id/v1/graph:start', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_BASE64_API_KEY'
  },
  body: JSON.stringify({
    input: {
      user_input: "Hello!"
    },
    userContext: {
      targetingKey: "user123",
      attributes: { tier: "premium" }
    }
  })
});
Both methods will return a JSON response that you can process:
const result = await response.json();
console.log(result.output);
You can update your graph anytime with inworld deploy ./graph.ts and clients automatically get the improvements without any code changes on their end.

How it works

When you deploy a graph, Inworld creates a persistent endpoint - a stable URL that your clients can integrate with once. Here’s how it works:
  • Initial deployment: Creates the endpoint (e.g., https://api.inworld.ai/cloud/workspaces/[workspace-id]/graphs/[graph-id]/v1/graph)
  • Subsequent deployments: Update the graph behind the same endpoint
  • Client experience: No changes needed - requests continue to work seamlessly
  • Zero downtime: Updates happen instantly without service interruption

Best practices

  1. Test locally first: Always test your graph with inworld serve before deploying
  2. Package and inspect: Use --package-only to review what will be deployed
  3. Deploy to cloud: Use the basic deploy command to create your persistent endpoint
  4. Verify deployment: Use --info to check deployment status and details
Having issues? Check the CLI Troubleshooting Guide for comprehensive setup, development, and deployment troubleshooting.

Next steps

Once your graph is deployed to the cloud: