feat(cli): stream live call events + build logs (crew observability, phase 1) - #100
Open
abhishekmishragithub wants to merge 1 commit into
Open
feat(cli): stream live call events + build logs (crew observability, phase 1)#100abhishekmishragithub wants to merge 1 commit into
abhishekmishragithub wants to merge 1 commit into
Conversation
Surfaces observability data that the platform already emits but the CLI did not expose: - smallestai calls events <callId> — stream a live call's events over SSE (GET /events): transcript turns, per-turn latency, node transitions, tool calls, and errors, as they happen. 400 (call finished) and 404 map to clear messages. - smallestai calls transcript <callId> --follow — same stream, filtered to the conversation turns. - smallestai agent-crew logs [buildId] — stream a build's compile + deploy logs (GET .../builds/:id/stream); defaults to the latest build. Revives the previously-disabled logs command. Adds two SSE helpers to the CLI HTTP client (stream_call_events, stream_agent_build) sharing one data-frame parser. All use the session token the CLI already holds. Tests cover SSE frame parsing and the event renderers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of crew observability: surface data the platform already emits but the CLI never exposed. No platform or pipecat change needed — these endpoints are session-authed and the CLI already holds a session token.
New commands
smallestai calls events <callId>— stream a live call's events over SSE (GET /atoms/v1/events?callId=): transcript turns, per-turn latency, node transitions, tool calls, KB lookups, and errors, live while the call runs.--jsonfor raw frames. Clear messages for 400 (call already finished → usetranscript) and 404.smallestai calls transcript <callId> --follow— the same stream, filtered to conversation turns.smallestai agent-crew logs [buildId]— stream a build's compile + deploy logs (GET .../builds/:buildId/stream); defaults to the latest build. Revives the previously-disabledlogscommand.Under the hood
Two SSE helpers on the CLI HTTP client (
stream_call_events,stream_agent_build) share onedata:frame parser. Tests cover frame parsing (keep-alives, non-JSON, no-spacedata:) and the event renderers (known + unknown event types).Scope notes
/eventsstream is only as rich as what the crew runtime publishes today (transcript, TTS, latency, node state, tool calls, errors). Phase 3 (enriching pipecat + crew runtime events, and persisting them for post-call pull) is a separate design pass./eventsand the build endpoints, which areverifyToken-only today.Green locally: ruff 0.16.1 (check + format), pytest (CLI + crew slice 40 passed).
cli/is excluded from CI mypy by repo config.Held for review.