AI for Automation
Back to AI News
2026-03-19AI codingAndrew NgGitHubdeveloper toolsClaude Codeopen source

Andrew Ng's Context Hub stops AI from inventing code

Andrew Ng launched Context Hub — a tool that gives AI coding agents verified docs so they stop hallucinating. 10K GitHub stars in one week.


If you've used an AI coding assistant like Claude Code or GitHub Copilot, you've probably hit this wall: the AI confidently writes code using an API function that doesn't exist. Andrew Ng — one of the most influential figures in AI — just released a tool to fix exactly that problem.

Context Hub (or "Chub") is a free, open-source CLI tool that feeds your AI coding agent curated, version-checked documentation so it stops guessing and starts using real APIs. It's gained over 10,000 GitHub stars in its first week, with 5,600+ stars in the last 7 days alone.

Context Hub GitHub repository by Andrew Ng — curated docs for AI coding agents

Why AI agents keep hallucinating code

The core problem is simple: AI coding agents are trained on massive datasets, but APIs change constantly. A function that existed in version 2.0 might be renamed or removed in version 3.0. When your AI agent writes client.chat.create() but the real method is client.messages.create(), your code breaks — and you waste time debugging something the AI invented.

Context Hub solves this by giving agents a curated library of verified documentation they can fetch on demand. Think of it like giving your AI assistant a bookshelf of up-to-date manuals instead of letting it guess from memory.

The self-improving loop

What makes Context Hub more than just a documentation fetcher is its learning system. Here's how it works:

Without Context Hub: Agent searches the web → gets noisy results → writes broken code → forgets everything → repeats next session

With Context Hub: Agent fetches curated docs → writes working code → notes gaps and workarounds → gets smarter next session

When an agent discovers something the docs don't cover — like a workaround for a known bug — it can annotate that finding. Those notes persist locally and automatically appear the next time any agent fetches that documentation. Over time, your agent builds up institutional knowledge about your specific setup.

Agents can also rate documentation quality (thumbs up or down), and that feedback flows back to the doc maintainers. It's a feedback loop that makes the whole ecosystem better.

Three commands to get started

Context Hub installs with a single npm command and works with any AI coding agent:

# Install globally
npm install -g @aisuite/chub

# Search for documentation
chub search openai

# Fetch Python-specific docs
chub get openai/chat --lang py

# Agent adds a note for future sessions
chub annotate openai/chat "rate limit is 60/min on free tier"

It supports language-specific variants — so Python developers get Python examples, JavaScript developers get JavaScript examples. You only fetch what you need, saving tokens (which saves money if you're paying per API call).

Who should try this

If you use Claude Code, Cursor, or GitHub Copilot — Context Hub can slot right into your workflow. It integrates with Claude Code's skills system (storing docs in ~/.claude/skills/) so your agent automatically has access to verified references.

If you're building tools for developers — you can contribute documentation to the hub. It's all Markdown-based, open-source, and versioned. Your users' agents will stop hallucinating your API.

The bigger picture

Andrew Ng has been saying for months that the bottleneck in AI coding isn't the models — it's the context we give them. Context Hub is his team's answer: instead of making models smarter, make the information they receive more accurate.

The project is MIT-licensed, has 893 forks, 17 contributors, and 76 open pull requests — signs of an active and growing community. With Ng's name behind it and the practical problem it solves, expect this to become a standard part of the AI coding toolkit.

Related ContentGet Started with Easy Claude Code | Free Learning Guides | More AI News

Stay updated on AI news

Simple explanations of the latest AI developments