@clickonsearch/linkedin-agent 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +107 -50
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,74 +1,131 @@
1
1
  # linkedin-agent
2
2
 
3
- An agent for your personal LinkedIn account — read your own profile, publish
4
- posts to your feed. Same shape as [`github-agent`](../github-agent): a
5
- one-shot CLI and an AG-UI browser chat UI, both routed through whichever
6
- provider you pick (OpenAI, Claude, or DeepSeek).
3
+ Read your LinkedIn profile and publish posts to your feed, through chat.
4
+ Pick which AI model does the thinking — OpenAI, Claude, or DeepSeek.
7
5
 
8
- Requires [`@clickonsearch/linkedin-mcp-server`](../../mcp-servers/linkedin-mcp-server)
9
- running (and already authorized — see that package's README) first.
6
+ ```
7
+ your prompt
8
+ │
9
+ ▼
10
+ ┌─────────────────────────────┐
11
+ │ linkedin-agent │ reads your prompt
12
+ └──────────────┬──────────────┘
13
+ │
14
+ ▼
15
+ ┌─────────────────────────────┐
16
+ │ bridge │ openai / claude / deepseek — talks to the AI model
17
+ └──────────────┬──────────────┘
18
+ │
19
+ ▼
20
+ ┌─────────────────────────────┐
21
+ │ linkedin-mcp-server │ reads/posts your profile
22
+ └──────────────┬──────────────┘
23
+ │
24
+ ▼
25
+ an answer, or a new post on your feed
26
+ ```
10
27
 
11
- ## Known limits, inherited from linkedin-mcp-server
28
+ ## What you need
12
29
 
13
- This agent only has two real capabilities: reading your own profile and
14
- posting to your own feed. It **cannot** send LinkedIn messages (no public
15
- API for that, at all) or read/reply to other people's posts (needs a
16
- LinkedIn Developer Program approval most apps don't have). If you ask it to
17
- do either, it's instructed to say so rather than pretend.
30
+ - Node.js 18+
31
+ - A LinkedIn Developer app (free, a few minutes — see step 1 below)
32
+ - An API key for at least one of: OpenAI, Anthropic (Claude), DeepSeek
18
33
 
19
34
  ## Setup
20
35
 
36
+ **1. Create a LinkedIn app:**
37
+
38
+ 1. Go to [linkedin.com/developers/apps](https://www.linkedin.com/developers/apps) → Create app.
39
+ 2. Under **Products**, add **"Sign In with LinkedIn using OpenID Connect"** and **"Share on LinkedIn"**.
40
+ 3. Under **Auth**, add an **Authorized redirect URL**: `http://localhost:3300/callback`.
41
+ 4. Copy the app's **Client ID** and **Client Secret**.
42
+
43
+ **2. Authorize it** (one time — run from a folder you'll reuse in step 3):
44
+
21
45
  ```bash
22
- # 1. make sure linkedin-mcp-server is running and authorized (separate terminal)
23
- cd mcp-servers/linkedin-mcp-server
24
- npm install && cp .env.example .env # fill in LINKEDIN_CLIENT_ID/SECRET
25
- npm run dev:authorize # one-time OAuth consent
26
- npm run dev
46
+ LINKEDIN_CLIENT_ID=<id> LINKEDIN_CLIENT_SECRET=<secret> \
47
+ npx -p @clickonsearch/linkedin-mcp-server linkedin-authorize
48
+ ```
27
49
 
28
- # 2. then this agent
29
- cd agents/linkedin-agent
30
- npm install
31
- cp .env.example .env
32
- # fill in LINKEDIN_MCP_URL (if not localhost:4300) and your provider's API key
50
+ This opens a link — sign in, approve, done. It saves a token to
51
+ `linkedin-token.json` in the current folder, so step 3 needs to run from
52
+ this same folder.
53
+
54
+ **3. Start the LinkedIn connection** (own terminal, keep it running):
55
+
56
+ ```bash
57
+ LINKEDIN_CLIENT_ID=<id> LINKEDIN_CLIENT_SECRET=<secret> \
58
+ npx @clickonsearch/linkedin-mcp-server
33
59
  ```
34
60
 
35
- ## Run: CLI
61
+ ## Use it: command line
36
62
 
37
63
  ```bash
38
- npm run dev -- --provider claude "what does my profile look like?"
39
- npm run dev -- --provider openai "post: excited to share our new release today"
64
+ ANTHROPIC_API_KEY=<your-key> npx @clickonsearch/linkedin-agent --provider claude "what does my profile look like?"
40
65
  ```
41
66
 
42
- or build and run the compiled CLI:
67
+ Swap in `OPENAI_API_KEY` + `--provider openai`, or `DEEPSEEK_API_KEY` +
68
+ `--provider deepseek`, to use a different model.
69
+
70
+ ## Use it: browser chat
43
71
 
44
72
  ```bash
45
- npm run build
46
- npm start -- --provider claude "your prompt here"
73
+ ANTHROPIC_API_KEY=<your-key> npx -p @clickonsearch/linkedin-agent linkedin-agent-serve
47
74
  ```
48
75
 
49
- ## Run: AG-UI server + chat UI
76
+ Then open `http://localhost:3200` and start chatting.
77
+
78
+ ## Use it: embedded in another tool
79
+
80
+ The browser chat server speaks the [AG-UI protocol](https://ag-ui.com)
81
+ (`POST /agent`, streaming SSE) — any AG-UI-compatible client can drive it
82
+ as a backend, not just the bundled page.
83
+
84
+ ## Config reference
85
+
86
+ | Env var | Required | Default |
87
+ | -------------------- | -------------------- | -------------------------- |
88
+ | `PROVIDER` | no | `openai` |
89
+ | `OPENAI_API_KEY` | if using OpenAI | |
90
+ | `OPENAI_MODEL` | no | `gpt-4.1` |
91
+ | `ANTHROPIC_API_KEY` | if using Claude | |
92
+ | `ANTHROPIC_MODEL` | no | `claude-sonnet-5` |
93
+ | `DEEPSEEK_API_KEY` | if using DeepSeek | |
94
+ | `DEEPSEEK_MODEL` | no | `deepseek-chat` |
95
+ | `LINKEDIN_MCP_URL` | no | `http://localhost:4300` |
96
+ | `PORT` | no, browser chat only | `3200` |
97
+
98
+ ## Good to know
99
+
100
+ This agent can only do two things: read your own profile, and post to your
101
+ own feed. It **can't** send LinkedIn messages (no public API exists for
102
+ that, for anyone) or reply to other people's posts (needs special LinkedIn
103
+ approval most apps don't have). If you ask it to do either, it'll tell you
104
+ it can't rather than pretend.
105
+
106
+ ---
107
+
108
+ ## For developers
109
+
110
+ **Running from source:**
50
111
 
51
112
  ```bash
52
- npm run build
53
- npm run serve # or `npm run dev:serve` for tsx, no build step
113
+ # terminal 1
114
+ cd mcp-servers/linkedin-mcp-server
115
+ npm install
116
+ cp .env.example .env # fill in LINKEDIN_CLIENT_ID / LINKEDIN_CLIENT_SECRET
117
+ npm run dev:authorize # opens a consent link in your browser, one time
118
+ npm run dev
119
+
120
+ # terminal 2
121
+ cd agents/linkedin-agent
122
+ npm install
123
+ cp .env.example .env # fill in a provider key
124
+ npm run dev -- --provider claude "what does my profile look like?"
125
+ npm run serve # or browser chat
54
126
  ```
55
127
 
56
- This starts an HTTP server (default `http://localhost:3200`) with:
57
-
58
- - `GET /` — a self-contained chat page (`public/index.html`) with a provider dropdown.
59
- - `POST /agent` — the AG-UI protocol endpoint, same shape as `github-agent`'s.
60
- - `GET /health` — liveness check.
61
-
62
- ## Config
63
-
64
- | Env var | Required | Notes |
65
- | -------------------- | ----------------------- | ----------------------------------------------------- |
66
- | `LINKEDIN_MCP_URL` | no (default `http://localhost:4300`) | where linkedin-mcp-server is running |
67
- | `PORT` | no (default `3200`) | AG-UI server only |
68
- | `PROVIDER` | no (default `openai`) | CLI: overridden by `--provider`. Server: default only, overridden per-request by `forwardedProps.provider` |
69
- | `OPENAI_API_KEY` | when provider=openai | |
70
- | `OPENAI_MODEL` | no (default `gpt-4.1`) | |
71
- | `ANTHROPIC_API_KEY` | when provider=claude | |
72
- | `ANTHROPIC_MODEL` | no (default `claude-sonnet-5`) | |
73
- | `DEEPSEEK_API_KEY` | when provider=deepseek | |
74
- | `DEEPSEEK_MODEL` | no (default `deepseek-chat`) | |
128
+ Same shape as [`github-agent`](../github-agent): both the CLI and the
129
+ browser chat UI (an AG-UI protocol server, same `POST /agent` shape) call
130
+ through to [`linkedin-mcp-server`](../../mcp-servers/linkedin-mcp-server)'s
131
+ two tools.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickonsearch/linkedin-agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Agent for a personal LinkedIn account (read your profile, publish posts) via linkedin-mcp-server, routed through OpenAI, Claude, or DeepSeek depending on preference. Ships an AG-UI protocol server plus a browser chat UI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -29,9 +29,9 @@
29
29
  "dev:serve": "tsx src/server-cli.ts"
30
30
  },
31
31
  "dependencies": {
32
- "@clickonsearch/openai-remote-mcp-bridge": "^0.1.0",
33
- "@clickonsearch/claude-remote-mcp-bridge": "^0.1.0",
34
- "@clickonsearch/deepseek-remote-mcp-bridge": "^0.1.0",
32
+ "@clickonsearch/openai-remote-mcp-bridge": "^0.2.0",
33
+ "@clickonsearch/claude-remote-mcp-bridge": "^0.2.0",
34
+ "@clickonsearch/deepseek-remote-mcp-bridge": "^0.2.0",
35
35
  "openai": "^4.68.0",
36
36
  "@anthropic-ai/sdk": "^0.32.1",
37
37
  "@ag-ui/core": "^1.0.0",