Developer Tutorial
Time to complete: ~60 secondsQuickstart Guide
Get an autonomous engineering agent up and running in under 60 seconds. Zero external servers, zero databases, 100% strict TypeScript.
Agent Execution Pipeline
Interactive flow of how Smoke Monkey configures and executes tasks autonomously:
Quickstart Execution Pipeline
Pan & Zoom Interactive Flow01
60-Second Agent
Core HarnessCreate an autonomous coding agent with NVIDIA or any OpenAI-compatible provider in 5 lines.
import { createAgent } from 'smoke-monkey-harness';const agent = createAgent({provider: 'nvidia',model: 'nvidia/nemotron-3-super-120b-a12b',apiKey: process.env.NVIDIA_API_KEY,workspacePath: process.cwd(),});// Run an autonomous goalconst result = await agent.run('Find all deprecated express endpoints, update them, and run tests.');console.log('Result status:', result.status); // 'completed'
02
Human-in-the-Loop
Safety & GatingIntercept file edits and commands to ask user confirmation or route to your UI dialog.
import { createAgent } from 'smoke-monkey-harness';const agent = createAgent({provider: 'gemini',model: 'gemini-1.5-pro',apiKey: process.env.GEMINI_API_KEY,workspacePath: process.cwd(),permissions: 'ask-default', // or custom policy resolver});// Prompt approval before running dangerous terminal commandsagent.on('permission.required', async (event) => {const { toolCallId, toolName, args } = event.data;console.log(`Permission requested: ${toolName}`, args);const approved = await myUiConfirmationModal(toolName, args);agent.resolvePermission(toolCallId, approved ? 'allow' : 'deny');});// When the model needs clarification from the developeragent.on('ask_user.required', async (event) => {const answer = await promptUserInChat(event.data.question);agent.respond(event.data.toolCallId, answer);});
03
Drop-In Chat UI
Frontend UIProvider-agnostic streaming chat canvas with tool cards, markdown, and charts.
import { SmokeMonkeyChat, FetchTransport } from '@smoke-monkey/ui';import '@smoke-monkey/ui/ui.css';// Point at your backend SSE routeconst transport = new FetchTransport({url: '/api/agent-chat',buildRequest: ({ messages, model }) => ({headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ model, messages }),}),});export function AgentWorkspace() {return (<div className="w-full h-screen p-4 bg-obsidian"><SmokeMonkeyChattransport={transport}theme="dark"layout="coding"features={{ reasoning: true, toolCalls: true, charts: true }}/></div>);}
04
Connect via MCP
IDE IntegrationDrive the harness from Claude Code, Cursor, Codex, or any Model Context Protocol host.
// Place inside ~/.claude.json or project .mcp.json:{"mcpServers": {"smoke-monkey-harness": {"command": "npx","args": ["-y", "smoke-monkey-harness-mcp"]}}}// Inside Claude or Cursor prompt:// "Use harness_plan to design a coding assistant,// then scaffold it with harness_scaffold and verify with harness_verify."
05
Offline Local Ollama
Zero CloudRun completely offline on Apple Silicon or Linux with zero keys and zero cloud latency.
import { createAgent } from 'smoke-monkey-harness';const agent = createAgent({provider: 'ollama',model: 'qwen3:8b', // or llama3.1, deepseek-r1baseUrl: 'http://localhost:11434/v1',workspacePath: process.cwd(),});const result = await agent.run('Audit the dependencies in package.json.');console.log(result.messages.at(-1)?.content);