@tuttiai/deploy
v0.1.0
Published
Tutti deploy — bundles a Tutti score as a deployable container/worker for Docker, Cloudflare, Railway, or Fly
Readme
@tuttiai/deploy
Deploy a Tutti score as a runnable container, Cloudflare Worker, Railway service, or Fly Machine. Bundles the @tuttiai/server runtime so the resulting artefact serves your agent over HTTP out of the box.
npm install @tuttiai/deployPeer dependencies: @tuttiai/core, @tuttiai/types.
Quick start
Declare a deploy block on the agent you want to ship:
import { defineScore, AnthropicProvider } from "@tuttiai/core";
export default defineScore({
provider: new AnthropicProvider(),
agents: {
api: {
name: "api",
system_prompt: "You are helpful.",
voices: [],
deploy: {
target: "fly",
region: "ams",
secrets: ["ANTHROPIC_API_KEY"],
scale: { minInstances: 1, maxInstances: 5, memory: "512mb" },
},
},
},
});Then resolve it into a manifest:
import { buildDeployManifest } from "@tuttiai/deploy";
const manifest = await buildDeployManifest("./tutti.score.ts");
// manifest.target === "fly"
// manifest.name === "api" // inferred from agent name
// manifest.region === "ams"
// manifest.scale.minInstances === 1
// manifest.healthCheck.path === "/health" // default appliedValidation
buildDeployManifest runs the standard score validator first, then layers on:
- The
deployblock must matchDeployConfigSchema— knowntarget, kebab-casename, POSIX-shaped env / secret names, sanescalebounds, well-formedmemory(e.g.512mb,1gb). - Exactly one agent in the score may declare
deploy. envkeys andsecretsentries must be disjoint.envvalues must not look like API keys — those go insecrets.
Targets
| target | artefact |
|---|---|
| docker | Dockerfile + image build context |
| cloudflare | Cloudflare Worker bundle (wrangler-compatible) |
| railway | Railway service config (railway.json) |
| fly | Fly Machine config (fly.toml) |
The bundlers themselves are not yet implemented — this package currently provides the manifest contract that bundlers will consume.
License
Apache-2.0
