I am trying to prototype an agent. I setup my live...
# self-hosting
m
I am trying to prototype an agent. I setup my livekit server (from source) and it is running ok. I connect a user using this app: https://meet.livekit.io/?tab=custom that i point to my local livekit. When I join just the user all is working ok but there is agent in the room yet. I then start the agent and re-connect the user again. I see on the interface that both user and agent are in the room but the server crashes with the crash error:
Copy code
2025-12-05T14:33:07.513-0500	DEBUG	livekit	signalling/signallerasync.go:105	sent signal response	{"room": "my-first-room", "roomID": "RM_v3EeJUAZk5n3", "participant": "user1", "pID": "PA_eRqhsycaQ8LK", "remote": false, "response": {"subscriptionPermissionUpdate": {"participantSid": "PA_GjaqaM7Rz3rp", "trackSid": "TR_AMj736avnm6FSs", "allowed": true}}}
panic: unaligned 64-bit atomic operation

goroutine 310 [running]:
internal/runtime/atomic.panicUnaligned()
	/home/alex/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.6.linux-386/src/internal/runtime/atomic/unaligned.go:8 +0x2d
internal/runtime/atomic.Store64(0xea1608c, 0xa7a7)
	/home/alex/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.6.linux-386/src/internal/runtime/atomic/atomic_386.s:245 +0x10
go.uber.org/atomic.(*Uint64).Store(...)
	/home/alex/go/pkg/mod/go.uber.org/atomic@v1.11.0/uint64.go:82
github.com/livekit/livekit-server/pkg/sfu.NewDownTrack({{0xd059c80, 0x2, 0x2}, 0x0, 0x2, {0x9bacf80, 0xdca32d0}, 0xd35e390, {0xc487610, 0xf}, ...})
	/home/alex/sng/livekit/pkg/sfu/downtrack.go:442 +0xb04
github.com/livekit/livekit-server/pkg/rtc.NewSubscribedTrack({{0x1f4, 0xc8}, {{{0xc6a1938, 0x1, 0x1}, {0xc781d80, 0x3, 0x4}}, {{0xc4072e0, 0x1, ...}, ...}}, ...})
	/home/alex/sng/livekit/pkg/rtc/subscribedtrack.go:132 +0xdef
github.com/livekit/livekit-server/pkg/rtc.(*MediaTrackSubscriptions).AddSubscriber(0xd87b580, {0x9bb7208, 0xcd18708}, 0xdca32d0)
	/home/alex/sng/livekit/pkg/rtc/mediatracksubscriptions.go:109 +0x235
github.com/livekit/livekit-server/pkg/rtc.(*MediaTrackReceiver).AddSubscriber(0xc7bec48, {0x9bb7208, 0xcd18708})
	/home/alex/sng/livekit/pkg/rtc/mediatrackreceiver.go:588 +0x6ee
github.com/livekit/livekit-server/pkg/rtc.(*SubscriptionManager).subscribe(0xd334a80, 0xd8c7e00)
	/home/alex/sng/livekit/pkg/rtc/subscriptionmanager.go:576 +0x431
github.com/livekit/livekit-server/pkg/rtc.(*SubscriptionManager).reconcileSubscription(0xd334a80, 0xd8c7e00)
	/home/alex/sng/livekit/pkg/rtc/subscriptionmanager.go:393 +0x13a
github.com/livekit/livekit-server/pkg/rtc.(*SubscriptionManager).reconcileWorker(0xd334a80)
	/home/alex/sng/livekit/pkg/rtc/subscriptionmanager.go:499 +0x1b0
created by github.com/livekit/livekit-server/pkg/rtc.NewSubscriptionManager in goroutine 240
	/home/alex/sng/livekit/pkg/rtc/subscriptionmanager.go:94 +0x184
the agent side has this:
Copy code
"AJ_kiKSEz8tPg33", "room_id": "RM_v3EeJUAZk5n3"}
                 DEBUG  livekit.agents     using transcript io:
                                           `AgentSession` ->
                                           `TranscriptSynchronizer` ->
                                           `RoomIO`
                                         {"pid": 3192765, "job_id":
"AJ_kiKSEz8tPg33", "room_id": "RM_v3EeJUAZk5n3"}
    14:33:07.518 WARNI… livekit.agents     failed to connect to livekit,
                                           retrying in 0s
Traceback (most recent call last):
  File
"/home/alex/sng/livekit-all/python-agents-examples/venv/lib/python3.10/site-pac
kages/livekit/agents/worker.py", line 1013, in _connection_task
    await self._run_ws(ws)
  File
"/home/alex/sng/livekit-all/python-agents-examples/venv/lib/python3.10/site-pac
kages/livekit/agents/worker.py", line 1094, in _run_ws
    await asyncio.gather(*tasks)
  File
"/home/alex/sng/livekit-all/python-agents-examples/venv/lib/python3.10/site-pac
kages/livekit/agents/worker.py", line 1066, in _recv_task
    raise Exception("worker connection closed unexpectedly")
Exception: worker connection closed unexpectedly
i am not sure what is going on. I am rather new to livekit and was hoping to setup a basic local example without telephony or any other bells and whistles. I was curious if i am just doing something totally dumb?
also if anyone knows of any good tutorials that have some step by step setup for the basic example with concrete pointers to tools that would allow a beginner to start playing with this kit.