Documentation
@intelliforge/harness SDK
Eight TypeScript packages implementing the Code as Agent Harness taxonomy. MIT licensed. Install individually or compose a full harness stack.
Quick Start
npm install @intelliforge/harness-core @intelliforge/harness-memory @intelliforge/harness-tools
import { createHarness } from '@intelliforge/harness-core'
const harness = createHarness({
model: 'gpt-4o',
memory: { tiers: ['working', 'semantic'] },
})
await harness.run({ task: 'Summarize quarterly revenue from CSV' })Install All Packages
npm install @intelliforge/harness-core @intelliforge/harness-memory @intelliforge/harness-tools @intelliforge/harness-planner @intelliforge/harness-control @intelliforge/harness-multi @intelliforge/harness-india @intelliforge/harness-evalPackage Reference
@intelliforge/harness-coreHarness interface layer — createHarness(), PlanExecuteVerify loop
@intelliforge/harness-memory5-tier memory system — working, semantic, experiential, long-term, multi-agent
@intelliforge/harness-toolsTool use + registry — ToolRegistry, createTool(), VerificationTool
@intelliforge/harness-plannerPlanning mechanisms — LinearPlanner, StructuredPlanner, SearchPlanner
@intelliforge/harness-controlPEV loop + sandbox — SandboxedExecutor, PermissionTier, FeedbackRouter
@intelliforge/harness-multiMulti-agent orchestration — AgentRoles, SharedHarnessState, CollaborationMode
@intelliforge/harness-indiaIndia-first connectors — SarvamSTT, RazorpayTool, WhatsAppTool, ISTScheduler
@intelliforge/harness-evalEvaluation harness — HarnessEval, FinAgentEval, HarnessMetrics
Core Concepts
The PEV loop is the harness heartbeat. The planner decomposes a task into steps, the executor runs each step in a sandbox, and the verifier checks correctness against an oracle (tests, assertions, or a judge model). The loop repeats until the oracle passes or a budget is exhausted.
Working (in-context scratchpad), semantic (vector retrieval), experiential (skill distillation), long-term (persistent facts), multi-agent (shared state across roles). Each tier has a distinct write pattern and eviction policy.
Tier 0 read-only → Tier 1 local writes → Tier 2 tool calls → Tier 3 production deploy. The harness enforces tier escalation before dangerous actions, logged for audit.
Usage Examples
import { createHarness } from '@intelliforge/harness-core'
import { ToolRegistry, createTool } from '@intelliforge/harness-tools'
const registry = new ToolRegistry()
registry.register(createTool({
name: 'read_file',
fn: async ({ path }) => fs.readFileSync(path, 'utf8'),
}))
const harness = createHarness({ model: 'claude-sonnet-4-6', tools: registry })
const result = await harness.run({
task: 'Fix the failing unit test in src/billing.ts',
verifier: 'npm test -- --testPathPattern=billing',
})import { SemanticMemory } from '@intelliforge/harness-memory'
const memory = new SemanticMemory({ provider: 'neon-pgvector' })
await memory.store({ key: 'razorpay-webhook', content: handlerCode, tags: ['payments'] })
const hits = await memory.retrieve({ query: 'payment webhook handler', k: 3 })import { SarvamSTT, RazorpayTool, WhatsAppTool } from '@intelliforge/harness-india'
const stt = new SarvamSTT({ lang: 'hi-IN' })
const transcript = await stt.transcribe(audioStream)
const razorpay = new RazorpayTool({ keyId: process.env.RAZORPAY_KEY_ID })
const order = await razorpay.createOrder({ amount: 299900, currency: 'INR' })
const wa = new WhatsAppTool({ token: process.env.WA_TOKEN })
await wa.send({ to: '+919876543210', text: `Order ${order.id} created` })Evaluation
Measures oracle adequacy (does your test suite actually catch regressions?), plan efficiency (steps to completion), and memory hit rate. Run via npx @intelliforge/harness-eval.
Private benchmark for financial AI agents covering GST, TDS, Razorpay flows, and NDHM. Available on Pro and Enterprise plans.
import { HarnessEval } from '@intelliforge/harness-eval'
const report = await HarnessEval.run({
harness,
suite: './evals/billing.yaml',
metrics: ['oracle_adequacy', 'plan_efficiency'],
})
console.log(report.summary)Multi-Agent Roles
Owns the top-level goal, allocates subtasks to roles, and resolves conflicts in shared harness state.
Decomposes tasks into steps using LinearPlanner, StructuredPlanner, or SearchPlanner strategies.
Executes code generation and patching steps inside a SandboxedExecutor at the assigned permission tier.
Runs static analysis, diff review, and oracle adequacy checks before signalling verify-pass to the manager.
Executes the verifier suite, collects HarnessMetrics, and feeds failure traces back to the Planner.
Source & Examples
SDK packages ship from the IntelliForge Turborepo. GitHub repo goes live with ForgeOS Cloud Alpha.
View on GitHub