Skip to content

add console, simulate, and agent dev commands#810

Open
theomonnom wants to merge 13 commits intotheo/console-webrtcfrom
theo/console-v2
Open

add console, simulate, and agent dev commands#810
theomonnom wants to merge 13 commits intotheo/console-webrtcfrom
theo/console-v2

Conversation

@theomonnom
Copy link
Copy Markdown
Member

No description provided.

@theomonnom theomonnom requested review from davidzhao and rektdeckard and removed request for davidzhao April 2, 2026 21:56
@theomonnom theomonnom force-pushed the theo/console-webrtc branch from b977661 to 734ede1 Compare April 2, 2026 22:50
- Add friendly error when no agent project is detected (start/dev/console)
- Print detected language and directory to stderr for start/dev/console
- Deduplicate console detection logic to use shared detectProject()
- Add nil guard in BytesToSamples for empty data
- Detect project root from entrypoint directory when --entrypoint is set
- Better entrypoint-not-found error showing checked paths
- Print detected language and directory to stderr for start/dev/console
- Render CLI errors in red at the call site
- Add maxMessageSize check to IPC WriteProto
@theomonnom theomonnom force-pushed the theo/console-v2 branch 9 times, most recently from a63b57e to 23148aa Compare April 3, 2026 00:16
Copy link
Copy Markdown
Member

@rektdeckard rektdeckard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for expediency, and I am in fact able to build and test (mostly) successfully against agents on theo/1.6.0 branch -- but there are some rough edges particularly around console project/entrypoint detection, text mode, and ergonomics that need some attention. I have not had success testing simulations, as I assume there is still outstanding backend work for that?

Comment thread cmd/lk/console.go
Action: runConsole,
}

func runConsole(ctx context.Context, cmd *cli.Command) error {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing weird behavior when switching between audio and text modes in the console:

  • In text mode, messages are printed out-of-order (agent responses appearing before user)
  • Switching to text mode mid-call does not seem to work; responses continue to arrive in audio modality and text responses don't get printed

Comment thread cmd/lk/agent_run.go
Comment on lines +40 to +54
&cli.StringFlag{
Name: "url",
Usage: "LiveKit server `URL`",
Sources: cli.EnvVars("LIVEKIT_URL"),
},
&cli.StringFlag{
Name: "api-key",
Usage: "LiveKit API `KEY`",
Sources: cli.EnvVars("LIVEKIT_API_KEY"),
},
&cli.StringFlag{
Name: "api-secret",
Usage: "LiveKit API `SECRET`",
Sources: cli.EnvVars("LIVEKIT_API_SECRET"),
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These flags are already available globally; no need to redefine or even declare them on this command. But FYI, the precedence of resolution is:

  1. project specified in livekit.toml (actually this is probably too high, should probably be after flags but separate issue)
  2. explicit flags (--api-key, --api-secret, --url)
  3. explicit project (--project)
  4. environment variables
  5. default project

Comment thread README.md
make install
```

### Building with console support
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's maybe comment this out until we feel the feature is stable

Comment thread Formula/lk.rb
# This formula is meant for a custom Homebrew tap (e.g. livekit/homebrew-livekit).
# It installs a prebuilt binary with console support (PortAudio + WebRTC AEC).
# Usage: brew install livekit/livekit/lk
class Lk < Formula
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we are unable to distribute prebuilt binaries through homebrew's core package repository?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah homebrew has to build it from source.. and sign it with apple distribution keys

@rektdeckard
Copy link
Copy Markdown
Member

@claude review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants