Add LangChain.js integration guide and expand incident documentation#66
Merged
Add LangChain.js integration guide and expand incident documentation#66
Conversation
…de, SEO, and UX - Add glossary page with key Cycles terminology - Expand three thin incident pattern pages with detection, monitoring, TypeScript examples, and severity/impact sections - Add LangChain.js (TypeScript) integration guide - Add integrations overview landing page with comparison table - Add TypeScript streaming examples to streaming guide - Add apple-touch-icon, web app manifest, and per-page canonical URLs - Create custom 404 page - Uncollapse Integrations sidebar section - Add LangChain.js to sidebar navigation https://claude.ai/code/session_01LVeAZGvccG11HfdcBGqECM
… table - LangChain.js guide: fix CyclesClient calls to use snake_case wire format (idempotency_key, ttl_ms, tokens_input, tokens_output) instead of camelCase; remove invalid subject param from reserveForStream; simplify error handling to match documented TS patterns - manifest.json: align name/description with config.ts (use "Cycles" and matching description) - Integrations overview: fix OpenAI/Anthropic to Python-only (not Python+TypeScript); fix Express streaming=Yes; fix FastAPI pattern to Middleware/Decorator; fix OpenClaw pattern to Plugin https://claude.ai/code/session_01LVeAZGvccG11HfdcBGqECM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR expands the Cycles documentation with a comprehensive LangChain.js integration guide and significantly enhances incident documentation with TypeScript examples, severity analysis, detection strategies, monitoring rules, and testing patterns.
Key Changes
New Documentation
LangChain.js Integration Guide (
how-to/integrating-cycles-with-langchain-js.md): Complete guide for adding budget governance to LangChain.js applications using a customCyclesBudgetHandlercallback handler that wraps every LLM call with Cycles reservations. Includes examples for chat models, agents with tools, and streaming responses.Glossary (
glossary.md): Comprehensive definitions of key Cycles concepts including Budget Authority, Reservation, Commit, Release, Estimate, Decide, Scope, Subject, Three-Way Decision, Overage Policy, and Units.Integrations Overview (
how-to/integrations-overview.md): High-level overview of all supported Cycles integrations across LLM providers, frameworks, and web servers with language support and streaming capabilities.404 Page (
404.md): Custom 404 error page with navigation to key documentation sections.Web App Manifest (
public/manifest.json): PWA manifest for installable documentation site.Enhanced Incident Documentation
Concurrent Agent Overspend (
incidents/concurrent-agent-overspend.md):Retry Storms and Idempotency Failures (
incidents/retry-storms-and-idempotency-failures.md):withCycleswrapperScope Misconfiguration and Budget Leaks (
incidents/scope-misconfiguration-and-budget-leaks.md):Enhanced How-To Guides
Handling Streaming Responses with Cycles (
how-to/handling-streaming-responses-with-cycles.md):reserveForStreampattern for streaming responsesConfiguration Updates
VitePress Config (
.vitepress/config.ts):Notable Implementation Details
runIdto track concurrent reservations, ensuring proper lifecycle management for multi-turn agentshttps://claude.ai/code/session_01LVeAZGvccG11HfdcBGqECM