2026-06-01 19:09:40 +08:00
|
|
|
# Agent Foundation
|
|
|
|
|
|
2026-07-13 16:50:29 +08:00
|
|
|
Java Spring Boot service for Enterprise WeChat callbacks and internal APIs.
|
2026-06-01 19:09:40 +08:00
|
|
|
|
|
|
|
|
## Core API
|
|
|
|
|
- POST `/v1/chat/completions`
|
|
|
|
|
- GET `/v1/healthz`
|
|
|
|
|
|
2026-07-13 16:50:29 +08:00
|
|
|
## WeCom Callback
|
2026-06-01 19:09:40 +08:00
|
|
|
- Callback URL: `/v1/integrations/wecom/callback`
|
2026-07-13 16:50:29 +08:00
|
|
|
- Verifies Enterprise WeChat callback signatures
|
|
|
|
|
- Decrypts encrypted callback payloads when safe mode is enabled
|
|
|
|
|
- Deduplicates text messages
|
|
|
|
|
- Sends a fixed text reply: `你好`
|
|
|
|
|
|
|
|
|
|
The old internal agent orchestration code has been removed. Future intelligent
|
|
|
|
|
responses should be connected through Coze while keeping this callback entrypoint.
|
2026-06-01 19:09:40 +08:00
|
|
|
|
|
|
|
|
### Required env vars
|
|
|
|
|
- `DEEPSEEK_API_KEY`
|
|
|
|
|
- `WECOM_CORP_ID`
|
|
|
|
|
- `WECOM_AGENT_ID`
|
|
|
|
|
- `WECOM_SECRET`
|
|
|
|
|
- `WECOM_TOKEN`
|
|
|
|
|
|
|
|
|
|
### WeCom backend settings
|
|
|
|
|
1. Create a WeCom self-built app.
|
|
|
|
|
2. Enable message receive API and set callback URL to:
|
|
|
|
|
- `https://your-domain/v1/integrations/wecom/callback`
|
|
|
|
|
3. Set callback Token equal to `WECOM_TOKEN`.
|
|
|
|
|
4. Make sure app has send-message permission to internal users.
|
|
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
1. Set env vars.
|
|
|
|
|
2. Start app from IDE or `mvn spring-boot:run`.
|