Start / 01

Install Glove Foundry

Scaffold a typed application, add a provider key, and open the inspector. The generated project is ordinary TypeScript that you own.

Requirements

  • Node.js 20 or newer
  • A package manager
  • A model provider key for live runs; the reference example can run deterministically without one

1. Scaffold

terminalbash
npx glove-foundry init my-agent-system
cd my-agent-system
pnpm install

Once glove-foundry is installed in a project, the equivalent framework command is glove foundry. The explicit package form above also works before a local glove binary exists.

2. Configure the provider

.env.localbash
OPENROUTER_API_KEY=your_key_here
# optional
OPENROUTER_MODEL=openai/gpt-4.1-mini
!

Foundry reads environment values for your adapter, but never acquires or refreshes application credentials. For installed apps, implement your own credential adapter and keep secrets out of definitions and persisted manifests.

3. Run

terminalbash
pnpm dev
# Glove Foundry
# Local:   http://127.0.0.1:4141
# Types:   .foundry/routes.d.ts

Development mode discovers agents/, generates route types, starts the Effect runtime and HTTP API, opens the inspection surface, and restarts when agent or configuration files change.

What was created

projecttext
agents/
  assistant/
    agent.ts                 # the definition
    composition.ts           # imported, composable pieces
    tools/                   # shared or colocated tools
    apps/                    # installable application definitions
    memory/  inboxes/  mcp/  # lazily mounted capabilities
    layers/  subscribers/    # assembly and observation
    workbench.ts             # VFS + REPL
foundry.application.ts       # runtime adapters and services
foundry.config.ts            # fully typed framework config

4. Create an instance and send a message

call-foundry.tstypescript
import { createFoundryClient } from "glove-foundry/client";
import type { FoundryRoutes } from "./.foundry/routes.js";

const foundry = createFoundryClient<FoundryRoutes>({
  baseUrl: "http://127.0.0.1:4141",
});
const instance = await foundry.agent("assistant").create({
  context: { team: "brand" },
});
const conversation = await foundry.createConversation(instance.id);
const run = await foundry.send(
  instance.id,
  conversation.id,
  "Build three launch territories and review the strongest one.",
);
const result = await run.wait();

In static code, import the definition. Serializable instance and conversation identifiers appear only where data crosses the runtime boundary.

5. Verify the reference application

terminalbash
pnpm --filter glove-foundry-example typecheck
pnpm --filter glove-foundry-example verify:architecture
pnpm --filter glove-foundry-example verify