New creates a runtime ready to drive an agent loop. It is a thin alias for [NewLocalRuntime] returning the [Runtime] interface, kept for source compatibility with callers written before persistence became an [EventObserver]. Persistence is auto-registered against the configured (or default in-memory
(ctx context.Context, agents *team.Team, opts ...Opt)
| 559 | // [WithSessionStore] to override and [WithEventObserver] to layer |
| 560 | // additional observers (telemetry, audit, ...). |
| 561 | func New(ctx context.Context, agents *team.Team, opts ...Opt) (Runtime, error) { |
| 562 | return NewLocalRuntime(ctx, agents, opts...) |
| 563 | } |
| 564 | |
| 565 | // NewLocalRuntime creates a new LocalRuntime without the persistence wrapper. |
| 566 | // This is useful for testing or when persistence is handled externally. |