This repository contains small, runnable TypeScript examples built with @mozaik-ai/core.
Each example is a self-contained mini project with its own package.json and tsconfig.json. Install and run them independently.
The examples:
terminal-agent/— a terminal-capable agent that can run shell commands and use the results to complete tasksinference-interception/— two streaming agents plus an observer; a safety reviewer intercepts the planner's stream in real timehistory-simulation/— multiple historical-figure agents debating in a shared environment with a transcript observerwrong-asnwer/— a reactive agent with a tool, logging the transcript while answering a simple question
- Node.js 18+
- An OpenAI API key for examples that use inference
Each example follows the same workflow. From inside the example's folder:
cd terminal-agent # or any other example folder
npm installCreate a .env file in that same folder:
OPENAI_API_KEY=your_api_key_hereThen run it:
npm startEach project also exposes:
npm run build # compile TypeScript to ./dist
npm run watch # compile in watch mode
npm run clean # remove ./dist.
├── terminal-agent/
│ ├── package.json
│ ├── tsconfig.json
│ └── ...
├── inference-interception/
│ ├── package.json
│ ├── tsconfig.json
│ └── ...
├── history-simulation/
│ ├── package.json
│ ├── tsconfig.json
│ └── ...
├── wrong-asnwer/
│ ├── package.json
│ ├── tsconfig.json
│ └── ...
├── purpose.md
└── README.md
- This repository is primarily an examples and experimentation workspace.
- Each example installs its own dependencies, so there is no shared root
package.json. - The terminal agent can run arbitrary shell commands, so use it carefully in trusted environments.