Logo di Channel Bot

Channel Bot

Organizzazione
vstorm-co
channel-bot

Work with messaging-channel bots — Telegram, Slack, Mattermost or Microsoft Teams. Register a bot, route inbound messages through an agent, choose webhook vs polling, handle an @slug mention, or add a new channel adapter. Use when wiring chat into a messaging platform or debugging bot delivery, identity linking or "the bot answered as itself".

Add to TypingMind

Panoramica

Pubblicato davstorm-co
Repositoryagenticos
Nome della skillchannel-bot
Stelle
137
Fork
27
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da vstorm-co su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Channel Bot in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/vstorm-co/agenticos/tree/main/.claude/skills/channel-bot
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vstorm-co/agenticos.git /tmp/agenticos
mkdir -p .claude/skills
cp -r /tmp/agenticos/.claude/skills/channel-bot .claude/skills/channel-bot
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Channel Bot in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Channel Bot non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Channel Bot non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Channels — Telegram, Slack, Mattermost, Teams

Read docs/channels.md. Code: app/services/channels/ — a thick service with per-platform adapters plus a router that funnels inbound messages into the same agent pipeline as the web chat.

FileResponsibility
base.pyShared adapter interface
telegram.pyTelegram (aiogram v3)
slack.pySlack (Events API + Socket Mode)
mattermost.pyMattermost
teams.py, teams_auth.pyMicrosoft Teams over the Bot Connector's HTTP protocol (#1985): JWT-verified activities, Adaptive Cards, conversation references in teams_conversations
router.pyInbound platform message → conversation/session → agent run → reply
mentions.py@slug resolution, and the identity rules below

Bots live in the DB (channel_bots), with per-user identity (channel_identity) and per-thread session (channel_session).

Surface prompts

formatting.house_style supplies current defaults at run time. Binding prompts store custom additions only; do not seed a snapshot of defaults into a new row. Migration 0183_channel_prompt_defaults.py removes exact historical defaults. Channel messages persist raw text and channel_identity_id; history author labels are resolved just before dispatch by ChannelReference, so erasure removes the labels as well. build_message_history carries opaque identity references; PreparedRun.channel_authors preserves per-user-part attribution across provider normalization and approval resumption. ChannelReferencePart marks reference-only parts omitted from run manifests. Screen editable reference values with the input policy, keeping fixed transport metadata out of question checks. Keep JSON envelopes out of Message.content. Channel metadata remains request-only reference data, outside system instructions and the guarded input. Never infer identity or authorization from display labels.

Tokens go through the vault

Bot tokens are sealed with app/core/vault.py, bound to the organization. CHANNEL_ENCRYPTION_KEY and the deployment-wide Fernet key are gone, removed before the chain was squashed into 0001_baseline. channel_bots.secret_key_version exists because the token is now an envelope and a staged master-key rotation has to know which key sealed it. See the vault-secrets skill.

The mention invariants

These are the ones worth testing and the ones easiest to break:

  • A bot serves exactly one agent - uq_exposure_bot, migration 0018. So answer_default takes the single active binding without asking what a second row would have meant, and @slug is an alias for that agent rather than a router between several. Binding a second agent is refused by the service and by the database.
  • @slug resolves only inside the bot's organization. A slug from another org is not found, not borrowed.
  • A mention runs as the sender, never as the bot. The bot's own identity would carry whatever permissions it was registered with, which is how a channel becomes a privilege-escalation path.
  • An unlinked identity is refused, not run with no role. "No role" is not a safe default; it is an unauthenticated run.

tests/test_channel_mentions.py and tests/test_channel_bot_org_scope.py pin these.

CLI

bash
uv run agenticos cmd channel-add-bot \
    --platform telegram --name "Support" --token <token> --mode jwt_linked
uv run agenticos cmd channel-list-bots [--platform telegram]
uv run agenticos cmd channel-test-message --bot-id <uuid> --chat-id <chat> --text ping
uv run agenticos cmd channel-webhook-register --bot-id <uuid>
uv run agenticos cmd channel-webhook-delete --bot-id <uuid>   # back to polling

There is no cmd channel group — the commands are flat, hyphenated names.

Access modes: open, whitelist, jwt_linked, group_only. jwt_linked refuses an unlinked chat account everywhere on its own; require_link is the switch that makes the other modes refuse in a channel too (#639).

Webhook vs polling

  • Polling (dev) — the adapter long-polls; no public URL needed.
  • Webhook (prod) — the platform POSTs to a route under api/routes/v1/. Verify the signature or secret before processing anything (HMAC for Telegram, signing secret for Slack, the Bot Connector JWT for Teams - TeamsAuth.verify, which needs the network and so is not verify_webhook_signature).
  • Teams is push only - there is nothing to poll, and a reply needs the conversation's serviceUrl, which the route records on every activity.

Adding an adapter

  1. Implement services/channels/<platform>.py against base.py: parse inbound into the normalized message, send outbound. Anything per bot the connection needs before it opens - a server address, an app token - is registered in prepare_connection, the base hook the supervisor calls on every adapter; do not add a differently named method for it.
  2. Wire it into router.py so inbound reaches the agent and replies stream back. Do not fork the agent pipeline — one runner behind every surface is the whole design.
  3. Add a signature-verified webhook route and/or a polling entrypoint. A polling entrypoint runs its session under supervise_stream from base.py — the one reconnect loop — and raises ChannelNotConfigured for anything a retry cannot fix (a missing token or URL, a token the platform rejects); do not hand-roll a while True with its own sleep.
  4. Reuse the existing conversation/session model.
  5. Respect the per-group/per-thread concurrency controls already in the adapters.

Where charts come from

Two halves, and the split is the point. The charts capability (app/agents/capabilities/charts/) owns the spec: create_chart returns a ChartSpec, which the web chat renders with Recharts and a replay draws again. A chat platform can render neither, so services/channels/chart_png.py owns the channel raster: mentions.drawn_chart takes the turn's last chart call and render_chart_png rasterises it to a PNG the adapter attaches. RENDERERS there is one entry per ChartType, held equal to the capability's list by tests/test_channel_charts.py — a new type is added in both places or fails there. There is no chart_render.py; the file is chart_png.py.

Coverage

app/services/channels/mentions.py is in the gated platform layer at 100%. The adapters are template-inherited and are not. See the backend-tests skill.

Domande frequenti

Cosa fa la skill IA Channel Bot?

Work with messaging-channel bots — Telegram, Slack, Mattermost or Microsoft Teams. Register a bot, route inbound messages through an agent, choose webhook vs polling, handle an @slug mention, or add a new channel adapter. Use when wiring chat into a messaging platform or debugging bot delivery, identity linking or "the bot answered as itself".

Perché usare Channel Bot su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Channel Bot è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Channel Bot in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/vstorm-co/agenticos/tree/main/.claude/skills/channel-bot. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Channel Bot?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Channel Bot?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Channel Bot: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Channel Bot è gratuita?

Sì. È pubblicata su GitHub da vstorm-co con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇