Заметки о разработке

Как работает бэкенд

Тридцать решений, которые формируют наш бэкенд агентов: как они работают, почему мы их приняли и что выяснилось. Код и примеры.

RSS4 написано · 26 в плане
4 написано · 26 в плане

Модели решений и оркестрация

01–073/7
#02intermediate

Не каждый аргумент tool требует своей модели

Аргументы инструмента не равноценны: часть берётся из кода, часть — одним решением, часть пишет чат-модель.

#03advanced

Guardrail, который редактирует action space

В повторе метки end_agent_run уже нет, а причина названа прямо. System prompt не меняется.

#04В плане

A Dedicated DECISION Model Role

Why decisions are their own harness role with separate MANAGED and BYOK semantics.

llm-config.service.ts
#05В плане

Decision-Field Extraction Before the Agent

Pre-compute stated choice fields outside the ReAct loop and attribute them to the extractor.

decision-fields-extraction.agent.ts
#06В плане

Two Retry Layers, Fresh Checkpoint Namespaces

Model retries and whole-editor-run retries, with |retry-N isolating failed attempts.

skill-editor-run.ts
#07В плане

Hiding Helper-Model Internals Twice Over

Wire-level reasoning suppression plus the langsmith:nostream tag.

skill-builder-thread.service.ts

Собственный протокол агентов

08–151/8
#08advanced

События LangGraph v3 — ещё не ваш API: projection, replay и retraction

streamEvents в LangGraph v3 помечен как экспериментальный и заточен под движок. Над ним собран типизированный протокол: Socket.IO rooms, replay и retraction.

event-replay
#09В плане

Feature Descriptors as the Transport Contract

One descriptor declares the bus channel, WS event, room prefix and scope.

realtime-event-bus.ts
#10В плане

Subagent Attribution From a Namespace Tree

Deepest-prefix matching on checkpoint namespaces attributes nested delegated runs.

helpers.ts
#11В плане

Retract Streamed Messages by ID

Accumulate deltas per messageId, discard the abandoned bubble, commit only the keeper.

event-transformer.ts
#12В плане

Live-Only Notices vs Append-Only Replay

What the UI shows is not what the log stores — and both share the same sequence.

realtime-event-bus.ts
#13В плане

Event-Time Stamping for Coherent Replay

Stamp backend-generated events with the last engine timestamp so replay order holds.

skill-builder-thread.service.ts
#14В плане

Typed Human-in-the-Loop Over Untyped Channels

Resume correlation, decision validation and re-seeded tool calls on interrupt.

pending-interrupt.ts
#15В плане

Joining Callback Spans to Protocol Events

A one-shot map turns a tool card into a deep link to its exact trace span.

tool-run-bridge.ts

Детерминизм вне агента

16–200/5
#16В плане

A Middleware That Stops Tool Loops

Canonical argument comparison blocks repeated successful calls; failed retries stay legal.

tool-loop-guard.ts
#17В плане

Hiding Internal Pricing From the LLM

Data minimization as a hallucination and exfiltration defense.

business-catalog-tools.ts
#18В плане

Compiled Rules That Can Replace a Model Reply

Plugin hooks return jumpTo and result; side effects are once-guarded and fail open.

agent-plugin-middleware.ts
#19В плане

Explainability for Non-LLM Decisions

PLUGIN_EFFECT and PLUGIN_OUTCOME events with stable pluginCallId and source path.

agent-plugin.schema.ts
#20В плане

Media Understanding as an Honest Pre-Step

Typed skip reasons rendered into the prompt instead of pretending extraction happened.

media-understanding.service.ts

Версионирование, генерация кода и песочница

21–280/8
#21В плане

Git-Like Releases in MongoDB With CAS

Immutable revisions, append-only file maps and a compare-and-swap environment pointer.

business-code-base-storage.service.ts
#22В плане

Per-Thread Copy-on-Write Workspaces

A conversation owns a pointer map; opening it copies ObjectIds, not bytes.

skill-builder-thread-storage.ts
#23В плане

Commit as an Optimistic Transaction

Source guard, artifact validation, a deterministic test suite, release, CAS, event log.

business-code-base-release.service.ts
#24В плане

Mark-and-Sweep GC for Immutable Releases

Reachability-based cleanup with event-log pinning and an in-flight merge cutoff.

business-code-base-environment.service.ts
#25В плане

Time-Travel Thread Forking

Branch an agent conversation by checkpoint, message or turn index — with rollback.

skill-builder-thread.service.ts
#26В плане

A VM Sandbox With Two Independent Timeouts

Allow-listed globals, no code generation, and a Promise deadline for async hooks.

skill-script-runner.service.ts
#27В плане

The Catalog Accessor as Capability and Audit Log

Every read becomes pricing provenance; direct data access is statically rejected.

skill-script-runner.service.ts
#28В плане

One Source of Truth: Zod → TypeScript → JS

Schema interfaces rendered into generated artifacts and validated on write.

skill-artifact-contract.ts

Наблюдаемость и самовосстановление

29–300/2
#29В плане

MongoDB as a Drop-In LangSmith Tracer

Keep LangChain run DTOs, swap the backend, derive lean summaries at read time.

langchain-observability.service.ts
#30В плане

Self-Healing Turn State

Lost-run detection, stale interrupt hiding and self-expiring retry notices.

live-turn-state.ts

Частые вопросы

Что здесь?
Тридцать разборов бэкенда QuotyAI. Каждый объясняет конкретное решение, показывает код и содержит пример, с которым можно поиграть.
Это блог?
Нет. Блог — это новости продукта. Здесь библиотека: одинаковая структура страниц, три языка и отдельная обложка.
Нужно ли знать LangChain?
Нет. Каждая статья начинается с проблемы простыми словами и объясняет только нужные детали фреймворка.