Packaging

Ageniti can turn one app definition into distributable artifacts for CLI, MCP, manifests, and skill documentation.

What Gets Built

The bundle target writes:

ageniti.manifest.json
ageniti.actions.json
ageniti.mcp.json
cli.mjs
mcp-stdio.mjs
GUIDE.md
package.json
README.md
ageniti.bundle.json

These files describe the app, expose runnable launchers, and package the app for installation or review.

The generated README.md is not filler. It is included so the bundle itself explains how to run, install, publish, and connect the app surfaces.

Required App Module

Launcher targets need a Node-safe module that exports your Ageniti app.

src/ageniti/app.js

Avoid importing React components, browser-only APIs, route files, or mobile runtime code from this entry.

Build

task-app build bundle --app-module ./src/ageniti/app.js --app-export app --out-dir ./dist/ageniti

If your project has an ageniti.config.json, build commands can read defaults from it.

Package

task-app package --app-module ./src/ageniti/app.js --app-export app --out-dir ./dist/ageniti

This builds the bundle and runs npm pack inside the generated output directory.

The output is a tarball such as:

task-app-ageniti-0.1.0.tgz

You can test the same install shape your users will receive:

npm install -g ./dist/ageniti/task-app-ageniti-*.tgz
task-app
task-app-mcp

Publish

task-app publish --app-module ./src/ageniti/app.js --app-export app --out-dir ./dist/ageniti

publish defaults to a dry run. Use --live only when you intentionally want a real npm publish.

task-app publish --live --access public --tag latest --app-module ./src/ageniti/app.js --app-export app --out-dir ./dist/ageniti

If npm requires two-factor auth, complete the extra verification step requested by npm during publish.

After the package is published, downstream users install the generated app package, not the Ageniti SDK itself:

npm install -g task-app-ageniti
task-app
task-app-mcp

MCP Descriptor

ageniti.mcp.json includes command metadata and snippets for common MCP host configuration. The generated stdio command points at:

node ./mcp-stdio.mjs

For local development, an MCP client can point at the generated bundle folder:

{
  "mcpServers": {
    "task-app": {
      "command": "node",
      "args": ["./mcp-stdio.mjs"],
      "cwd": "/absolute/path/to/dist/ageniti"
    }
  }
}

After global install, many MCP clients can call the generated MCP bin:

{
  "mcpServers": {
    "task-app": {
      "command": "task-app-mcp",
      "args": []
    }
  }
}

Use the exact snippets in ageniti.mcp.json as the source of truth for a generated bundle.

CLI Deployment

The generated CLI can run locally from the bundle:

node ./dist/ageniti/cli.mjs actions
node ./dist/ageniti/cli.mjs manifest

After npm install, users run the generated bin:

task-app actions
task-app manifest
task-app create-task --json '{"title":"Follow up"}'

The bin name comes from package.binName in ageniti.config.json.

HTTP Deployment

HTTP is normally deployed inside your own backend rather than from the static bundle. Mount the same Ageniti app in your server process:

const handle = app.createHttpHandler();

Requests use:

GET  /ageniti/actions
POST /ageniti/actions/<action-name>/invoke

This keeps auth, sessions, network policy, and hosting inside your infrastructure. Use npx @ageniti/core init host-http for a starter.

Skill Documentation

GUIDE.md is generated from app and action metadata. It gives agents, coding assistants, and automation systems a compact usage guide for the capabilities exposed by the app.

Release Review

Before publishing a new bundle:

  • inspect ageniti.manifest.json
  • inspect ageniti.actions.json
  • inspect ageniti.mcp.json
  • run the generated cli.mjs
  • run the generated mcp-stdio.mjs with an MCP host
  • compare old and new manifests with task-app diff