This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
gitgram-ai/aitimemachine/context7/docs/library-updates.mdx
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

61 lines
2.8 KiB
Plaintext

---
title: Keeping Libraries Fresh
description: How Context7 ensures library documentation stays fresh
---
Context7 automatically refreshes library documentation so that developers always receive accurate, up-to-date context in their coding environment. Here's how it works.
## Automatic Refresh
Every time a library is requested through Context7 — whether via the MCP server or the REST API — the system checks when the documentation was last updated. If it's older than a threshold based on the library's popularity, a background refresh is triggered automatically.
### Refresh Thresholds
The staleness threshold is based on each library's popularity rank in Context7:
| Popularity Rank | Refresh Threshold |
| --------------- | ----------------- |
| Top 100 | 1 day |
| Top 1,000 | 15 days |
| Top 5,000 | 30 days |
| All others | 45 days |
Popular libraries are refreshed more frequently because developers rely on them more heavily and they tend to get updated faster. Website libraries use a slightly higher threshold than the values above.
<Note>
The refresh is triggered in the background and does not affect the response time of your current request. You will receive the existing documentation immediately while the update runs asynchronously.
</Note>
## Manual Refresh
Logged-in users can manually trigger a refresh for any library directly from the library page on Context7 or via the [refresh API endpoint](/api-reference/refresh/refresh-a-library). This is useful when you know a library has just released a new version and want the updated documentation immediately, without waiting for the automatic cycle to complete.
Library owners who have [claimed their library](/howto/claiming-libraries) receive higher refresh rate limits, giving them more control over how frequently their documentation can be updated.
## What Triggers an Automated Refresh
A refresh is triggered when all of the following conditions are met:
- The library has been requested recently
- The documentation is older than the threshold for that library's popularity rank
If a library hasn't been requested recently, it won't be refreshed — keeping the system efficient and focused on actively used documentation.
<Note>
Private libraries are not refreshed automatically. To update a private library's documentation, trigger a manual refresh from the library page.
</Note>
## Supported Library Types
Automatic and manual refreshes work across all supported source types:
- **Git repositories** — re-parsed from the configured branch
- **Websites** — re-crawled from the base URL
- **OpenAPI specs** — re-fetched and re-indexed from the spec source
## Related
- [Adding Libraries](/adding-libraries)
- [Claim Your Library](/howto/claiming-libraries)
- [Managing Versions](/howto/claiming-libraries#managing-versions)