Project Structure

See exactly what the create flow adds to a framework app

The create flow runs the framework's official scaffolding tool, then layers on Agentuity dependencies, scripts, and a working AI translation example. Your framework's file layout is unchanged. Nothing is moved into an Agentuity-owned runtime structure.

What the scaffold adds

After npm create agentuity, expect the framework's normal files plus:

AdditionWhereWhen
@agentuity/clipackage.json devDependenciesAlways
@agentuity/aigatewaypackage.json dependenciesWhen the AI example is included
swrpackage.json dependenciesNext.js AI example
Selected service packages, for example @agentuity/keyvaluepackage.json dependenciesWhen selected with --services or the service prompt
deploy: agentuity deploypackage.json scriptsAlways
Translation page and API routeFramework-specific paths (see below)When the AI example is included
agentuity.jsonProject rootWhen you register (default)
.env with AGENTUITY_SDK_KEYProject rootWhen you register (default)
.gitignore entries: .agentuity/, .env, .env.local, agentuity.jsonProject rootAlways
AGENTS.md, CLAUDE.mdProject rootAlways

The framework's own create command owns dev, build, and start scripts; Agentuity adds deploy on top.

If you scaffolded with --no-register, run agentuity project import later to register the directory and write agentuity.json plus the AGENTUITY_SDK_KEY.

Framework File Layouts

For create-supported frameworks, the scaffold places the AI translation example where each framework expects routes and pages:

FrameworkAPI routeApp UIDev script
Next.jssrc/app/api/translate/route.tssrc/app/page.tsxnext dev
Nuxtserver/api/translate.post.tsapp/app.vuenuxt dev
SvelteKitsrc/routes/+page.server.tssrc/routes/+page.sveltevite dev
Astrosrc/pages/api/translate.tssrc/pages/index.astroastro dev
Honosrc/index.tssrc/landing.tsxthe scaffold's dev script

agentuity dev calls the framework's own dev script through your package manager.

React Router, Vite + React, and TanStack Start are existing-app adoption paths today. See Frameworks for adding Agentuity to those apps without using the Agentuity create flow.

Routes and Services

Routes live where the framework expects them. To add Agentuity services, import a standalone client inside the route or function that owns the work:

import { KeyValueClient } from '@agentuity/keyvalue';
 
const kv = new KeyValueClient();
 
await kv.set('sessions', 'user-123', {
  lastSeenAt: new Date().toISOString(),
});

The client reads AGENTUITY_SDK_KEY (with AGENTUITY_CLI_KEY as a fallback) from process env. agentuity dev supplies the key for local runs, and registered deployed apps receive it as a project secret.

This pattern is portable across framework server code, scripts, and workers. See Using Standalone Packages for the full client list.

App Entrypoints

There is no Agentuity entrypoint. Each framework owns startup and routing as usual:

FrameworkEntrypoints
Next.jssrc/app/ and next.config.*
Nuxtapp/, server/, and nuxt.config.*
SvelteKitsrc/routes/ and svelte.config.*
Astrosrc/pages/ and astro.config.*
Honosrc/index.ts and src/landing.tsx

agentuity build packages the framework's build output for deploy. agentuity deploy does both, then encrypts and uploads the bundle.

Build Output

agentuity build writes .agentuity/launch.json. That file is the process contract Agentuity uses at deploy time:

json.agentuity/launch.json
{
  "processes": [
    {
      "type": "web",
      "command": "node server.js",
      "default": true
    }
  ],
  "framework": {
    "name": "nextjs"
  },
  "runtime": {
    "name": "node",
    "port": 3000
  }
}

In a detected monorepo subpackage, the output is staged at the workspace root and the process includes a working directory:

json.agentuity/launch.json
{
  "processes": [
    {
      "type": "web",
      "command": "node server.js",
      "default": true,
      "workingDirectory": "apps/web"
    }
  ],
  "framework": {
    "name": "nextjs"
  },
  "runtime": {
    "name": "node",
    "port": 3000
  }
}

Inspect launch.json after the first build. It shows the exact command the platform will run.

Next Steps