惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
P
Proofpoint News Feed
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
博客园 - Franky
V
V2EX
爱范儿
爱范儿
J
Java Code Geeks
小众软件
小众软件
Last Week in AI
Last Week in AI
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
酷 壳 – CoolShell
酷 壳 – CoolShell
The Register - Security
The Register - Security
GbyAI
GbyAI
Vercel News
Vercel News
Y
Y Combinator Blog
腾讯CDC
F
Fortinet All Blogs
I
InfoQ
N
Netflix TechBlog - Medium
B
Blog RSS Feed
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
Scott Helme
Scott Helme
T
Tor Project blog
U
Unit 42
Google Online Security Blog
Google Online Security Blog
PCI Perspectives
PCI Perspectives
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
aimingoo的专栏
aimingoo的专栏
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
Security Archives - TechRepublic
Security Archives - TechRepublic

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages GitHub - alejandrobalderas/claude-code-from-source: Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps AI and Tech brief: Ireland ascendant GitHub - Titovilal/context0: Context0 - Never Surrender Training for a Marathon with an AI Coach: What Worked and What Didn't Cyber Pulse: Agentic Intel - Apps on Google Play I Built an AI PR Reviewer That Catches Bugs by Not Looking for Bugs Gen Z workers are so fearful AI will take their job they’re intentionally sabotaging their company’s AI rollout | Fortune How AI Is Reimagining the Game of Golf–For Both Players and Courses GitHub - nattergabriel/reseed: A CLI tool for managing and distributing agent skills across projects Is SVG the final frontier? My AI workflow evolved from prompts to a near-autonomous workflow MLSharp Help - 3DGS Viewer & Generator I put my cognitive field based AI's runtime on GitHub Is Numble the first AI-proof game? A3: Kubernetes for autonomous AI agent fleets | Emergent Principles Deepali Vyas ("The Elite Recruiter") GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Unionized ProPublica staff are on strike over AI, layoffs, and wages Unleashing the Advantage of Quantum AI We're heading for an AI-fueled 'dementia crisis,' brain scientist warns The AI-Assisted Breach of Mexico's Government Infrastructure [pdf] GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. MSN GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs AI Code is Hollowing Out Open Source, and Maintainers are Looking the Other Way What leaked "SteamGPT" files could mean for the PC gaming platform's use of AI AI is the boss at this retail store. What could go wrong? GitHub - Wuzu11517/agentic-proxy: Local proxy meant to help reduce With Drones, Geophysics and ArtificiaI Intelligence, Researchers Prepare to Do Battle Against Land Mines A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - inevolin/resume-cli: Hit Claude usage limits? Resume any AI coding session elsewhere. Switch tools at zero friction. GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript This Startup Wants You to Pay Up to Talk With AI Versions of Human Experts Intel Arc Pro B70 Brings 32GB VRAM to Local AI for $949 WordPress 7.0: The Good, the AI, and the Still Missing AI on the couch: Anthropic gives Claude 20 hours of psychiatry IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures AI Agents Know About Supabase. They Don't Always Use It Right. The history and future of AI at Google, with Sundar Pichai Inside an AI‑enabled device code phishing campaign How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines AI for Systems: Using LLMs to Optimize Database Query Execution Forecasting the Economic Effects of AI Introducing Tinker: Play with AI, bring your ideas to life AI sheds light on an ancient gaming mystery People really hate AI but not as much as Iran—or Democrats | Fortune What is an AI Product Engineer? Phoebe Gates wants her $185 million AI startup to succeed with 'no ties to my privilege or my last name': 'I have a chip on my shoulder' | Fortune
How AI helps translate one OpenAPI spec into seven idiomatic SDKs
gjtorikian · 2026-05-08 · via Hacker News - Newest: "AI"

If you ship an API, you ship SDKs. At a minimum you have a Node SDK and a Python SDK; the moment you have enterprise customers, you add a Java SDK, a .NET SDK, a Go SDK, and more.

An SDK is more than just a typed wrapper around HTTP calls. It autopaginates resources so the caller doesn't have to handle it. It retries requests with jittering backoffs so a flaky network doesn't impede tasks. SDKs transparently exchange auth tokens, surface errors in the language's native exception, and gives callers caller compile-time confidence that the request shape is correct. The whole point is that a customer can integrate an API in a few lines of idiomatic code in their app, and never worry about the moving parts underneath.

Keeping all seven of our SDKs consistent used to be a manual task. Every new API endpoint meant updates to seven repositories. Each language has different naming conventions, type systems, package managers, linting rules, and expectations around what “idiomatic”  code looks like. This introduced a lot of repetitive engineering work, and worst of all, drift. One SDK exposed a parameter another forgot. Types would diverge.  Docs would go stale.

We needed a single source of truth that could produce well-tested SDKs in every target language without requiring a team of polyglot engineers to babysit each one. So, we built a generation pipeline that generates them from a single OpenAPI spec, with AI doing the heavy lifting on language-specific translations.

Why not existing tools?

To their credit, autogeneration platforms have done incredible work in this space. But above all else, we're an API company at our core. Our OpenAPI spec is a first-class product artifact, not an afterthought.

Generic autogeneration tools optimize for breadth: any spec, any language, any opinion. Their job is to be general, which means they cannot match your error model, your docstring style, your pagination shape. We need to own the pipeline end to end, so we can extend it as our API evolves, without waiting on a vendor's roadmap or relying on their solutions built around standards that don't match our own.

The toolchain: oagen and oagen-emitters

The core of our approach is two open source repositories that work together.

oagen is our OpenAPI generator framework. It parses our OpenAPI specification and produces a structured data model. It resolves $ref references, normalizes schemas, and produces a clean intermediate representation (IR) of our entire API surface.

oagen-emitters contains the language-specific emitters. It consumes oagen's IR and produces idiomatic code for target languages, complete with proper type annotations and docstrings.

Our SDK build pipeline runs from our openapi-spec repository. Whenever the spec changes, the generation pipeline kicks off, producing updated SDK code across all target languages. The spec is the source. The IR is the language-independent state. The emitters are the translators.

IMAGE: Left-to-right pipeline flow: a single document-shaped node on the far left representing a specification, feeding into a wide processing node in the center with a gear motif, which then fans out six thin arrows to six distinct smaller nodes on the right — each a different shape and color representing different language targets. Dark background with teal and amber highlights.

What the intermediate representation buys us

One of the less obvious wins in this architecture is the IR itself. Rather than passing raw OpenAPI YAML to each emitter, oagen produces a normalized, fully-resolved data model of the API surface. This matters for a few reasons.

First, it insulates emitters from OpenAPI's quirks. Real specs contain indirection and composition that make direct code generation awkward. oagen handles all of that once, centrally, so each emitter can work with clean, predictable data structures.

Second, it makes the IR a stable contract. Emitters depend on oagen's data model, not on the raw spec format. When OpenAPI evolves or our spec gains new patterns, we update the IR layer once rather than patching every emitter.

Third — and this is where it gets interesting for AI-assisted generation — the IR is structured data that Claude can reason about precisely. When we ask Claude to extend an emitter or translate a new API pattern, it's working with clean, well-typed objects rather than trying to parse YAML and make sense of reference chains and schema composition. That scoping improves output quality considerably.

Here's a representative slice of what that IR looks like, as a resolved operation ready for an emitter to consume:

  
{
   "name":"createOrganization",
   "method":"post",
   "path":"/organizations",
   "description":"Create a new organization.",
   "requestBody":{
      "type":"object",
      "properties":{
         "name":{
            "type":"string",
            "required":true
         },
         "external_id":{
            "type":"string",
            "required":false
         }
      }
   },
   "response":{
      "type":"Organization"
   }
}
  

The same shape in OpenAPI is much more verbose!

By the time an emitter sees this, all the hard work is done. The emitter — and Claude — can focus entirely on how to render this in the target language, not on unwinding OpenAPI indirection.

The structure of an emitter

Each emitter in oagen-emitters follows a consistent pattern. It receives the parsed OpenAPI data from oagen, walks the operations and schemas, and produces files that slot into the target SDK's directory structure. The emitters aren't just template substitutions: they make real decisions about how to represent API concepts in each language.

The Python emitter knows that an optional query parameter is a keyword argument with a None default. The Go emitter knows it's a pointer field on a struct. The Java emitter knows it's a fluent builder method. The emitter encodes each language's idioms into code. When new information shows up in the IR, every emitter renders it in each language's coherent pattern.

IMAGE: A three-column layout showing three abstract code-block shapes side by side, each in a different color — teal, amber, and violet. Each block has slightly different internal line patterns suggesting different code structures, but all three originate from a single glowing node above them connected by thin arrows. Minimal dark background.

(You can build your own emitter!)

Because oagen's IR is a stable, documented data model, it's not just for us. If you have a target language we don't yet support — or your own API needs reliable SDKs — you can write your own emitter against oagen's output.

The emitter interface is intentionally minimal: consume the IR, walk the operations and schemas you care about, emit files. You bring the language knowledge; oagen brings the parsed, normalized API surface.

Where Claude fits in

Claude is not the SDK's source of truth, and it doesn't invent API behavior.  Its job is far narrower.

Inside the .claude/ directories of these repositories, we've configured Claude as a development partner with specific skills and instructions tailored to the codebase.

The Claude configuration files define how AI assists with the generation process. Rather than asking a general-purpose LLM to "write me a Ruby SDK," we give Claude deep context about our specific patterns: our naming conventions, our error handling approach, our serialization strategy, and our testing requirements. The skills files act as persistent prompt engineering — they encode institutional knowledge about how WorkOS SDKs should look and behave.

Here's an excerpt from the skills file in oagen-emitters that shows how this works in practice:

  
## SDK Conventions
    
When generating or modifying SDK code, follow these rules:
    
### Naming
    
- Operation names map directly from `operationId` in the IR, converted to the target language's casing convention (camelCase for Node/Java, snake_case for Python/Ruby, PascalCase for Go exported identifiers).
- Resource names (e.g. `User`, `Organization`) are always singular and PascalCase in every language.
    
### Error handling
    
- All SDK methods must propagate errors as the idiomatic error type for the target language (thrown exceptions in Node/Python/Java/Ruby; returned `error` values in Go).
- HTTP 4xx responses from the API map to typed `WorkOSError` (or equivalent) instances that carry the status code and the `code` field from the JSON body.
    
### Pagination
    
- Any operation with `before`/`after` cursor parameters should generate a paginated list method that returns both the `data` array and a `ListMetadata` object with `before` and `after` cursors.
- Emitters for languages that support it should also generate an async iterator variant that handles pagination automatically.
    
### Docstrings
    
- Docstring content comes verbatim from the IR's `description` fields.
- Format for the target language: JSDoc for Node, reStructuredText for Python,  Javadoc for Java, GoDoc for Go, YARD for Ruby.
- Always document every parameter individually; do not collapse them.
  

This is a meaningful distinction from typical AI code generation. We're not generating code from scratch with zero constraints. We're using AI within a tightly scoped system where the OpenAPI spec defines what to generate and the emitter architecture plus Claude's skills define how to generate it. The AI operates within constraints that enforce consistency — the spec fixes the API surface, and the skills fix the language-specific conventions. Claude's output always stays within known boundaries.

SDKs that agents can actually use

A well-generated SDK with comprehensive, accurate docstrings is dramatically more useful to an AI coding agent than one that's hand-maintained and inconsistent. When a developer (or an agent) is trying to figure out how to call a WorkOS API from their codebase, they're often relying on their IDE or an AI assistant to surface the right method, explain its parameters, and show them what to expect back.

Our SDKs are designed with this in mind. Because every method's signature, parameter descriptions, and return types trace back to the same OpenAPI spec, the information is consistent and machine-readable. An agent implementing against our Node SDK gets the same conceptual model as one working with our Python SDK. That consistency makes it easier to write agents that can switch between SDK languages or help users who are working in an unfamiliar stack.

What this means for SDK quality

The result is consistency. When we add a new endpoint to our API, every SDK gets it at the same time with the same behavior. When we fix a bug in how we serialize a particular type, the fix propagates everywhere. Our SDKs are never more than one generation run away from parity with our API spec.

It also means our Developer Experience Engineers spend their time on the hard problems — optimizing for agents, handling edge cases that require human judgment, and improving the generation pipeline itself — instead of coding boilerplate across seven repositories.

Try it yourself

Both oagen and oagen-emitters are open source. If you're maintaining multiple client libraries and feeling the pain of keeping them in sync, the approach is worth studying even if your stack looks different from ours. The key insight isn't any specific tool; it's that a single source of truth combined with AI-assisted, language-aware code generation eliminates an entire class of SDK maintenance problems.

Our OpenAPI spec is public too. Take a look at the .claude/ directories in each repo to see how we've structured the AI-assisted workflow. The skills files are a practical example of how to give an LLM useful, scoped context instead of hoping it figures out your conventions on its own.