AgentProcConnect any Agent CLI to any messaging platform
A minimal process-based protocol. No HTTP, no sockets — just stdin, stdout, and env vars.
A minimal process-based protocol. No HTTP, no sockets — just stdin, stdout, and env vars.
npm install -g agentprocpipx install agentprocpip install agentprocVerify it works:
agentproc --version
# agentproc 0.2.0 (protocol 0.1)Browse the Profile Hub — every profile is a directory containing profile.yaml, a bridge script, and a README. Five official profiles to start with:
| Profile | CLI | Status |
|---|---|---|
| claude-code | claude (Anthropic) | official |
| codex | codex (OpenAI) | official |
| codebuddy | codebuddy (Tencent) | official |
| agy | agy | community |
| echo-agent | (hello world) | official |
Clone the repo and try echo-agent first (no API key needed):
git clone https://github.com/jeffkit/agentproc
cd agentproc
agentproc --profile hub/echo-agent/profile.yaml \
--prompt "hello" \
--cwd hub/echo-agent
# → You said: helloNow a real one. With claude-code, you get streaming output and multi-turn session continuity:
agentproc --profile hub/claude-code/profile.yaml \
--prompt "what is this codebase?" \
--cwd ~/projects/my-app \
--env ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"You'll see protocol lines stream on stderr in real time, and the final reply on stdout:
AGENT_PARTIAL:"This codebase is..."
AGENT_SESSION:13c2f6ec-1f97-42c4-be9e-9475129e243c
agentproc:session:13c2f6ec-1f97-42c4-be9e-9475129e243cCapture that session id and continue the conversation:
agentproc --profile hub/claude-code/profile.yaml \
--prompt "tell me about the auth module" \
--cwd ~/projects/my-app \
--env ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
--session 13c2f6ec-1f97-42c4-be9e-9475129e243cAgentProc agents don't talk to WeChat or Slack directly — that's the bridge's job. The bridge is a small program that:
AGENT_MESSAGE env var setHere's a complete working bridge in ~30 lines of Node.js that wires agentproc to anything:
// bridge.js — a minimal AgentProc bridge
const { run } = require('agentproc');
const fs = require('fs');
async function handleMessage(message, sessionId) {
const profile = JSON.parse(fs.readFileSync('./profile.json'));
const result = await run(profile, {
message,
sessionId,
onPartial: (chunk) => console.log(`[streaming] ${chunk}`),
});
console.log(`Reply: ${result.reply}`);
console.log(`Session: ${result.sessionId}`); // pass this back next turn
}
// Replace with your platform's SDK:
// yourMessagingPlatform.onMessage(handleMessage);
handleMessage(process.argv[2] || 'hello', '');Save as bridge.js, point it at a profile, and wire it to your messaging platform's webhook. The runner.js source is the spec in code form — read it as the canonical reference.