Composition layer
Getting Started
How to define, build, and distribute stax agents and packages
stax provides a TypeScript-first authoring experience for defining agents and packages. Every definition uses a typed helper function that validates your configuration at build time.
Quick Start
Initialize a new agent
stax init --agentDefine your agent
import { defineAgent } from "stax";
export default defineAgent({
name: "backend-engineer",
version: "3.1.0",
persona: "./personas/maya-chen.ts",
prompt: "./prompt.md",
mcp: "./mcp.ts",
skills: "./skills/",
rules: "./rules/",
packages: ["@acme/coding-standards@^1.0.0"],
adapter: {
type: "claude-code",
runtime: "claude-code",
},
});Build the artifact
stax buildPush to a registry
stax push ghcr.io/myorg/agents/backend-engineer:3.1.0Materialize into a runtime
stax materialize ghcr.io/myorg/agents/backend-engineer:3.1.0 --out ./outputProject Structure
After running stax init --agent, your project will look like this:
agent.ts
SYSTEM_PROMPT.md
persona.ts
mcp-servers.ts
_base.ts
maya-chen.ts
.staxignore
stax.lock