DocsQuickstart Tutorial
Developer Tutorial
Time to complete: ~60 seconds

Quickstart 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 Flow
01

60-Second Agent

Core Harness

Create an autonomous coding agent with NVIDIA or any OpenAI-compatible provider in 5 lines.

basic-agent.tstypescript
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 goal
const 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 & Gating

Intercept file edits and commands to ask user confirmation or route to your UI dialog.

permissions.tstypescript
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 commands
agent.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 developer
agent.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 UI

Provider-agnostic streaming chat canvas with tool cards, markdown, and charts.

ui-chat.tstsx
import { SmokeMonkeyChat, FetchTransport } from '@smoke-monkey/ui';
import '@smoke-monkey/ui/ui.css';
// Point at your backend SSE route
const 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">
<SmokeMonkeyChat
transport={transport}
theme="dark"
layout="coding"
features={{ reasoning: true, toolCalls: true, charts: true }}
/>
</div>
);
}
04

Connect via MCP

IDE Integration

Drive the harness from Claude Code, Cursor, Codex, or any Model Context Protocol host.

mcp-config.tsjson
// 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 Cloud

Run completely offline on Apple Silicon or Linux with zero keys and zero cloud latency.

ollama-local.tstypescript
import { createAgent } from 'smoke-monkey-harness';
const agent = createAgent({
provider: 'ollama',
model: 'qwen3:8b', // or llama3.1, deepseek-r1
baseUrl: '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);

Ready to dive deeper into the engine?

Learn how the 6-phase state machine prevents infinite hallucination loops.