AgentMessage connects Feishu direct messages to Codex CLI on WSL/Linux. Run tasks in registered projects and receive progress, results, and files through a long connection—no public IP or open port required.
- Task management: ongoing conversations, task switching, queues, logs, and cancellation; concurrent work across projects.
- Model controls: switch models and reasoning effort, and compact context while keeping the session.
- File exchange: send images or files to the Agent and receive project files back.
- Session continuity: resume tasks in a terminal and sync sessions between Feishu and Codex Chats.
- Isolated execution: Bubblewrap with optional GPU passthrough, or an existing Docker container.
- Multiple bots: shared code with separate project assignments and user authorization.
Open the Feishu Developer Console:
- Create an enterprise self-built app and add the bot capability.
- Batch-import the following JSON in permission management.
- Select long-connection event delivery and add
im.message.receive_v1. - Publish the app version, restricting availability to yourself.
- Save the App ID and App Secret for the installer.
{
"scopes": {
"tenant": [
"docs:document.comment:create",
"docs:document.comment:read",
"docx:document",
"im:message.p2p_msg:readonly",
"im:message:send_as_bot",
"im:resource"
],
"user": []
}
}Requires curl, WSL/Linux with systemd enabled, and an installed, authenticated Codex CLI.
curl -fsSLo /tmp/agent-message-install.sh \
https://raw.githubusercontent.com/wenqing-2021/AgentMessage/main/install.sh &&
bash /tmp/agent-message-install.shEnter the Feishu credentials when prompted. The installer sets up and starts the service in ~/workspace/AgentMessage by default.
See installation details to rerun the installer, change credentials, or add bots.
Every new bot automatically shares agent_message; every other project may belong to only one bot. Bot credentials, authorization, and task history remain separate.
Edit config/projects.toml. This mirrors the current configuration with example identities, project names, and paths:
[service]
feishu_app_id = "cli_example"
state_dir = "var"
log_dir = "var/logs"
default_chat_project = "agent_message"
codex_tool_network = true
stop_grace_seconds = 10
final_message_limit = 3500
sandbox_git_user_name = "Alice"
sandbox_git_user_email = "alice@example.com"
sandbox_ssh_agent_socket = "/run/user/1000/agent-message-ssh/agent.sock"
sandbox_ssh_known_hosts = "/home/alice/.ssh/known_hosts"
sandbox_readonly_paths = ["/etc/fonts"]
[projects.agent_message]
path = "/home/alice/workspace/AgentMessage"
default_agent = "codex"
allowed_agents = ["codex"]
sandbox_enabled = true
sandbox_network = true
sandbox_timeout_seconds = 86400
sandbox_gpu = true
[projects.container_project]
path = "/home/alice/workspace/ContainerProject"
default_agent = "codex"
allowed_agents = ["codex"]
container_name = "project_dev"
container_path = "/root/workspace/ContainerProject"
container_auto_start = true
container_timeout_seconds = 86400
[bots.cli_example]
projects = ["agent_message", "container_project"]
default_chat_project = "agent_message"Replace the App ID, paths, and Git/SSH details. Keep only the projects you need and update the [bots] project list. Paths must exist; remove unused sandbox_readonly_paths entries.
See runtime setup for sandbox, GPU, Git/SSH, and Docker configuration, or the configuration example for available fields. Restart the corresponding service after editing.
Send /help to the bot, then authorize your account locally:
cd ~/workspace/AgentMessage
uv run agent-message pending-senders
uv run agent-message authorize ou_xxxSend /help again. A reply confirms the connection.
- Automatic uploads to Feishu cloud documents.
- Agent quota queries.
- Monitor and related monitoring features.
