HeadlinesBriefing favicon HeadlinesBriefing.com

New C Library Brings AI Agents to Any Platform

Hacker News •
×

Adam is a new embeddable AI agent library written in C that aims to be "The SQLite of agent frameworks" — small, portable, and just works. The library provides a complete agent loop in a single #include, supporting tool calling, long-term memory, sessions, voice input/output, streaming responses, and structured JSON output. It works with major cloud providers including Anthropic, OpenAI, Google Gemini, Groq, Together, and xAI, alongside local GGUF models via llama.cpp.

The project compiles across macOS, Linux, Windows, iOS, Android, and WebAssembly. Developers can disable individual features through compile-time gates (ADAM_NO_CURL, ADAM_NO_LOCAL, ADAM_NO_SQLITE, etc.) to reduce binary size. The library includes 13 built-in tools for file I/O, shell execution, SQL queries, web fetching, and memory management. A hybrid BM25 plus vector search system handles long-term memory through SQLite extensions.

Perhaps most notably, Adam can be embedded directly inside SQLite and PostgreSQL as a SQL extension, allowing developers to query their databases using natural language. The agent reads the database schema, executes queries, and returns results — all through SQL functions like adam_ask() or adam_sql(). With MIT licensing and comprehensive documentation, this library with 161 tests offers a lightweight alternative to heavier agent frameworks for developers building AI-powered applications that need to run anywhere.