Quick Start
1
Declare a descriptor
List your channel’s config fields and a prompt hint on a small descriptor class:
Availability. Before PraisonAI PR #3622,
system_prompt_hint was declared but not delivered to the model on the gateway path — the resolver existed, but nothing called it. As of PR #3622 the gateway auto-injects the hint at per-channel bot construction (and again on hot-reload), so a plugin’s declared hint now actually reaches the agent.2
Register the platform
Pass the descriptor when you register the adapter — the gateway wires config, onboarding, and prompt for you:
Without a descriptor, a plugin channel’s own keys (like IRC’s
server) are silently dropped by the fixed ChannelConfigSchema. The descriptor keeps them.How It Works
One declaration feeds five consumers when the channel is active.CLI flags are generated from config_fields
A channel’s declared config_fields are accepted on praisonai bot run as --field-name flags, so the same declaration drives YAML, the wizard, the agent prompt hint, and the CLI.
praisonai bot run for syntax and the exit-code-2 error on unknown flags.
Guarantees. The auto-injection is:
- Bounded — a single trailing append.
- Idempotent — won’t double-append across hot-reload or re-clone if the hint is already present.
- Deterministic — one ordered append keeps the prompt prefix cache-stable.
- No-op for built-in channels that declare no hint.
- Opt-in — only affects third-party channels that declare a
system_prompt_hint.
backstory (and the rebuilt system_prompt) — the fields the runtime prompt builder actually reads — not instructions, which is a construction-only attribute.Issue #3621: Prior to this release the hint field existed on the descriptor but was never read by the runtime. Third-party channels that shipped a
system_prompt_hint before that release should verify their hint now reaches the model.How the hint reaches the model
The gateway resolves the descriptor’s hint and appends it to the cloned agent’sbackstory, then rebuilds system_prompt — the runtime prompt builder reads those, not the construction-only instructions.
ChannelField Options
EachChannelField describes one config key the channel needs.
Interactive Setup
Add an optionalsetup(io) hook for multi-step flows that a flat field list can’t express — the wizard calls it when present and merges the returned values.
setup is optional. A descriptor that only needs declarative config_fields omits it entirely.Gateway-less scheduled delivery
Declare an optionalstandalone_sender and your channel also receives scheduled briefs when no gateway is resident, just like the five bundled channels.
The sender can be sync or async and receives
(target, text). If it raises, the run records delivery_error. Put the descriptor on the adapter class as channel_descriptor: praisonai schedule tick runs in a fresh process where your own register_platform() calls never run.Availability. The optional
standalone_sender member landed in PraisonAI PR #6100 (fixes #6099). Earlier versions needed a resident gateway for a custom channel to receive scheduled deliveries.Best Practices
Mark secrets with secret=True
Mark secrets with secret=True
Set
secret=True on tokens and passwords so the wizard masks them and logs never print the value.Provide an env fallback for secrets
Provide an env fallback for secrets
Add
env="IRC_NICKSERV_PASSWORD" so operators can supply credentials via environment variables instead of prompts.Keep the prompt hint short and concrete
Keep the prompt hint short and concrete
State the platform and its constraints in one line — for example plain text only, one short line — so the agent adapts its replies.
Use setup only when fields aren't enough
Use setup only when fields aren't enough
Reach for
setup(io) for bespoke, multi-step flows. Declarative config_fields cover the common case with no code.Pair standalone_sender with env-backed secrets
Pair standalone_sender with env-backed secrets
The sender runs out of process (OS cron, CI, serverless) and the onboarding wizard never runs there. Give every secret it needs an
env= fallback on its ChannelField. See Standalone Sender for Custom Channels.Pick CLI-friendly field names
Pick CLI-friendly field names
Avoid names that clash with fixed
bot run flags (token, port, agent, model, platform). A field named like a handler parameter (e.g. an IRC adapter’s channel) is routed through channel.model_extra so it still reaches the adapter, but unambiguous names are clearer for users.Idempotency & prompt-cache safety
Idempotency & prompt-cache safety
The gateway appends the hint as a single trailing line, so injection is deterministic and the prompt prefix stays cache-stable across turns. A hint already present on the agent’s
backstory is a no-op on hot-reload, so re-clones never duplicate it.Related
Messaging Bots
Connect agents to Telegram, Slack, Discord, and more
Bot Platform Capabilities
How platform capabilities drive channel behaviour
Gateway
Multi-agent coordination across channels
Plugins
Ship channels and tools as pip packages
Channel Directory
How an adapter enumerates the channels it can see
Visible-Outcome Guarantee
Every inbound turn ends in a visible reply or a deliberate silence
Prompt-hint auto-injection introduced in PraisonAI PR #3622 (fixes #3621).

