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

推荐订阅源

H
Heimdal Security Blog
P
Privacy International News Feed
S
Schneier on Security
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
Spread Privacy
Spread Privacy
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
K
Kaspersky official blog
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
aimingoo的专栏
aimingoo的专栏
Simon Willison's Weblog
Simon Willison's Weblog
S
Securelist
Help Net Security
Help Net Security
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Archives - TechRepublic
Security Archives - TechRepublic
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
雷峰网
雷峰网
博客园 - 司徒正美
V
V2EX
AWS News Blog
AWS News Blog
Know Your Adversary
Know Your Adversary
N
News | PayPal Newsroom
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
PCI Perspectives
PCI Perspectives
Google DeepMind News
Google DeepMind News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
U
Unit 42
C
Cybersecurity and Infrastructure Security Agency CISA
P
Palo Alto Networks Blog
G
Google Developers Blog
T
Threat Research - Cisco Blogs
博客园 - Franky
I
InfoQ
D
DataBreaches.Net
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Hacker News: Front Page

SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads GitHub - GainSec/AutoProber: Hardware hacker’s flying probe automation stack for agent-driven target discovery, microscope mapping, safety-monitored CNC motion, probe review, and controlled pin probing. Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Virginia Bans Sale of Geolocation Data Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Ancient DNA reveals pervasive directional selection across West Eurasia [pdf] AI cybersecurity is not proof of work Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. A Better Ludum Dare; Or, How to Ruin a Legacy GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Unexpected €54k billing spike in 13 hours: Firebase browser key without API restrictions used for Gemini requests Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent Codex Hacked a Samsung TV Tech Valuations Back to Pre-AI Boom Levels A perfectable programming language — Soter GitHub - halfwhey/claudraband: Claude Code for the Power User Partnership through Play: Investigating How Long-Distance Couples Use Digital Games to Facilitate Intimacy Textbooks and Methods of Note-Taking in Early Modern Europe (2008) Eternity in six hours: Intergalactic spreading of intelligent life (2013) Seven countries now generate 100% of their electricity from renewable energy Tell HN: OpenAI silently removed Study Mode from ChatGPT Pro Max 5x Quota Exhausted in 1.5 Hours Despite Moderate Usage Show HN: Oberon System 3 runs natively on Raspberry Pi 3 (with ready SD card) Tell HN: docker pull fails in spain due to football cloudflare block Bring Back Idiomatic Design No one owes you supply-chain security GitHub - xsawyerx/curl-doom: DOOM, played over cURL Apple update turns Czech mate for locked-out iPhone user The Grand Line Cache TTL silently regressed from 1h to 5m around early March 2026, causing quota and cost inflation Building a Z-Machine in the worst possible language The peril of laziness lost Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda AI Will Be Met With Violence, and Nothing Good Will Come of It GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The disturbing white paper Red Hat is trying to erase from the internet – OSnews NetBlocks (@netblocks@mastodon.social) The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong The FAA wants gamers to apply for air traffic control jobs Artemis II crew splashes down near San Diego after historic moon mission Why weekends are under threat We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Keeping a Postgres queue healthy — PlanetScale Serenity Forge (@serenityforge.com) Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? Uncharted island soon to appear on nautical charts The Problem That Built an Industry Fragments: April 2 Python Release Python install manager 26.1 Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Harness engineering: leveraging Codex in an agent-first world Apple Silicon and Virtual Machines: Beating the 2 VM Limit What have been the greatest intellectual achievements? The APL Programming Language Source Code
GitHub - sqliteai/adam: An embeddable cross-platform AI agent library written in C. Cloud and local LLMs, tool calling, long-term memory, voice, sessions, research mode, self-evolving loops. The SQLite of agent frameworks: small, portable, just works.
marcobambini · 2026-05-06 · via Hacker News: Front Page

Embeddable AI agent library in C.

Adam gives you a complete agent loop: tool calling, memory, sessions, voice, streaming, structured output, in one #include. Works with cloud APIs (Anthropic, OpenAI, Google Gemini, Groq, Together, xAI) and local models (llama.cpp) through the same interface. Compiles on macOS, Linux, Windows, iOS, Android, and WASM.

Quick Start

#include "adam.h"

int main(void) {
    adam_init();

    adam_settings_t *s = adam_create_settings();
    adam_settings_set_provider(s, ADAM_API_ANTHROPIC,
                               getenv("ANTHROPIC_API_KEY"),
                               "claude-sonnet-4-20250514");

    adam_history_t *h = adam_history_create();
    adam_run_result_t r = adam_run(s, h, "What is the capital of France?");

    printf("%s\n", r.final_response);  // "The capital of France is Paris."

    adam_run_result_free(&r);
    adam_history_destroy(h);
    adam_settings_destroy(s);
    adam_cleanup();
}
make deps    # build llama.cpp + whisper.cpp
make all     # build libadam.a
make test    # run 161 tests (ASan + UBSan)

Features

Feature Description
Agent loop Tool calling with automatic iteration until final response
Three providers Anthropic, OpenAI, Google Gemini + any compatible API + local GGUF via llama.cpp
Local vision Multimodal image understanding via llama.cpp + mmproj (Gemma 3, LLaVA, etc.)
Image generation Native image output via Gemini image models (gemini-3.1-flash-image-preview)
Database extensions SQLite and PostgreSQL extensions — embed Adam as SQL functions that query the same database
13 built-in tools File I/O, shell, calculator, SQL, web fetch/search, HTTP POST, memory, research, multi-agent
Long-term memory Hybrid BM25 + vector search via SQLite (sqlite-memory + sqlite-vector)
Session persistence Save/load conversations with UUIDv7 keys
Telegram bot Full-featured Telegram integration with text, voice, images, tools, and memory
Voice STT (Whisper cloud/local) + TTS (cloud/system) + full audio pipeline
Streaming Real-time token delivery via callback
Structured output adam_run_json() with validation and retry
Evolution loop Self-improving agent: iterate, score, refine strategy
Research mode Autonomous multi-iteration information gathering with report synthesis
Multi-agent Agent A invokes Agent B as a tool, with independent settings/tools
Guardrails Pre-send and post-receive validation callbacks
Response cache LRU hash table keyed on model + message history
History management Clone, summarize (LLM-based compression), token estimation
Thread pool Concurrent agent execution with job queue
Filesystem sandbox Tools restricted to explicitly allowed directories
Cross-platform macOS, Linux, Windows, iOS, Android, WASM (Emscripten)
Arena allocator Zero-leak per-iteration memory with automatic cleanup

Build

make deps          # Build llama.cpp, whisper.cpp (+ mbedtls/curl on Linux)
make all           # Build libadam.a
make test          # Build & run unit tests (ASan + UBSan)
make chat          # Interactive text chat (cloud API)
make chat GGUF=models/model.gguf  # Interactive text chat (local)
make vision GGUF=models/model.gguf MMPROJ=models/mmproj.gguf  # Local vision test
make talk          # Voice agent (cloud)
make talk LOCAL=1  # Voice agent (fully local)
make memory        # Memory system tests
make clean         # Remove all build artifacts

API Reference

Full API documentation with every function, type, and callback: API.md

Examples

adam_settings_t *s = adam_create_settings();
adam_settings_set_provider(s, ADAM_API_ANTHROPIC, api_key, "claude-sonnet-4-20250514");

adam_history_t *h = adam_history_create();
adam_run_result_t r = adam_run(s, h, "Explain quantum entanglement simply.");
printf("%s\n", r.final_response);
adam_run_result_free(&r);

// Continue the conversation — history carries forward
r = adam_run(s, h, "Can you give an analogy?");
printf("%s\n", r.final_response);
adam_run_result_free(&r);

adam_history_destroy(h);
adam_settings_destroy(s);

More examples are available in the examples/ directory:

Example Description
simple-conversation Multi-turn chat with a cloud API
tool-calling Register a custom tool and let the agent call it
local-model Run a local GGUF model via llama.cpp
local-vision Image understanding with a local vision model + mmproj
google-gemini Use Google Gemini models
image-generation Generate images with Gemini
sqlite-query Natural language queries on any SQLite database
structured-json Get validated JSON output with retry
memory Long-term memory with hybrid BM25 + vector search
sessions Save and restore conversations
streaming Real-time token streaming via callback
voice Speech-to-text + agent + text-to-speech pipeline
multi-agent Agent A delegates to Agent B as a tool
evolution Self-improving agent with scoring loop
research Autonomous multi-iteration research with report
filesystem-sandbox File and shell tools restricted to allowed directories
guardrails Pre-send and post-receive validation
response-cache LRU cache for repeated queries
thread-pool Concurrent agent execution
telegram Telegram bot with text, images, tools, and memory
wasm-chat Browser-based chat UI via WebAssembly
full-agent All features combined

Database Extensions

Adam can be embedded directly inside SQLite and PostgreSQL as a SQL extension. The agent can query the same database it's loaded in — ask questions in natural language, get answers from your data.

-- SQLite
.load adam

-- PostgreSQL
CREATE EXTENSION adam;

-- Configure (both)
SELECT adam_config('provider', 'anthropic');
SELECT adam_config('api_key', 'sk-ant-...');

-- Ask about your data — the agent reads the schema and runs SQL
SELECT adam_ask('How many users signed up last month?');
-- → "47 users signed up last month."

-- Generate SQL without executing
SELECT adam_sql('top 5 products by revenue');
-- → "SELECT p.name, SUM(oi.quantity * oi.price) AS revenue FROM ..."
Function Description
adam_config(key, val) Configure provider, API key, model (persisted)
adam(msg) Stateless one-shot chat
adam_ask(msg) SQL-aware agent — reads schema, queries data, multi-turn
adam_sql(question) Generate SQL from natural language
adam_create_session() Create session (auto-created on first adam_ask)
adam_get_session() Get current session UUID
adam_clear_session() Clear session and history

See extensions/sqlite/ and extensions/postgres/ for build instructions.

Architecture

adam_run() loop:
  build system prompt (identity + instructions + bootstrap files + memory + datetime)
  -> check guardrails (on_before_send)
  -> check cache
  -> dispatch LLM (mock | local/llama.cpp | remote/HTTP)
  -> check guardrails (on_after_receive)
  -> if tool_calls: execute tools -> append results -> loop
  -> if text: return final response -> auto-save session -> extract memory

Platform abstraction: macOS uses NSURLSession, Linux uses libcurl+mbedtls, WASM uses embedder-provided http_fn callback.

Memory management: Arena allocators for per-iteration zero-copy work. malloc/free for long-lived structures. Arena-allocated strings are only valid within the current iteration.

Feature Gates

Define before #include "adam.h" to disable features:

Gate Effect
ADAM_NO_CURL No libcurl (must provide http_fn callback)
ADAM_NO_LOCAL No llama.cpp (no local inference)
ADAM_NO_PTHREADS No thread pool, no voice thread
ADAM_NO_SQLITE No SQLite (no memory, sessions, or SQL tool)
ADAM_NO_VOICE No voice subsystem
ADAM_NO_FILESYSTEM No file_read/file_write/list_directory tools
ADAM_NO_SHELL No shell_exec tool

Dependencies

All vendored as git submodules in modules/:

Module Purpose
llama.cpp Local LLM inference + GGML compute
whisper.cpp Local speech-to-text (shares ggml via symlink)
miniaudio Cross-platform audio I/O
sqlite Amalgamation build
sqlite-memory Hybrid BM25 + vector knowledge store
sqlite-vector Vector similarity search
mbedtls TLS (Linux only)
curl HTTP (Linux only)

macOS uses system frameworks (Foundation, Security, Metal, AVFoundation, Accelerate) instead of curl/mbedtls.

License

MIT