FP

fmxexpress/pasclaw

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

64 stars 质量 80 趋势 34MIT

超轻量级原生AI代理框架,完全用Object Pascal编写,适用于Delphi和Free Pascal,设计注重性能、可移植性和可扩展性。

概览

PasClaw 是一款用 Delphi Object Pascal 编写的超轻量级个人 AI 代理。它是一个受 picoclaw 启发的 Delphi/FPC 移植版,具备命令行助手、工具调用、MCP 集成、HTTP 网关、兼容 OpenAI 的 API 表面、小型嵌入式 Web UI、调度任务、技能和通道集成。 主程序位于 src/pasclaw/PasClaw.dpr。它初始化终端颜色处理,打印横幅,应用时区配置,并将调度到根据 src/cmd/ 实现的命令树中。 —— 在不本地建造的情况下,尝试 PasClaw 最快的方法: 镜像的入口会帮你运行 Pasclaw,所以只传递子命令(agent、serve、...)——或者什么都不传,这样才会启动网关。网关的网页界面有首次启动引导向导,所以你只需选择一个提供者,然后在浏览器中粘贴一个键——命令行里没有。要在多次运行中保持配置 + 工作空间,可以添加 -v “$HOME/.pasclaw:/home/pasclaw/。

概述(AI 翻译)

PasClaw 是一款用 Delphi Object Pascal 编写的超轻量级个人 AI 代理。它是一个受 picoclaw 启发的 Delphi/FPC 移植版,具备命令行助手、工具调用、MCP 集成、HTTP 网关、兼容 OpenAI 的 API 表面、小型嵌入式 Web UI、调度任务、技能和通道集成。

主程序位于 src/pasclaw/PasClaw.dpr。它初始化终端颜色处理,打印横幅,应用时区配置,并将调度到在 src/cmd/ 下实现的命令树中。

快速开始

Docker——尝试PasClaw且无需本地构建的最快方法:

镜像的入口点为你运行 pasclaw,所以只需传递子命令(agent、serve, …)——或者什么都不传,从而启动网关。网关的网页界面有首次启动引导向导,你需要选择一个提供者并在浏览器中粘贴一个键——命令行中没有任何操作。为了让配置文件 + 工作空间在多个运行间保持一致,可以添加 -v "$HOME/.pasclaw:/home/pasclaw/.pasclaw"(容器的 PASCLAW_HOME,由其 pasclaw 用户拥有)。更多信息请参见 docker/README.md。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

PasClaw

PasClaw is an ultra-lightweight personal AI agent written in Delphi Object Pascal. It is a Delphi/FPC port inspired by picoclaw, with a command-line assistant, tool calling, MCP integration, an HTTP gateway, an OpenAI-compatible API surface, a small embedded web UI, scheduled tasks, skills, and channel integrations.

The main program lives at src/pasclaw/PasClaw.dpr. It initializes terminal color handling, prints the banner, applies timezone configuration, and dispatches into the command tree implemented under src/cmd/.

Quick start

Docker — the fastest way to try PasClaw without building anything locally:

docker pull fmxexpress/pasclaw

# HTTP gateway + web UI on http://localhost:8088 -- onboard right in the browser.
# The image's default command already runs the gateway, so no arguments needed.
docker run -p 8088:8088 fmxexpress/pasclaw

# Interactive CLI agent (run `pasclaw onboard` inside, or set a provider key)
docker run -it fmxexpress/pasclaw agent

The image’s entrypoint runs pasclaw for you, so pass only the subcommand (agent, serve, …) — or nothing, which starts the gateway. The gateway’s web UI has a first-boot onboarding wizard, so you pick a provider and paste a key in the browser — nothing on the command line. To keep config + workspace across runs, add -v "$HOME/.pasclaw:/home/pasclaw/.pasclaw" (the container’s PASCLAW_HOME, owned by its pasclaw user). See docker/README.md for more. (This runs PasClaw itself in a container — distinct from the optional Docker shell-backend, which runs the model’s shell_exec calls inside a throwaway container for a stronger sandbox.)

Native binary — build the single ~4–5 MB binary (no runtime deps beyond libsqlite3 and OpenSSL):

make get-indy && make          # FPC  -> build/pasclaw
pasclaw onboard                # pick a provider, paste a key, choose options
pasclaw agent                  # start chatting

See Build for Delphi / cross-compile / Windows-on-ARM.

Features

LLM providers — ~26-entry catalog covering Anthropic Messages, OpenAI Chat Completions, Google Gemini generateContent, plus OpenAI-protocol-compatible providers (Groq, DeepSeek, Mistral, Cerebras, OpenRouter, Zhipu, Qwen, Moonshot, MiniMax, NVIDIA NIM, Novita, MiMo, VolcEngine, xAI/Grok, Perplexity, Ollama, LM Studio, vLLM, LiteLLM) and three Cloudflare AI Gateway fronts (cloudflare, cloudflare-anthropic, cloudflare-gemini). The full list lives in src/pkg/providers/PasClaw.Providers.Catalog.pas; adding a provider is a one-record append. Streaming SSE on all three protocol families; native search grounding on Gemini; citation collation on Perplexity. Code-driven SetProvider('anthropic', $ANTHROPIC_API_KEY) for embedders so no ~/.pasclaw/config.json is required.

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add fmxexpress/pasclaw
新手?先看 mcpskill.org 教程 →