# `Jido.Messaging`
[🔗](https://github.com/agentjido/jido_messaging/blob/v1.0.0/lib/jido_messaging.ex#L1)

Messaging and notification system for the Jido ecosystem.

## Usage

Define a messaging module in your application:

    defmodule MyApp.Messaging do
      use Jido.Messaging,
        persistence: Jido.Messaging.Persistence.ETS
    end

Add it to your supervision tree:

    children = [
      MyApp.Messaging
    ]

Use the API:

    {:ok, room} = MyApp.Messaging.create_room(%{type: :direct, name: "Chat"})
    {:ok, message} = MyApp.Messaging.save_message(%{
      room_id: room.id,
      sender_id: "user_123",
      role: :user,
      content: [%{type: :text, text: "Hello!"}]
    })
    {:ok, messages} = MyApp.Messaging.list_messages(room.id)

# `advance_onboarding`

Advance an onboarding flow.

# `assign_thread`

Assign a thread to an agent.

# `bridge_status`

Fetch runtime status for one bridge worker.

# `cancel_onboarding`

Cancel an onboarding flow.

# `complete_onboarding`

Complete an onboarding flow.

# `create_bridge_room`

Create or ensure a bridge-backed room topology in one idempotent call.

This helper ensures:
  * optional bridge configs are upserted
  * room exists
  * bridge-scoped room bindings exist
  * optional routing policy exists

# `create_participant`

Create a new participant

# `create_room`

Create a new room

# `create_room_binding`

Create a binding between an internal room and an external platform

# `delete_bridge_config`

Delete bridge config.

# `delete_ingress_subscription`

Delete adapter-scoped provider ingress subscription for a bridge.

# `delete_message`

Delete a message

# `delete_room`

Delete a room

# `delete_room_binding`

Delete a room binding

# `delete_routing_policy`

Delete room routing policy.

# `directory_lookup`

Lookup a single directory entry.

# `directory_search`

Search directory entries.

# `ensure_ingress_subscription`

Ensure adapter-scoped provider ingress subscription for a bridge.

# `get_bridge_config`

Fetch bridge config by id.

# `get_message`

Get a message by ID

# `get_message_by_external_id`

Get a message by its external ID within a channel/instance context

# `get_onboarding`

Fetch an onboarding flow.

# `get_or_create_participant_by_external_id`

Get or create participant by external ID

# `get_or_create_room_by_external_binding`

Get or create room by external binding

# `get_participant`

Get a participant by ID

# `get_room`

Get a room by ID

# `get_room_by_external_binding`

Get room by external binding (without creating)

# `get_routing_policy`

Fetch room routing policy.

# `get_thread`

Get a thread by ID

# `get_thread_by_external_id`

Get a thread by external thread ID

# `get_thread_by_root_message`

Get a thread by root message ID

# `list_agents`

List registered agents for a room.

# `list_bridge_configs`

List bridge configs.

# `list_bridge_status`

List runtime status for all bridge workers.

# `list_bridges`

List running bridge workers for an instance module.

# `list_ingress_subscriptions`

List adapter-scoped provider ingress subscriptions for a bridge.

# `list_messages`

List messages for a room

# `list_room_bindings`

List all bindings for a room

# `list_rooms`

List rooms

# `list_threads`

List threads for a room

# `put_bridge_config`

Create or update bridge config.

# `put_routing_policy`

Create or update room routing policy.

# `register_agent`

Register an agent with a room.

# `resolve_outbound_routes`

Resolve configured outbound adapter routes for a room.

# `resume_onboarding`

Resume an onboarding flow.

# `route_outbound`

Route outbound text through bridge bindings/policy for a room.

# `route_payload`

Route direct payload through bridge-config transform path into ingest.

# `route_webhook`

Route webhook payload through bridge-config parse/verify path into ingest.

# `route_webhook_request`

Route webhook request and return typed response + ingest outcome.

# `save_message`

Save a message

# `save_message_struct`

Save an already-constructed message struct (for updates)

# `save_room`

Save a room struct directly (for custom IDs)

# `save_thread`

Save a thread

# `save_thread_struct`

Save an already-constructed thread struct (for updates)

# `start_onboarding`

Start (or resume) an onboarding flow.

# `thread_assignment`

Fetch thread assignment for a room thread.

# `unassign_thread`

Unassign a thread.

# `unregister_agent`

Unregister an agent from a room.

# `update_message_external_id`

Update a message's external_id

# `whereis_onboarding_worker`

Find onboarding worker PID.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
