A Go backend bot for Feishu (Lark) that answers team questions in group chats (@ mention) and DMs, with streaming responses showing reasoning, answer, and tool-call progress in a single card. Supports multiple LLM providers (Claude, OpenAI, DeepSeek), built-in tools (web search, URL fetch, Feishu doc read/search, datetime), and MCP-server-sourced tools.
See specs/001-feishu-agent-bot/quickstart.md for full setup, config, deployment, and smoke testing.
make build # → bin/bot
make test # unit + contract tests
make vet
make fmt-checkLARK_APP_IDLARK_APP_SECRETLARK_ENCRYPT_KEYLARK_VERIFICATION_TOKENLARK_BOT_OPEN_IDOAUTH_ENCRYPTION_KEYOAUTH_STATE_KEY
One configured provider key is also required, for example:
ANTHROPIC_API_KEYOPENAI_API_KEYDEEPSEEK_API_KEY
Optional tool keys:
TAVILY_API_KEY
- Feishu events arrive through long connection, but OAuth callback still requires a public HTTPS endpoint.
- Recommended deployment shape: run the bot privately, terminate TLS at a reverse proxy, and forward
/oauth/*plus/healthzto the bot's local HTTP listener. - Redis stores 24h sessions, per-user locks, and encrypted OAuth credentials. Team-scale deployments generally only need a small Redis instance.
Example Caddy config:
bot.example.com {
reverse_proxy /oauth/* 127.0.0.1:8080
reverse_proxy /healthz 127.0.0.1:8080
}docker build -t ssh-bot .
docker run --rm --env-file .env -p 8080:8080 ssh-botFeature branch 001-feishu-agent-bot; see specs/001-feishu-agent-bot/tasks.md for the task-level state of the implementation.
- Spec / user stories → spec.md
- Implementation plan → plan.md
- Design decisions + version pins → research.md
- Data model → data-model.md
- Interface contracts → contracts/
Agent-oriented context for future work: AGENTS.md.