Add comprehensive documentation and guides for Cycles#36
Merged
Conversation
…tegration, and operations Tier 1 (Adoption): - What is Cycles? overview page with code examples - End-to-end tutorial (zero to budget-guarded LLM call) - Cost estimation cheat sheet with provider pricing tables - Troubleshooting and FAQ - Integration guides: Vercel AI SDK, Express, AWS Bedrock, Google Gemini Tier 2 (Developer Experience): - Migration guide for existing applications - SDK pattern selection guide (decorator vs programmatic vs streaming) - Common budget patterns (per-user, per-conversation, model-tier, team rollups) - 3 new incident patterns: retry storms, concurrent overspend, scope misconfiguration Tier 3 (Operations): - Production operations guide (Redis HA, scaling, upgrades, runbooks) - Monitoring and alerting guide (metrics, Prometheus rules, dashboards) - Security hardening guide (network isolation, Redis AUTH, key rotation) - Changelog page Also updates: - Landing page with improved hero, tagline, and navigation - VitePress sidebar with new Integrations and Operations sections - Nav bar quickstart link points to new overview page https://claude.ai/code/session_016sFHtxX3RSCvHyu7eV4nuH
- Fix migration guide: dry_run=True on @cycles decorator skips function execution (returns DryRunResult), not shadow observation. Replace with correct pattern using the decide endpoint for non-blocking observation. - Fix troubleshooting: remove incorrect async_cycles import. Python @cycles decorator auto-detects sync/async functions. Add AsyncCyclesClient note. https://claude.ai/code/session_016sFHtxX3RSCvHyu7eV4nuH
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 adds extensive documentation and guides for the Cycles budget governance system, including quickstart tutorials, operational guides, integration patterns, and incident postmortems. The documentation covers deployment, configuration, integration with various LLM providers, and production best practices.
Key Changes
New Quickstart Guides:
quickstart/what-is-cycles.md- Introduction to Cycles concepts and the reserve-commit lifecyclequickstart/end-to-end-tutorial.md- Complete 10-minute tutorial from zero to a working budget-guarded LLM call, including Docker Compose setup, tenant creation, budget funding, and sample applications in Python and TypeScriptOperational & Production Guides:
how-to/production-operations-guide.md- Redis configuration, persistence, HA setup, Cycles Server configuration, network architecture, and monitoringhow-to/monitoring-and-alerting.md- Key metrics (budget utilization, reservation lifecycle, server health), alerting thresholds, and observability patternshow-to/security-hardening.md- Network isolation, Redis security, API key management, least-privilege permissions, and audit loggingIntegration Guides:
how-to/integrating-cycles-with-express.md- Middleware and inline patterns for Express.js applicationshow-to/integrating-cycles-with-vercel-ai-sdk.md- Integration with Vercel AI SDK for Next.js streaming applicationshow-to/integrating-cycles-with-aws-bedrock.md- Non-streaming and streaming patterns for AWS Bedrockhow-to/integrating-cycles-with-google-gemini.md- Integration with Google Gemini APIPractical How-To Guides:
how-to/choosing-the-right-integration-pattern.md- Decision tree and comparison of decorator, streaming adapter, middleware, and programmatic client patternshow-to/cost-estimation-cheat-sheet.md- USD_MICROCENTS unit explanation, provider pricing reference tables, and quick estimation formulashow-to/common-budget-patterns.md- Recipes for per-user daily budgets, per-conversation budgets, model-tier budgets, and team-level rollup budgetshow-to/adding-cycles-to-an-existing-application.md- Incremental adoption path with shadow mode, wrapping individual calls, and expanding coveragehow-to/troubleshooting-and-faq.md- Common issues (budget exceeded, TTL expiry, idempotency mismatches) with solutionsIncident Postmortems:
incidents/scope-misconfiguration-and-budget-leaks.md- Failure mode from inconsistent scope configurationincidents/retry-storms-and-idempotency-failures.md- Unbounded retry loops causing overspendincidents/concurrent-agent-overspend.md- Race conditions with concurrent agents sharing budgetsReference:
changelog.md- Release history and protocol specification summary for v0.1.23Documentation Site Updates:
.vitepress/config.tsto reorganize navigation and add new guide sectionsindex.mdhomepage with improved tagline and call-to-actionNotable Implementation Details
https://claude.ai/code/session_016sFHtxX3RSCvHyu7eV4nuH