Skip to content

Plugin API: let plugins add their own entries to a thread's timeline #4852

Description

@brsbl

Problem

Plugins can't put anything in a thread's timeline themselves. A plugin can only draw inside an agent's reply, using a message directive. Anything a plugin wants to show either waits for the agent to write a tag or needs bb core to do it.

Who needs it

  1. Automations. Each run posts its prompt as a user message, and core has automation-specific code that restyles it as an "Automation · time" row. With this API, the Automations plugin could draw that entry itself, and core wouldn't need to know about automations.
  2. Digests, a bb plugin that posts scheduled briefings (for example "2 emails need you today") as their own threads. Each briefing is drawn as a card: "Preparing…", then the briefing, or "Didn't finish" with Retry. Today the agent has to write a tag for the card to appear. If the run fails before the agent writes anything, the thread is empty and the failure is silent.
  3. Thread activity, a possible future plugin that records what happens to a thread as entries in its timeline:
    • Reparenting: the user sees a confirmation ("Moved under Email and LinkedIn"), and the note telling the agent about its new parent goes to the agent only (the plugin can already send hidden input), so it doesn't clutter the timeline.
    • Moving to another section, for example from Building to Review.
    • Archiving and unarchiving.

bb core already draws entries like this for its own events: the "Working" and "Stopped" markers. Plugins have no way to add their own.

What's needed

  • A plugin can add an entry to a thread's timeline, independent of agent output, including before the turn starts.
  • The plugin renders the entry with its own component, in the same way as message directives.
  • The plugin can update the entry later, for example running → finished or failed.
  • Entries stay in place through reloads and pagination, and show up on desktop, web and mobile.
  • Additive: nothing existing changes.

Not in scope

  • Changing how user or agent messages look.
  • Letting plugins edit or hide other timeline rows.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginsPlugin SDK, runtime, marketplacethreadsTurns, timeline, messaging, forks

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions