Skip to content

Commit 64a34b6

Browse files
authored
Update README.md with Agents block (#819)
1 parent c0bebca commit 64a34b6

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,41 @@ This repo contains two packages
2222
- [livekit](https://pypi.org/project/livekit/): Real-time SDK for connecting to LiveKit as a participant
2323
- [livekit-api](https://pypi.org/project/livekit-api/): Access token generation and server APIs
2424

25+
<!--BEGIN_AGENTS_INFO-->
26+
> [!IMPORTANT]
27+
> If you're building Voice AI, [LiveKit Agents](https://github.com/livekit/agents) is the SDK for code-first realtime voice agents. STT, LLM, TTS, turn detection, [expressive speech](https://docs.livekit.io/agents/models/tts/expressive/), [keyterm accuracy](https://docs.livekit.io/agents/models/stt/keyterms/), tool usage, and telephony all come bundled in the framework. It's available in both [Python](https://github.com/livekit/agents) and [Node.js](https://github.com/livekit/agents-js).
28+
>
29+
> ```python
30+
> # agent.py
31+
> from livekit import agents
32+
> from livekit.agents import Agent, AgentServer, AgentSession, STTContextOptions, TurnHandlingOptions, inference
33+
>
34+
> server = AgentServer()
35+
>
36+
>
37+
> @server.rtc_session(agent_name="my-agent")
38+
> async def my_agent(ctx: agents.JobContext):
39+
> session = AgentSession(
40+
> stt=inference.STT(model="deepgram/nova-3", language="multi"),
41+
> llm=inference.LLM(model="google/gemma-4-31b-it"),
42+
> tts=inference.TTS(model="inworld/inworld-tts-2", voice="Ashley"),
43+
> turn_handling=TurnHandlingOptions(turn_detection=inference.TurnDetector()),
44+
> stt_context_options=STTContextOptions(keyterms=["LiveKit", "Acme Corp"]),
45+
> expressive=True,
46+
> )
47+
> await session.start(room=ctx.room, agent=Agent(instructions="You are a helpful voice AI assistant."))
48+
> await session.generate_reply(instructions="Greet the user and offer your assistance.")
49+
>
50+
>
51+
> if __name__ == "__main__":
52+
> agents.cli.run_app(server)
53+
> ```
54+
>
55+
> Models come from [LiveKit Inference](https://docs.livekit.io/agents/models/) with no per-provider API keys, and LiveKit Cloud handles [deployment](https://docs.livekit.io/deploy/agents/) and [observability](https://docs.livekit.io/deploy/observability/). Visit the docs for more info at [docs.livekit.io/agents](https://docs.livekit.io/agents/).
56+
>
57+
> Using a coding agent? Install the LiveKit skill with `npx skills add livekit/agent-skills` and add the docs MCP at `https://docs.livekit.io/mcp/` (see [coding agent support](https://docs.livekit.io/intro/coding-agents/)).
58+
<!--END_AGENTS_INFO-->
59+
2560
## Using Server API
2661
2762
```shell

0 commit comments

Comments
 (0)