@latimer-woods-tech/agent
v0.8.0
Published
Cloudflare-native LLM agent runtime for the Factory platform. One hardened orchestration engine — tool registry, reasoning loop, memory, guardrails — that powers the vertical SaaS products (Voice, Video, Astrology).
Readme
@latimer-woods-tech/agent
Cloudflare-native LLM agent runtime for the Factory platform. One hardened orchestration engine — tool registry, reasoning loop, memory, guardrails — that powers the vertical SaaS products (Voice, Video, Astrology).
See docs/architecture/AGENT_RUNTIME.md
for the full design.
Status
Incremental build (Agent Runtime plan, Phase 2):
- ✅ Tool registry — the shared seam between the deterministic supervisor planner and the LLM reasoning loop.
- ✅ Reasoning loop — tier/scope/schema enforcement, quarantined receipts, provider-aware budgets, and explicit failure states.
- ⏳ Memory tiers (working / episodic / semantic)
- ⏳ Agent recipes + gateway
Tool registry
import { ToolRegistry, type Tool } from '@latimer-woods-tech/agent';
const registry = new ToolRegistry();
registry.register({
name: 'humandesign.read.blueprint',
description: 'Fetch a blueprint by id',
side_effects: 'read-external',
required_scope: 'read',
parameters: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'], additionalProperties: false },
invoke: async (slots) => ({ ok: true, result: await fetchBlueprint(slots.id) }),
});
// Deterministic planner path — match by name, filter by trust tier.
registry.byTier('green');
// LLM path — only schema-bearing, opted-in tools, optionally tier-scoped.
const tools = registry.llmTools('green'); // → pass to @lwt/llm complete({ tools })A tool with parameters (JSON Schema) is offered to the LLM by default; omit
parameters for a template-only tool, or set exposeToLLM: false to keep a
schema'd tool off the LLM surface.
Every loop invocation supplies controller-owned grantedScopes and may narrow
the registry further with allowedTools. Mutations additionally require a
controller-issued runId and durable journal; completed calls replay their
sanitized receipts, while pending/unknown outcomes escalate without reinvocation.
