TinyClaw is a lightweight Go-based AI agent service. It provides:
- Local CLI chat mode for direct interaction with an agent.
- Feishu channel integration for message-driven gateway mode.
- A shell execution tool with built-in dangerous-command guards.
The project is built on CloudWeGo Eino and currently uses an OpenAI-compatible model endpoint configured by environment variables.
- ReAct-style agent workflow powered by Eino.
- Pluggable channel abstraction with Feishu implementation.
- Gateway pipeline for inbound message -> agent generation -> outbound reply.
- Command execution tool with denylist-based safety checks and timeout control.
- Minimal runtime setup with environment-variable configuration.
TinyClaw/
├── cmd/
│ ├── main.go # Local CLI entry
│ ├── feishu_channel_test/ # Feishu channel connectivity test
│ └── feishu_gateway_test/ # Feishu gateway integration entry
├── internal/
│ ├── agent/ # Agent construction (model + tools)
│ ├── channel/ # Channel abstraction + Feishu implementation
│ ├── config/ # Runtime config from environment variables
│ ├── gateway/ # Message orchestration pipeline
│ └── tool/ # Built-in tools (exec)
├── test/
│ └── agent_test.go # Basic agent invocation tests
├── go.mod
└── go.sum
- Go 1.25.4 (from
go.mod). - AI model endpoint variables:
TINYCLAW_API_KEYTINYCLAW_BASE_URL
- For Feishu mode only:
FEISHU_APP_IDFEISHU_APP_SECRET
git clone https://github.com/ihoooohi/TinyClaw.git
cd TinyClaw
go mod tidy
export TINYCLAW_API_KEY="your-api-key"
export TINYCLAW_BASE_URL="https://your-openai-compatible-endpoint"
# Optional (required only for Feishu gateway mode)
export FEISHU_APP_ID="your-feishu-app-id"
export FEISHU_APP_SECRET="your-feishu-app-secret"
# 1) Run local CLI mode
go run ./cmd
# 2) Run Feishu gateway mode
go run ./cmd/feishu_gateway_testinternal/configloads model config from environment variables.internal/agentbuilds a ReAct agent with an OpenAI-compatible chat model and theexectool.- In CLI mode, user input is sent directly to the agent and printed back.
- In Feishu gateway mode:
internal/channel/feishureceives Feishu events.internal/gatewayconverts inbound events into agent messages.- The generated reply is sent back to Feishu chat.
Local CLI mode:
go run ./cmd
# You: 请执行命令: pwd
# AI: <agent reply, possibly using exec tool>Feishu connectivity check:
go run ./cmd/feishu_channel_testThis project is licensed under the MIT License. See LICENSE for details.