-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpersona.ts
More file actions
54 lines (48 loc) · 1.95 KB
/
Copy pathpersona.ts
File metadata and controls
54 lines (48 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { definePersona } from '@agentworkforce/persona-kit';
/**
* Hacker News Monitor — scans HN a few times a day for the topics you care
* about and posts a digest to Slack, Telegram, or both. Configuration-driven:
* set SLACK_CHANNEL, TELEGRAM_CHAT, or both — the handler delivers to
* whichever targets are configured.
*
* Retains ~30 days of digests; DM the agent (relay inbox) or message it on
* Telegram to ask about recently posted stories.
*/
export default definePersona({
id: 'hn-monitor',
intent: 'relay-orchestrator',
tags: ['discovery'],
description:
'Scans Hacker News a few times a day for topics you care about and posts a digest to Slack, Telegram, or both. Retains the last ~30 days of digests — DM the agent or message it on Telegram to ask about what it recently posted.',
cloud: true,
integrations: {
slack: { scope: { paths: '/slack/channels/**' } },
telegram: { scope: { chats: '/telegram/chats/**', layout: '/telegram/LAYOUT.md' } }
},
inputs: {
TOPICS: {
description: 'Comma-separated keywords to watch for (matched against story titles).',
env: 'TOPICS',
default: 'agents,ai,typescript,developer tools'
},
SLACK_CHANNEL: {
description: 'Slack channel id to post the digest to. Leave empty to skip Slack delivery.',
env: 'SLACK_CHANNEL',
optional: true,
picker: { provider: 'slack', resource: 'channels' }
},
TELEGRAM_CHAT: {
description: 'Telegram chat id to post the digest to (and answer Q&A in). Leave empty to skip Telegram delivery.',
env: 'TELEGRAM_CHAT',
optional: true
}
},
useSubscription: true,
harness: 'claude',
model: 'claude-haiku-4-5-20251001',
systemPrompt: 'Summarize Hacker News stories into a short, skimmable digest.',
harnessSettings: { reasoning: 'low', timeoutSeconds: 1800 },
relay: { inbox: ['@self'] },
memory: { enabled: true, scopes: ['workspace'], ttlDays: 30 },
onEvent: './agent.ts'
});