Skip to content

Instantly share code, notes, and snippets.

@jkbrooks
Created January 23, 2026 01:03
Show Gist options
  • Select an option

  • Save jkbrooks/8d96a55b252ea2b738ed6bfad375f4e7 to your computer and use it in GitHub Desktop.

Select an option

Save jkbrooks/8d96a55b252ea2b738ed6bfad375f4e7 to your computer and use it in GitHub Desktop.
Courier Protocol Response: sentinel

Courier Protocol Response: Sentinel

Codebase: sentinel
Date: 2026-01-23
Context: Autonomous 24/7 social media and BD agent system


1. Codebase Identity

What is Sentinel?

Sentinel is an autonomous social media and business development agent system that runs on configurable cycles to:

  1. Ingest data from multiple platforms (Slack, GitHub, Telegram, Asana, Discord, Twitter)
  2. Analyze using LLM to identify items requiring response or action
  3. Draft responses, tweets, follow-ups, and content
  4. Route drafts through Slack for human approval before sending
  5. Send approved content to external platforms
  6. Track commitments, follow-ups, and overdue items

Agents Running Here

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

Typical Workflow

  1. Scheduled cron triggers sentinel.py
  2. Ingest recent messages from configured sources (Slack channels, GitHub repos, Telegram groups)
  3. LLM analyzes data, identifies actionable items, drafts responses
  4. Posts drafts to #sentinel-channel in Slack
  5. Humans react: ✅ Approve, ✏️ Edit, ❌ Skip
  6. Approved content is sent to target platform (Twitter, Telegram, etc.)

Key Integrations

  • 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

2. What Sentinel Would SEND to Other Codespaces

High-Value Outputs

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

Example Payloads

# 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"

3. What Sentinel Would RECEIVE from Other Codespaces

High-Value Inputs

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

Example Payloads

# 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

4. Current Pain Points

Moving Things INTO Sentinel

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

Moving Things OUT OF Sentinel

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

Cross-Codebase Coordination

  • 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

5. Special Considerations

Security Concerns

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.

Unique File Types

  • content/twitter_calendar.yaml — Scheduled tweets with times and media references
  • pending_approvals.json — State of drafts awaiting human approval
  • telegram_chat.json — Selected chat for monitoring
  • *.session files — Telethon session persistence (sensitive!)

Existing Integrations That Should Connect

  1. Slack Events Server — Already listens for webhooks; could listen for courier messages
  2. Content Scheduler — Already polls YAML calendar; could poll courier inbox
  3. Approval Store — Already tracks pending items; could track cross-codebase requests

6. Proposed Features

6.1 Directive Inbox

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.

6.2 Skill Publishing

When a skill is ready to share:

courier publish skill asana-integration --description "Asana task management"

This would:

  1. Package the skill folder
  2. Create a manifest
  3. Place in outbox/ or push to shared location

Other codebases could subscribe:

courier subscribe skill asana-integration --from sentinel

6.3 Alert Broadcasting

Sentinel 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 vault

6.4 Chat Context Router

When extracting Cursor chat history:

courier extract-chat --session-id xyz --destination anima-research

This would:

  1. Extract the chat from Cursor's storage
  2. Format as markdown
  3. Route to the destination codebase's inbox

6.5 Status Heartbeat

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:00Z

Other codebases could monitor this for coordination.


7. Questions

  1. Transport mechanism: Git-based (push/pull from shared repo) vs. file-based (shared filesystem) vs. gist-based (GitHub Gists as message bus)?

  2. Message ordering: Does order matter? FIFO queue vs. priority queue?

  3. Acknowledgment: Should senders know when messages are processed? Or fire-and-forget?

  4. Conflict resolution: If two codebases send conflicting directives (e.g., "post X" and "don't post anything"), who wins?

  5. Authentication: How do we verify a message really came from PPM and not a rogue actor?


8. Summary

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment