Skip to main content

Introduction

Welcome to the technical documentation for ObjectWeaver. This site contains guides, API references, and examples to help you build schema-driven AI systems.

Philosophy: Structure is the New Bottleneck

ObjectWeaver is built on a core observation: AI inference costs are declining rapidly.

As models become cheaper and faster, the primary challenge in building AI applications isn't generating intelligence—it's harnessing it. The bottleneck has shifted from inference to structure.

ObjectWeaver bridges this gap by treating schemas as the primary interface. You define the structure you need, and the engine handles the orchestration required to fill that structure with high-quality, validated data from the most appropriate models.

Technical Overview

ObjectWeaver is a schema-first LLM orchestration engine. It sits between your application and LLM providers (OpenAI, Anthropic, etc.), ensuring that every response you receive is valid, structured JSON that matches your exact schema definition.

How it works

  1. Define: You send a JSON schema (Definition) describing the data structure you need.
  2. Orchestrate: ObjectWeaver analyzes the schema, breaking it down into independent or dependent fields.
  3. Route: Each field is routed to the specified model (e.g., gpt-3.5-turbo for simple fields, gpt-4 for complex reasoning).
  4. Validate: The engine validates the output of each field against its type definition.
  5. Assemble: The final result is assembled into a single JSON object and returned to your client.

Key Features

  • Guaranteed JSON: Never write regex to parse LLM output again.
  • Field-Level Routing: Optimize costs by using cheaper models for simpler fields.
  • Parallel Execution: Independent fields are generated concurrently for lower latency.
  • Context Isolation: Each field sees only what it needs, preventing context window pollution.

A Brief History

ObjectWeaver began as a solution to a practical problem encountered during a dissertation at the University of Bath in 2024. The project involved generating complete books by breaking them down into a hierarchical structure of chapters, pages, and sections.

At the time, reliable JSON generation from LLMs was a significant challenge. Existing methods often produced malformed output, leading to application failures. ObjectWeaver was built to solve this by guaranteeing syntactically correct JSON through a schema-driven approach. It has since evolved into a full orchestration service that enables composable intelligence, model routing, and complex workflows.

Next Steps