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
npx glove-foundry init my-agent-system
cd my-agent-system
pnpm installOnce 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
OPENROUTER_API_KEY=your_key_here
# optional
OPENROUTER_MODEL=openai/gpt-4.1-miniFoundry 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
pnpm dev
# Glove Foundry
# Local: http://127.0.0.1:4141
# Types: .foundry/routes.d.tsDevelopment 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
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 config4. Create an instance and send a message
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
pnpm --filter glove-foundry-example typecheck
pnpm --filter glove-foundry-example verify:architecture
pnpm --filter glove-foundry-example verify