Skip to content

Releases: lloyal-ai/sdk

v1.7.0

19 Apr 06:16

Choose a tag to compare

What's Changed

Full Changelog: v1.5.8...v1.7.0

v1.5.7

05 Apr 02:39

Choose a tag to compare

Full Changelog: v1.5.6...v1.5.7

v1.5.1

28 Mar 15:00

Choose a tag to compare

lloyal-sdk v1.5.1

Breaking Changes

AgentResult.findingsAgentResult.result

The agent's output field is renamed across the framework. All harnesses reading pool results need to update:

// Before
pool.agents[0].findings

// After
pool.agents[0].result

FindingsSourceResultSource

The provenance type, getter, and setter are renamed:

  • Agent.reportFindings()Agent.reportResult()
  • Agent.findingsSourceAgent.resultSource

reportPromptextractionPrompt

The pool option for scratchpad extraction is renamed on AgentPoolOptions and SpawnAgentsOpts:

// Before
yield* spawnAgents({ ..., reportPrompt: REPORT });

// After
yield* spawnAgents({ ..., extractionPrompt: REPORT });

ReportTool schema: findingsresult

The terminal tool's JSON schema parameter is renamed. Models now output {"result": "..."} instead of {"findings": "..."}.


New Features

Entailment Scoring

The reranker (0.6B cross-encoder, own context, zero inference KV cost) now scores texts against the original query during research — preventing thread drift where agents follow lexically similar but semantically irrelevant threads through recursive delegation.

Entailment fires at steering boundaries only:

  • Web search results — reranked by entailment before the agent sees them
  • Delegation boundary — proposed sub-questions filtered if they don't entail from the original query

Content boundaries (fetch_page chunks, corpus search results) use agent-local scoring only — preserving serendipitous discovery of bridging content that produces hypothesis-driven investigation.

const scorer = source.createScorer(query);
yield* spawnAgents({ tools: source.tools, scorer, ... });

Reranker.scoreBatch()

New method for scoring raw text strings without the Chunk abstraction. Tokenizes internally, batches up to nSeqMax prompts per decode.

Source.createScorer() Factory

Sources create immutable EntailmentScorer instances per query. No mutable state on Source — safe across concurrent pools.

interface EntailmentScorer {
  scoreEntailmentBatch(texts: string[]): Promise<number[]>;
  shouldProceed(score: number): boolean;
}

alsoOnPage Discovery Signal

FetchPageTool now returns headings of chunks that didn't make the top-K cutoff — lightweight topic signals (~50 tokens) for hypothesis formation without KV cost.

{
  "content": "...top-K relevant chunks...",
  "alsoOnPage": ["Unified memory architecture", "Draft model sizing"]
}

URL Dedup Cache

BufferingFetchPage caches fetched results per URL. Same URL fetched by multiple agents returns the cached result. Cache cleared on source.bind().

Entailment Trace Events

New trace types for debugging entailment decisions:

  • entailment:search — scores and ordering before/after reranking
  • entailment:search:reordered — final result order
  • entailment:delegate — per-task scores and kept/rejected decisions

Bug Fixes

  • BufferingFetchPage context forwarding — now passes context to super.execute(), fixing broken progress reporting
  • Reranker nBatch sizing — set to floor(nCtx / nSeqMax) instead of default 512, preventing decode::scatter failures on long reranker prompts
  • Sequential scoreBatch calls — removed Promise.all that caused concurrent llama_context access
  • TUI agent:report event — fixed ev.findingsev.result crash in agent-view.ts

Infrastructure

  • 85 unit tests via vitest — Agent state machine, AgentPolicy decisions, EntailmentScorer factory, prompt composition, entailment gate logic, architectural boundary discipline
  • CI integrationunit-tests job in GitHub Actions, runs on every push/PR