Ghi chép từ quá trình xây dựng

Cách backend vận hành

Ba mươi quyết định tạo nên backend agent của chúng tôi — cách hoạt động, lý do chọn và điều chúng tôi học được. Kèm code và ví dụ.

RSS4 đã viết · 26 sắp tới
4 đã viết · 26 sắp tới

Mô hình quyết định & điều phối

01–073/7
#02intermediate

Không phải đối số tool nào cũng cần một mô hình riêng

Cách điền một đối số phụ thuộc vào dạng của nó: code tất yếu, một decision call, hoặc chat model.

#03advanced

Guardrail chỉnh sửa action space

Bỏ end_agent_run khỏi câu hỏi, hỏi lại và nêu rõ lý do. Viết prompt to hơn chẳng ích gì.

#04Dự kiến

A Dedicated DECISION Model Role

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

llm-config.service.ts
#05Dự kiến

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
#06Dự kiến

Two Retry Layers, Fresh Checkpoint Namespaces

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

skill-editor-run.ts
#07Dự kiến

Hiding Helper-Model Internals Twice Over

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

skill-builder-thread.service.ts

Giao thức agent tùy biến

08–151/8
#08advanced

Sự kiện LangGraph v3 chưa đủ làm API: projection, replay và retraction

streamEvents v3 vẫn mang nhãn thử nghiệm và phản ánh cấu trúc bên trong engine. Phía trên nó, chúng tôi dựng protocol có kiểu riêng với Socket.IO rooms, replay và retraction.

event-replay
#09Dự kiến

Feature Descriptors as the Transport Contract

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

realtime-event-bus.ts
#10Dự kiến

Subagent Attribution From a Namespace Tree

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

helpers.ts
#11Dự kiến

Retract Streamed Messages by ID

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

event-transformer.ts
#12Dự kiến

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
#13Dự kiến

Event-Time Stamping for Coherent Replay

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

skill-builder-thread.service.ts
#14Dự kiến

Typed Human-in-the-Loop Over Untyped Channels

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

pending-interrupt.ts
#15Dự kiến

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

Tính xác định bên ngoài agent

16–200/5
#16Dự kiến

A Middleware That Stops Tool Loops

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

tool-loop-guard.ts
#17Dự kiến

Hiding Internal Pricing From the LLM

Data minimization as a hallucination and exfiltration defense.

business-catalog-tools.ts
#18Dự kiến

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
#19Dự kiến

Explainability for Non-LLM Decisions

PLUGIN_EFFECT and PLUGIN_OUTCOME events with stable pluginCallId and source path.

agent-plugin.schema.ts
#20Dự kiến

Media Understanding as an Honest Pre-Step

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

media-understanding.service.ts

Phiên bản, tạo mã & môi trường an toàn

21–280/8
#21Dự kiến

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
#22Dự kiến

Per-Thread Copy-on-Write Workspaces

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

skill-builder-thread-storage.ts
#23Dự kiến

Commit as an Optimistic Transaction

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

business-code-base-release.service.ts
#24Dự kiến

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
#25Dự kiến

Time-Travel Thread Forking

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

skill-builder-thread.service.ts
#26Dự kiến

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
#27Dự kiến

The Catalog Accessor as Capability and Audit Log

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

skill-script-runner.service.ts
#28Dự kiến

One Source of Truth: Zod → TypeScript → JS

Schema interfaces rendered into generated artifacts and validated on write.

skill-artifact-contract.ts

Quan sát & tự phục hồi

29–300/2
#29Dự kiến

MongoDB as a Drop-In LangSmith Tracer

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

langchain-observability.service.ts
#30Dự kiến

Self-Healing Turn State

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

live-turn-state.ts

Câu hỏi thường gặp

Chuyên mục này là gì?
Ba mươi bài về backend QuotyAI. Mỗi bài giải thích một quyết định thật, cho thấy code và có ví dụ bạn có thể thử.
Có phải blog không?
Không. Blog là tin sản phẩm. Đây là thư viện tham khảo: cùng cấu trúc, ba ngôn ngữ và ảnh bìa riêng.
Có cần biết LangChain không?
Không. Mỗi bài bắt đầu bằng bài toán dễ hiểu, rồi chỉ giải thích phần framework cần thiết.