namzu.aidocs

Getting Started

Install the published Namzu packages, choose a provider, and make the first successful request.

Namzu is organized as a core SDK plus published provider and capability packages. The shortest successful path is:

  1. install @namzu/sdk
  2. add exactly one provider package
  3. validate the provider with a direct chat() call
  4. move into a ReactiveAgent
  5. add optional capability packages such as @namzu/computer-use only when your runtime actually needs them

1. Choose Your Package Set

NeedPackage set
Core runtime, tools, registries, IDs, runtime loop@namzu/sdk
Direct OpenAI integration@namzu/openai
Direct Anthropic integration@namzu/anthropic
AWS-native Bedrock usage@namzu/bedrock
One account with many upstream vendors@namzu/openrouter
Generic OpenAI- or Anthropic-compatible endpoint@namzu/http
Local Ollama daemon@namzu/ollama
Local LM Studio server@namzu/lmstudio
Desktop screenshots and keyboard or mouse input@namzu/computer-use

2. Install the Minimum Set

OpenAI is a good first-run example:

pnpm add @namzu/sdk @namzu/openai zod

Add computer-use only if you need desktop interaction:

pnpm add @namzu/computer-use

3. Validate the Provider First

Before introducing agents, confirm the provider wiring works:

import { ProviderRegistry } from '@namzu/sdk'
import { registerOpenAI } from '@namzu/openai'
 
registerOpenAI()
 
const { provider, capabilities } = ProviderRegistry.create({
  type: 'openai',
  apiKey: process.env.OPENAI_API_KEY!,
  model: 'gpt-4o-mini',
})
 
console.log(capabilities)
 
const response = await provider.chat({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'Say hello in one sentence.' }],
})
 
console.log(response.message.content)

This step proves:

  • the provider package is installed
  • the package was registered correctly
  • credentials are valid
  • the chosen model can answer a basic request

4. Move Into an Agent Run

Once provider validation succeeds, move into the normal SDK runtime:

import {
  ProviderRegistry,
  ReactiveAgent,
  ToolRegistry,
  defineTool,
  generateProjectId,
  generateSessionId,
  generateTenantId,
} from '@namzu/sdk'
import { registerOpenAI } from '@namzu/openai'
import { z } from 'zod'
 
registerOpenAI()
 
const { provider } = ProviderRegistry.create({
  type: 'openai',
  apiKey: process.env.OPENAI_API_KEY!,
  model: 'gpt-4o-mini',
})
 
const tools = new ToolRegistry()
tools.register(
  defineTool({
    name: 'echo_text',
    description: 'Return the provided text for runtime validation.',
    inputSchema: z.object({ text: z.string() }),
    category: 'analysis',
    permissions: [],
    readOnly: true,
    destructive: false,
    concurrencySafe: true,
    async execute({ text }) {
      return { success: true, output: text }
    },
  }),
)
 
const agent = new ReactiveAgent({
  id: 'getting-started-agent',
  name: 'Getting Started Agent',
  version: '1.0.0',
  category: 'docs',
  description: 'Minimal runtime example for public docs.',
})
 
const result = await agent.run(
  {
    messages: [
      {
        role: 'user',
        content: 'Say hello, then call echo_text with the text runtime ok.',
      },
    ],
    workingDirectory: process.cwd(),
  },
  {
    provider,
    tools,
    model: 'gpt-4o-mini',
    tokenBudget: 8_192,
    timeoutMs: 60_000,
    projectId: generateProjectId(),
    sessionId: generateSessionId(),
    tenantId: generateTenantId(),
  },
)
 
console.log(result.result)

5. The Fields People Most Often Miss

The most common first-run omissions are:

  • forgetting to call registerOpenAI() or the matching provider helper
  • omitting projectId, sessionId, or tenantId
  • omitting workingDirectory
  • creating a provider without a default model and then forgetting params.model

If your goal is to get one agent running fast, those are the first things to verify.

6. Choose the Right Provider Path

Use these defaults unless deployment reality gives you a stronger constraint:

If you need...Read
The end-to-end first runtime example explained in more detailSDK Quickstart
Provider registration and direct provider-call surfacesSDK Provider Integration
Choosing between ReactiveAgent, PipelineAgent, RouterAgent, and SupervisorAgentSDK Agents
Persona layering and skill-file loadingSDK Prompting
Knowledge-base-backed retrievalSDK Retrieval
Persistent session, workspace, and delegation stateSDK Sessions
Required runtime IDs and when to reuse themRuntime Identities
Runtime fields and limit configRuntime Configuration
MCP or connector-based integration surfacesSDK Integrations
Tool definition and registry behaviorSDK Tools
Provider choice guidanceProvider Selection Guide

On this page