Skip to content

feat(agent): multi-agent orchestration and session control #87

Description

@Svagtlys

Description

Multi-agent orchestration and session control: sub-agent spawning, turn arbitration, termination authority. Adds sessions.driver_participant_id (nullable, composite FK to session_participants, NULL = owner-driven), sessions.turn_policy (round_robin | llm_select | supervisor | handoff), optional turn cursor and budget columns, and the agent_run / agent_result / handoff / turn_assigned event kinds.

Why

The shipped transcript schema makes multi-party/A2A/autonomous sessions reachable without re-modeling, but no orchestration behavior exists. Termination authority and speaker selection are separate axes; a runaway-loop backstop (semantic + convergence + budget) is mandatory for any autonomous design.

Do not re-derive the reasoning: see the spec section "Design rationale for the deferred orchestration set" in .agents/specs/2026-09-13-vector-db-schema-orm-design.md.

Scope

  • Additive Alembic revision: driver_participant_id, turn_policy, cursor/budget columns
  • New EventKind values (TEXT-backed; no CHECK rebuild needed)
  • Turn arbitration policy + runaway-loop backstop
  • Tests

Blocked by #84. Spec: .agents/specs/2026-09-13-vector-db-schema-orm-design.md (Follow-up issues, item 3).

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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions