Codebase: sentinel
Date: 2026-01-23
Context: Autonomous 24/7 social media and BD agent system
Sentinel is an autonomous social media and business development agent system that runs on configurable cycles to:
- Ingest data from multiple platforms (Slack, GitHub, Telegram, Asana, Discord, Twitter)
- Analyze using LLM to identify items requiring response or action
- Draft responses, tweets, follow-ups, and content
- Route drafts through Slack for human approval before sending
- Send approved content to external platforms
- Track commitments, follow-ups, and overdue items
| Agent | Purpose | Frequency |
|---|---|---|
| BD Agent | Track relationships, draft follow-up outreach | Every 4 hours |
| Marketing Agent | Draft tweets, threads, announcements | 3x daily |
| Tracker Agent | Monitor commitments, flag overdue items | Hourly |
| Alert Agent | Surface urgent/high-priority items | Every 15 min |
- Scheduled cron triggers
sentinel.py - Ingest recent messages from configured sources (Slack channels, GitHub repos, Telegram groups)
- LLM analyzes data, identifies actionable items, drafts responses
- Posts drafts to
#sentinel-channelin Slack - Humans react: ✅ Approve, ✏️ Edit, ❌ Skip
- Approved content is sent to target platform (Twitter, Telegram, etc.)
- Slack: Primary hub for approvals and internal routing
- Telegram: Community monitoring and response (via Telethon user session)
- GitHub: Notification monitoring, issue tracking
- Twitter: Content posting (WIP, uses tweepy)
- Asana: Task creation and tracking
- Discord: Planned
| Type | Destination(s) | Description |
|---|---|---|
| Content Drafts | PPM, organizational-architecture | Tweet/thread drafts ready for review |
| Community Alerts | PPM, kairon-frontend | "Someone asked about X in Telegram" |
| BD Follow-up Reports | PPM | Weekly digest of stale contacts |
| Commitment Tracking | PPM | Who promised what and when |
| Social Media Metrics | metalos-xyz, PPM | Post performance, engagement |
| Skills | Any codebase | e.g., asana-integration, github-search |
# Alert: Community question needs attention
type: alert
priority: high
source: sentinel
destination: kairon-frontend
payload:
platform: telegram
chat: metalos_Community
message: "User asking about vault migration"
suggested_response: "Here's how to migrate..."
requires_expertise: smart-contracts
# Skill: Reusable Asana integration
type: skill
source: sentinel
destination: broadcast
payload:
skill_name: asana-integration
path: sentinel/skills/asana-integration/
description: "Task management with attachments"| Type | Source(s) | Description |
|---|---|---|
| Content Directives | PPM, human | "Post this tweet at 3pm" |
| Research/Context | anima-research | Analysis to turn into content |
| Product Updates | metalos-xyz, kairon | Features to announce |
| Skills | Any codebase | New platform integrations |
| Configuration Updates | PPM | Add/remove monitored channels |
| Chat Histories | Any codebase | Context from prior sessions |
# Directive: Post announcement
type: directive
source: PPM
destination: sentinel
payload:
action: schedule_post
platform: twitter
content: "🚀 New vault strategy live..."
scheduled_for: "2026-01-24T15:00:00Z"
media_paths: ["/path/to/chart.png"]
requires_approval: true
# Skill: New Discord integration
type: skill
source: kevern-network
destination: sentinel
payload:
skill_name: discord-integration
files:
- discord_client.py
- discord_events.py| Problem | Current Workaround | Pain Level |
|---|---|---|
| No directive inbox | Manually edit config or run one-off scripts | 🔴 High |
| Skills copied manually | cp -r between repos |
🟡 Medium |
| Chat context lost | Re-explain everything each session | 🔴 High |
| Content calendar manual | Edit YAML files by hand | 🟡 Medium |
| Problem | Current Workaround | Pain Level |
|---|---|---|
| No structured exports | Copy-paste from Slack | 🟡 Medium |
| Skills not discoverable | Know they exist and where | 🟡 Medium |
| Alerts stay local | Check Slack channels manually | 🟡 Medium |
- No way to say "hey sentinel, post this" from another codebase
- No way for sentinel to ask "hey research, give me context on X"
- Skills developed here (like
asana-integration) would be useful in other codebases but there's no publish/subscribe mechanism
| Secret | Scope | Notes |
|---|---|---|
SLACK_BOT_TOKEN |
Workspace-wide | Can post to any channel bot is in |
OPENAI_API_KEY |
Account-wide | Shared across codebases |
TELEGRAM_API_ID/HASH |
App-level | User session, not bot |
TWITTER_* |
Per-account | OAuth tokens |
ASANA_ACCESS_TOKEN |
Personal | Full project access |
GH_PAT |
Account-wide | Repo/notification access |
Key concern: Any courier message containing content should NOT include secrets. Secrets should be referenced by name (e.g., use_token: SLACK_BOT_TOKEN) not by value.
content/twitter_calendar.yaml— Scheduled tweets with times and media referencespending_approvals.json— State of drafts awaiting human approvaltelegram_chat.json— Selected chat for monitoring*.sessionfiles — Telethon session persistence (sensitive!)
- Slack Events Server — Already listens for webhooks; could listen for courier messages
- Content Scheduler — Already polls YAML calendar; could poll courier inbox
- Approval Store — Already tracks pending items; could track cross-codebase requests
A standardized inbox for receiving commands from other codebases:
sentinel/
courier/
inbox/ # Incoming messages
directive_001.yaml
skill_002.tar.gz
outbox/ # Outgoing messages
alert_003.yaml
processed/ # Archived after handling
Sentinel would poll this on each cycle and process directives.
When a skill is ready to share:
courier publish skill asana-integration --description "Asana task management"This would:
- Package the skill folder
- Create a manifest
- Place in
outbox/or push to shared location
Other codebases could subscribe:
courier subscribe skill asana-integration --from sentinelSentinel could broadcast alerts that other codebases can filter:
# outbox/alert_urgent_community.yaml
type: alert
priority: urgent
tags: [community, telegram, needs-expertise]
payload:
message: "User reporting vault issue"
context: {...}
subscribers:
- kairon-frontend # if tag matches smart-contracts
- metalos-xyz # if tag matches vaultWhen extracting Cursor chat history:
courier extract-chat --session-id xyz --destination anima-researchThis would:
- Extract the chat from Cursor's storage
- Format as markdown
- Route to the destination codebase's inbox
Sentinel could emit periodic status:
type: heartbeat
source: sentinel
timestamp: 2026-01-23T12:00:00Z
status:
agents:
bd: healthy
marketing: healthy
tracker: warning # 3 items overdue
pending_approvals: 5
last_run: 2026-01-23T11:00:00ZOther codebases could monitor this for coordination.
-
Transport mechanism: Git-based (push/pull from shared repo) vs. file-based (shared filesystem) vs. gist-based (GitHub Gists as message bus)?
-
Message ordering: Does order matter? FIFO queue vs. priority queue?
-
Acknowledgment: Should senders know when messages are processed? Or fire-and-forget?
-
Conflict resolution: If two codebases send conflicting directives (e.g., "post X" and "don't post anything"), who wins?
-
Authentication: How do we verify a message really came from
PPMand not a rogue actor?
Sentinel's key value in the courier system:
- Source of: Content drafts, community alerts, BD reports, skills, social metrics
- Consumer of: Directives, research context, product updates, skills, chat histories
- Unique capability: Already has approval flow infrastructure that could extend to cross-codebase requests
One-line insight: Sentinel's existing Slack-based approval flow is a natural template for a cross-codebase directive processing system—just swap "Slack reaction" for "courier acknowledgment."