Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anqclaw

中文版本

anqclaw is a personal AI assistant built in Rust. It currently supports Feishu, HTTP, and CLI entry points, with multi-LLM collaboration, tool calling, persistent memory, and managed runtime support for real-world tasks.

Current Capabilities

  • Multiple LLM profiles: Anthropic, OpenAI-compatible, Ollama, and more
  • Agentic loop with tool calling and streaming responses
  • Multi-channel access: Feishu, HTTP API, and CLI
  • Skills mainline: candidate skills are exposed as structured <available_skills>, and the model reads SKILL.md on demand
  • Built-in tools: shell, web, file, memory, pdf_read, image_info, and custom tools
  • SQLite conversation history and long-term memory, with a source table plus FTS5 index mirror
  • Managed Python tasks: can prepare a workspace .venv and run scripts when needed when local uv is already installed
  • Default safety controls: supervised shell, file sandboxing, SSRF checks, and audit logging

Architecture Overview

Main flow:

Feishu/HTTP/CLI Channel -> Gateway -> AgentCore -> ToolRegistry/MemoryStore -> Channel

Core modules:

  • channel: Feishu, HTTP, and CLI input/output
  • gateway: routing, deduplication, rate limiting, and per-session serialization
  • agent: context assembly, environment probing, and the agentic loop
  • llm: provider abstraction and client implementations
  • tool: tool registration and execution
  • skill: multi-source skill scanning, candidate summaries, and hot reload
  • memory: SQLite-backed history and long-term memory
  • audit / metrics / scheduler: auditing, metrics, and background tasks

Skills Mainline

  • Skill packages use the directory form: skills/<name>/SKILL.md
  • Skill sources are merged in bundled -> user(~/.anqclaw/skills) -> workspace(<workspace>/skills_dir) order, with later sources overriding earlier ones
  • The agent uses description as an automatic candidate-matching signal, then refines ranking with keywords, trigger, extensions, recent file tokens, and workspace extensions before injecting readable locations through structured <available_skills>
  • When a skill is relevant, the primary path is for the model to read the corresponding SKILL.md through file_read; activate_skill remains only as a compatibility or debugging path
  • In serve mode, skill directories are hot-reloaded and the triggering file paths are logged for auditability

Deployment

Requirements:

  • A matching release binary for your OS and CPU architecture
  • A valid config file
  • Read/write access for the app directory and data directory
  • Network access to your LLM provider and channel integrations

Windows

Recommended path:

C:\anqclaw\anqclaw.exe

Optional: add C:\anqclaw\ to PATH.

With PATH:

anqclaw.exe onboard
anqclaw.exe config validate
anqclaw.exe serve

Without PATH:

C:\anqclaw\anqclaw.exe onboard
C:\anqclaw\anqclaw.exe config validate
C:\anqclaw\anqclaw.exe serve

As needed:

  • Install Microsoft Visual C++ Redistributable
  • Preinstall uv if you enable managed Python package installation with install_scope = "venv"; anqclaw will not download it automatically
  • Install Python/pip yourself when your prompts or custom tools rely on a non-managed interpreter
  • Install any external commands required by your prompts or custom tools

Linux

Recommended path:

/opt/anqclaw/anqclaw

Prepare:

chmod +x /opt/anqclaw/anqclaw
ln -sf /opt/anqclaw/anqclaw /usr/local/bin/anqclaw

With PATH:

anqclaw onboard
anqclaw config validate
anqclaw serve

Without PATH:

/opt/anqclaw/anqclaw onboard
/opt/anqclaw/anqclaw config validate
/opt/anqclaw/anqclaw serve

As needed:

  • Preinstall uv if you enable managed Python package installation with install_scope = "venv"; anqclaw will not download it automatically
  • Install Python/pip yourself when your prompts or custom tools rely on a non-managed interpreter
  • Install any external commands required by your prompts or custom tools

macOS

Recommended path:

/usr/local/anqclaw/anqclaw

Prepare:

chmod +x /usr/local/anqclaw/anqclaw
ln -sf /usr/local/anqclaw/anqclaw /usr/local/bin/anqclaw

With PATH:

anqclaw onboard
anqclaw config validate
anqclaw serve

Without PATH:

/usr/local/anqclaw/anqclaw onboard
/usr/local/anqclaw/anqclaw config validate
/usr/local/anqclaw/anqclaw serve

As needed:

  • If the first launch is blocked, run xattr -d com.apple.quarantine /usr/local/anqclaw/anqclaw
  • Preinstall uv if you enable managed Python package installation with install_scope = "venv"; anqclaw will not download it automatically
  • Install Python/pip yourself when your prompts or custom tools rely on a non-managed interpreter
  • Install any external commands required by your prompts or custom tools

Development

Use this section only if you are changing code or debugging locally.

Requirements:

  • rustup, rustc, cargo
  • Platform build tools
    • Windows: Visual Studio Build Tools / MSVC
    • Linux: gcc or clang

Common commands:

cd agent
cargo build
cargo run -- onboard
cargo run -- chat
cargo run -- serve
cargo run -- config validate

Build a Release Binary

Requirement: Rust toolchain installed.

Build:

cd agent
cargo build --release

Output:

  • Windows: agent/target/release/anqclaw.exe
  • Linux/macOS: agent/target/release/anqclaw

Quality Status

  • Local validation has passed with cargo test --manifest-path agent/Cargo.toml
  • Local validation also includes cargo clippy --all-targets --all-features -- -D warnings
  • cargo audit is used as a local dependency check; some remaining advisories are currently inherited from upstream transitive dependencies
  • Recent regression coverage includes custom tools, trusted path handling, web SSRF, interrupted streams, Feishu token refresh, concurrent long-term memory writes, and the skills candidate-selection plus on-demand-read mainline

Docs

About

anqclaw 是一个用 Rust 构建的私人 AI 助理,支持飞书接入、CLI 对话、多 LLM、工具调用与持久记忆。anqclaw is a private AI assistant built with Rust, featuring support for Feishu integration, CLI conversations, multiple LLMs, tool calling, and persistent memory.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages