Web apps and AI agents, wired before they start.

Amoxi builds pages, APIs, dependency injection and AI agents with the TypeScript compiler, the way Micronaut does for Java. Agents run as durable background work, stream every token and show your own components. Nothing is scanned at start-up, so a server with 1,000 services is ready in about 11 milliseconds.

npx create-amoxi-app@latest my-appcd my-appnpm run dev
Framework start-up with 1,000 services: 10.7 milliseconds when services are created on demand, 33.7 milliseconds when all are created at start-up.01020304050 ms10.7 ms33.7 ms
10.7 ms
Framework ready with 1,000 services, each created when first used
33.7 ms
The same app with all 1,000 services created at start-up

Median of 7 runs of npm run bench on Node 22, measured from the start of the framework to the server accepting requests. Node.js loading your compiled code comes on top and grows with the size of the app. Run the benchmark on your own hardware to compare.

What your team gets

Each advantage below is used by at least one of the sector examples, so you can read the code behind it before adopting anything.

Built for AI agents

What teams usually assemble from five libraries and a job queue is part of the framework.

Agents that outlast the request
Runs execute in background workers and can take minutes. Every step is saved, so a run resumes after a deploy or a crash, on any server, without repeating payments or bookings. In the Demo Freight example
Streaming and generative UI
Answers stream token by token. Agents show your own components, React ones included, with props checked against their TypeScript types. In the Demo Outdoor Store example
People stay in control
Sensitive actions pause until a person approves. Guardrails, audit hooks and per-user ownership of conversations are built in. In the Demo Bank example
Tool schemas from your types
The JSON Schema a model sees and the validator its arguments must pass are generated from your method signatures at build time. No Zod, no drift.
Memory and knowledge built in
Long-term memory per person and search over your documents work with no setup, and move to PostgreSQL with pgvector when you scale. In the Demo Clinic example
Open to other agents
Every page is readable by AI as markdown or JSON, with /llms.txt, and your tools and agents can be offered to other agents over MCP and A2A. In the Demo Outdoor Store example

Fast where it counts

The speed comes from doing the work at build time, not from tuning.

Starts in milliseconds
Wiring is generated code, so an app with 1,000 services is ready in about 11 ms. Fast start-up makes autoscaling, short-lived containers and rolling deploys cheaper and quicker.
Little JavaScript in the browser
Pages are server-rendered HTML. Only interactive islands send code to the browser, and each page loads only the islands it uses. In the Demo Outdoor Store example
Pages cached like Next.js ISR
Cached pages are served from memory and refreshed in the background, and revalidatePath updates them right after a change. In the Demo Outdoor Store example

Mistakes caught before deploy

Problems that other frameworks find at runtime, Amoxi finds while it builds.

Wiring errors fail the build
A missing service, an ambiguous choice between two implementations or a dependency cycle stops the build with the file and line, instead of crashing after deploy.
Requests validated from your types
Request bodies are checked against their TypeScript types, with limits such as a maximum amount or an email format written as doc comments. Unknown fields are removed. In the Demo Bank example
Secure by default
Security headers, a Content Security Policy with a fresh nonce on every request, CSRF protection and encrypted sessions are on without any configuration. In the Demo Clinic example

Simple to operate

What operations teams usually add by hand is already there.

No environment variables required
Like Next.js, an app runs with no setup. Configuration lives in application.json, with .env files and profiles when you need them.
Production features built in
Liveness and readiness endpoints, graceful shutdown, JSON logs, compression, and one worker per CPU core with amoxi start. In the Demo Freight example
Real-time and uploads included
WebSockets and streaming file uploads with size limits are part of the framework, so no custom server is needed. In the Demo Freight example

Easy for teams to adopt

Familiar tools, and room for the code you already have.

Conventions you already know
create-amoxi-app, amoxi dev, build and start, and the project layout mirror Next.js. Developers who know Spring, Micronaut, Angular or NestJS will recognise the decorators.
Bring your React components
A React component can run as an island, so the design system and libraries your team already uses keep working. In the Demo Outdoor Store example
Swap behaviour with configuration
Choose implementations from configuration, such as built-in fraud rules or an external provider, without if-statements in your code. In the Demo Bank example
Apache License 2.0
Free to use in commercial and closed-source products. The licence includes a patent grant, and every runtime dependency is permissively licensed.

Built for your sector

Four complete example apps live in the repository, each with tests and a README that maps every framework feature to the business need it serves. Company names and data are fictional.

Finance and banking

Demo Bank

A banking assistant that answers from the customer's real accounts and moves money only with their approval.

  • Transfers and card freezes pause until the customer approves them in the conversation
  • Guardrails refuse over-limit transfers and other customers' accounts before anyone is asked
  • Every action lands in a hash-chained audit log that detects tampering

See how the Demo Bank example is built

Healthcare

Demo Clinic

A patient assistant that books appointments, answers policy questions and screens urgency safely, without ever diagnosing.

  • Red-flag symptoms trigger emergency guidance and a clear notice, never a diagnosis
  • Bookings and cancellations wait for the patient's confirmation and can't be made for someone else
  • Patients can see a pseudonymous log of every access to their data

See how the Demo Clinic example is built

Retail and e-commerce

Demo Outdoor Store

A shopping assistant that sells through product cards and comparisons, remembers sizes, and is open to shopping agents.

  • Products, comparisons and the cart appear as interactive components in the conversation
  • Orders are placed only after the shopper confirms the total, and never twice
  • External shopping agents can search the catalog over MCP, A2A and /llms.txt

See how the Demo Outdoor Store example is built

Logistics and operations

Demo Freight

A dispatch agent that plans routes for minutes in the background and reacts to vehicle events on its own.

  • Route planning runs for minutes in the background, with live progress and cancellation
  • Telematics events start an exception-handling agent with no human typing
  • A run interrupted by a restart resumes without notifying drivers twice

See how the Demo Freight example is built

How it works

Decorators are markers. The compiler turns them into plain TypeScript that you can read, debug and step through.

  1. Write services, tools and agents

    Tools are ordinary methods with typed inputs; agents list the tools, components and knowledge they may use.

    src/agent/banking-tools.ts (shortened)
    @Singleton()
    export class BankingTools {
      /** Transfer money between two of the customer's own accounts.
          Runs only after the customer approves it. */
      @Tool({ approval: true, idempotent: true, expose: false })
      async transferBetweenAccounts(input: {
        /** Account to take the money from, e.g. CHQ-4417 */
        fromAccountId: string;
        toAccountId: string;
        /** Amount in cents @integer @minimum 1 */
        amountCents: number;
      }, ctx: ToolContext): Promise<TransferSummary> {
        const receipt = await ctx.step('post-transfer', () =>
          this.money.transfer({ customerId: customerOf(ctx), ...input }));
        ctx.ui('TransferReceipt', { ...receipt });
        return summary(receipt);
      }
    }
    
    @Agent({ tools: [BankingTools], ui: ['SpendingChart', 'TransferReceipt'],
             knowledge: ['fees'], memory: true })
    export class BankingAssistant { instructions(ctx: AgentRunContext) { ... } }
  2. amoxi build resolves everything

    The TypeScript compiler checks the whole graph, from services to agents, and generates the wiring, the tool schemas the model sees and the validators its arguments must pass. Mistakes stop the build, not production.

    Terminal
    > amoxi build
    
    Amoxi found 1 problem(s):
    
      error AMOXI: src/agent/banking-assistant.ts:18
      @Agent 'BankingAssistant': ui component
      'BalanceSparkline' is not an island in src/islands/
  3. Start in milliseconds

    At start-up there's nothing left to discover: the server listens in milliseconds, and agents run as durable background work that streams to the browser.

    src/generated/amoxi.generated.ts (excerpt)
    tools.push({
      name: "transfer_between_accounts",
      inputSchema: {"type":"object","properties":{
        "fromAccountId":{"type":"string",
          "description":"Account to take the money from, e.g. CHQ-4417"},
        "amountCents":{"type":"integer","minimum":1}, ...},
        "required":["fromAccountId","toAccountId","amountCents"]},
      validate: (x) => $validate(x ?? {}, _V18),
      invoke: (b: C6, i, t) => b.transferBetweenAccounts(i, t),
      approval: true,
      idempotent: true,
      expose: false,
    });

Compared with Next.js

Amoxi follows Next.js conventions where it can, so the commands and project structure feel familiar. These are the differences that matter when you choose.

NeedNext.jsAmoxi
Server-rendered pagesReact Server ComponentsJSX pages rendered to HTML on the server
Interactive partsClient components, hydratedIslands, with signals or React, loaded only where used
API endpointsRoute handlersControllers with typed routes
Dependency injectionNot includedBuilt in, resolved and checked at build time
Request validationA library such as ZodGenerated from your TypeScript types
Page cachingISR and revalidatePath@Cached and revalidatePath
Sessionscookies() plus an auth libraryEncrypted cookie sessions built in
WebSocketsNeeds a custom serverBuilt in
OpenAPI documentA separate libraryGenerated from your types
Static exportoutput: 'export'amoxi export
AI agentsVercel AI SDK; long tasks hit function time limits on serverless hostsBuilt in: durable background runs that survive restarts
Agent UIAI SDK generative UI (React)Your islands, with props validated against their types
Tool schemasZodGenerated from your TypeScript types
MCP and A2A serversSeparate librariesBuilt in, off by default
Pages for AI agentsAdd yourselfMarkdown and JSON for every page, /llms.txt
Image optimisationnext/imageNot included; serve pre-sized images
Track recordLarge ecosystem, widely deployedNew: fully tested

A good fit when

  • You are adding AI agents to a product and need them to be reliable, streamed, approved and audited
  • You build TypeScript services or full-stack apps and want start-up time and memory to stay small
  • Your backend has many services and you want wiring mistakes caught at build time
  • Most pages are content and forms, with interactive parts in specific places
  • You want validation, sessions, WebSockets and uploads without assembling separate libraries

Start a project

You need Node.js 22 or newer. No environment variables or accounts are required: the app runs at http://localhost:8080.

npx create-amoxi-app@latest my-appcd my-appnpm run dev

Amoxi is free to use in commercial products under the Apache License 2.0, which includes a patent grant. The documentation covers every feature, from the first page to deploying in production.