Agent-C:一个4KB的AI代理
Agent-C: a 4KB AI agent

原始链接: https://github.com/bravenewxyz/agent-c

一个用C语言编写的超轻量级AI代理,通过OpenRouter API通信并执行shell命令。 工具调用:通过AI回复直接执行shell命令。 优化二进制文件:macOS上为4.4KB (GZEXE),Linux上约为16KB (UPX)。 对话记忆:滑动窗口内存管理,以实现高效运行。 跨平台:macOS和Linux。 依赖:GCC编译器,curl命令行工具,OpenRouter API密钥。 macOS:gzexe(通常预装)。 Linux:upx(可选,用于压缩)。 构建系统会自动检测您的平台并应用最佳压缩: macOS:使用GZEXE压缩 → 4.4KB二进制文件。 Linux:使用UPX压缩 → 约16KB二进制文件。 设置您的OpenRouter API密钥:export OR_KEY=你的openrouter_api_key_here 复制我,无许可。

相关文章

原文

A ultra-lightweight AI agent written in C that communicates with OpenRouter API and executes shell commands.

Agent-C Preview

  • Tool Calling: Execute shell commands directly through AI responses
  • Optimized Binaries: 4.4KB on macOS (GZEXE), ~16KB on Linux (UPX)
  • Conversation Memory: Sliding window memory management for efficient operation
  • Cross-Platform: macOS and Linux
  • GCC compiler
  • curl command-line tool
  • OpenRouter API key
  • macOS: gzexe (usually pre-installed)
  • Linux: upx (optional, for compression)

The build system auto-detects your platform and applies optimal compression:

  • macOS: Uses GZEXE compression → 4.4KB binary
  • Linux: Uses UPX compression → ~16KB binary

Set your OpenRouter API key:

export OR_KEY=your_openrouter_api_key_here

Copy me, no licence.

联系我们 contact @ memedata.com