AI agent hosting API: deploy and run agents from a CLI or SDK
You want agents in your own scripts and pipelines, not only in a web console: create an environment, deploy an agent from a template, message it, read its logs, and tear it down, from a terminal or from code. That is what the Qoren command line and TypeScript SDK do, on managed hosting that keeps the machines, secrets and updates off your plate.
Direct answer
Is there an API for hosting and running AI agents?
Yes. Qoren exposes its control plane through a command line (qoren), a TypeScript SDK (@qoren/sdk) and personal access tokens. With them you create environments, deploy OpenClaw, Hermes or Codex agents from templates, message them, run commands on them and read their logs and usage. API access is included on the Ultimate, Business and Enterprise plans; Starter and Pro use the web console.
What you can do from the command line
The CLI does from a terminal what the console does in a browser. Every command takes --json, prints only the payload on stdout, and exits with a code a script can branch on, so it slots into shell scripts and CI without screen scraping.
- Environments: list, create, resize, rename and remove, with region and size chosen for you or pinned.
- Agents: deploy from a template with a model and runtime, message them, run a command on them, read logs and status.
- Operations: follow long jobs to completion, run a health check with repair, and read usage and spending.
- An escape hatch: qoren api reaches any control-plane endpoint with the same credential and rules.
Sign in, then deploy an agent into an environment
qoren login
qoren env ls
qoren agent create --env "$ENV_ID" --template inbox-manager --name "Inbox" --json
qoren agent message "$AGENT_ID" "Summarize what arrived overnight"
qoren agent logs "$AGENT_ID" --limit 50Drive it from TypeScript
The SDK is the same surface as a typed client. Everything expensive is asynchronous: a create returns a job id, and the SDK can wait on the job, report each step, ride out a transient outage and throw the job's own error if it fails.
Deploy an agent with @qoren/sdk
import { Qoren } from "@qoren/sdk";
const qoren = new Qoren({ token: process.env.QOREN_TOKEN });
const [env] = await qoren.environments.list();
const { jobId } = await qoren.agents.create({
machineId: env.id,
slug: "inbox-manager",
name: "Inbox",
runtime: "hermes",
model: "anthropic/claude-sonnet-4",
presetName: "inbox-manager",
});
await qoren.jobs.await(jobId, (job) => console.log(job.status));Run it from CI
Create a token in the console under Settings, CLI tokens, and set it as QOREN_TOKEN in your pipeline. It overrides any stored login, so a build never picks up a developer's profile. Exit codes separate a revoked token (3) from a plan without API access (4) from a failed request (1).
Which plans include API access
The CLI, the SDK and access tokens are API access, which the Ultimate, Business and Enterprise plans include, and a free trial of one of those counts. On Starter and Pro every token request is refused, and the CLI exits with code 4 and names the plans that include it. The web console works on every plan, so nothing else about running agents changes.
Not a side door around the platform
The CLI, the SDK and the console all reach your environments through the same gate, which checks who you are and what your plan allows before anything runs. A token can do what your account can do in a browser, and nothing more. It cannot change your password or billing details, and you can revoke it from the console at any time.
When a plain VPS or your own stack is the better fit
If you need root on the host, a custom kernel, or a runtime Qoren does not run, rent a server and operate it yourself. The API is for teams who want agents in their scripts without also running the machines, the secret storage, the updates and the restarts underneath them.
Related guides
Hosting, runtime-neutral
AI agent hosting
The four ways to host an always-on AI agent: laptop, VPS, serverless, managed. What each costs, what each asks of you, and how to choose before the runtime.
Read guideManaged Codex hosting
Managed OpenAI Codex hosting: what is included, and what it costs
Managed OpenAI Codex hosting from $39 a month: an isolated always-on environment, triggers, logs, ChatGPT sign-in or BYOK, and a cost comparison with a VPS.
Read guideDeployment trade-offs
Self-hosted vs managed agents: what changes when the agent must stay online
Compare local, VPS, and managed deployment for OpenClaw, Hermes, and Codex agents. What changes for uptime, security, cost, and operations when you self-host.
Read guideTools, templates and next steps
The Qoren command line
Install the Qoren CLI, sign in from your terminal, and drive environments, agents and jobs from scripts and CI with JSON output and clear exit codes.
OpenThe Qoren TypeScript SDK
Use @qoren/sdk to drive Qoren from TypeScript: authenticate with a token, manage environments, agents, secrets and webhooks, and await long-running jobs.
OpenCreate and revoke CLI access tokens
Create a personal access token for the Qoren CLI or SDK, approve a qoren login in your browser, and revoke tokens from computers or CI jobs you no longer trust.
OpenQoren CLI command reference
Every qoren command and flag in one place, for environments, agents, scheduled tasks, webhooks, approvals, clients, jobs, account usage and raw API calls.
OpenThe Qoren platform MCP
Every Qoren agent gets a tool server for the platform itself. See the tool groups, what is on by default, which tools ask for approval, and how to switch them.
OpenQoren pricing
Every plan, with what each one includes.
OpenFrequently asked questions
Which Qoren plans include the CLI and SDK?
Ultimate, Business and Enterprise. Tokens, the CLI and the SDK are API access, so on Starter or Pro every request made with a token is refused and the CLI exits with code 4. A free trial of Ultimate or Business includes API access.
Can I deploy an agent from a template with one command?
Yes. qoren agent create takes an environment, a template slug, a name and optionally a model and runtime, then follows the deployment job and prints each step. Add --no-wait to get the job id immediately and watch it later.
Which runtimes can I deploy through the API?
OpenClaw, Hermes and Codex, the same runtimes the console offers. The runtime is a field on the agent create call, so one script can deploy all three into the same environment.
Is there a way to call endpoints the CLI has no command for?
Yes. qoren api sends any method and path to the control plane with your credential and the same plan rules, so a missing command is an inconvenience rather than a blocker.
Deploy your first agent from the terminal.
Start a trial of Ultimate or Business, run qoren login, and have an agent running from a template in a few commands.