Get Autonomous AI Agents in Minutes: 5-Minute TypeScript Scaffolding Guide
Building an autonomous agent used to require weeks of configuring prompt templates, vector databases, callback chains, and sandboxes. With Smoke Monkey Harness, you can install one package, write 15 lines of TypeScript, and have an autonomous engineering agent executing tasks in under 5 minutes.
Get Autonomous AI Agents in Minutes: 5-Minute TypeScript Scaffolding Guide: Building an autonomous agent used to require weeks of configuring prompt templates, vector databases, callback chains, and sandboxes. With Smoke Monkey Harness, you can install one package, write 15 lines of TypeScript, and have an autonomous engineering agent executing tasks in under 5 minutes. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Zero Setup Friction: Install `smoke-monkey-harness` and immediately run multi-turn agent loops.
- Instant Tool Access: 24 tools for file viewing, editing, bash execution, and git operations available out of the box.
- Live Event Streaming: Easily pipe text deltas and tool events directly to the console or a React UI.
- Works with Any Provider: Plug in NVIDIA, Gemini, OpenAI, Claude, or local Ollama credentials.
import { createAgent } from 'smoke-monkey-harness';// Step 1: Initialize your autonomous agent in 15 secondsconst agent = createAgent({provider: 'gemini', // or 'nvidia', 'openai', 'anthropic', 'ollama'model: 'gemini-1.5-pro',workspacePath: process.cwd(),autoApprove: true,});// Step 2: Stream live progressagent.on('text.delta', (e) => process.stdout.write(e.data.delta));agent.on('tool.started', (e) => console.log(`\n⚡ Running: ${e.data.toolName}`));// Step 3: Run your task!const result = await agent.run('Inspect README.md and add a section on Getting Started');console.log(`\n\n✅ Completed in phase: ${result.phase}`);
Step 1: Install Smoke Monkey in Your Project
Open your terminal and install the harness using your preferred package manager. Since there are zero external dependencies, the installation completes almost instantly.
npm install smoke-monkey-harness# orpnpm add smoke-monkey-harness
Step 2: Set Your Provider API Key
Set your environment variable for whichever provider you prefer. Smoke Monkey supports all major model providers natively:
# Choose whichever model provider you have an API key for:export GEMINI_API_KEY="your-gemini-key"# orexport OPENAI_API_KEY="your-openai-key"# orexport ANTHROPIC_API_KEY="your-anthropic-key"# orexport NVIDIA_API_KEY="your-nvidia-key"
Step 3: Run Your First Autonomous Engineering Loop
Create a file named agent.ts and run it with npx tsx agent.ts. Watch the agent explore the codebase, plan its changes, surgically modify files, and verify the output.
Frequently Asked Questions
Q:Do I need to compile TypeScript or can I run directly with tsx?
You can run directly with `npx tsx agent.ts` or compile with `tsc`. Smoke Monkey is distributed with both CommonJS and ESModule exports and strict TypeScript declarations.
Q:How do I add a chat interface to this agent?
Install `@smoke-monkey/ui` to drop in our pre-built React chat canvas, which automatically hooks into agent events, tool streaming, and approval modals.
Related Alternatives & Comparisons
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.