Skip to content

Commit 2f75386

Browse files
committed
workflows
1 parent c2084a5 commit 2f75386

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

AGENTS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ The following is a guide for working with this project.
66

77
## Project structure
88

9-
109
This Python project uses the `uv` package manager. You should always use `uv` to install dependencies, run the agent, and run testss
1110

12-
All app-level code is in the `src/` directory. In general, simple agents can be constructed with a single `agent.py` file. Additional files can be added (e.g. library code), but you must retain `agent.py` as the entrypoint (see the associated Dockerfile for how this is deployed).
11+
All app-level code is in the `src/` directory. In general, simple agents can be constructed with a single `agent.py` file. Additional files can be added, but you must retain `agent.py` as the entrypoint (see the associated Dockerfile for how this is deployed).
1312

1413
Be sure to maintain code formatting. You can use the ruff formatter/linter as needed: `uv run ruff format` and `uv run ruff check`.
1514

@@ -31,14 +30,18 @@ claude mcp add --transport http livekit-docs https://docs.livekit.io/mcp
3130

3231
If you are another agentic IDE, refer to your own documentation for how to install it.
3332

33+
## Handoffs and tasks ("workflows")
34+
35+
Voice AI agents are highly sensitive to excessive latency. For this reason, it's important to design complex agents in a structured manner that minimizes the amount of irrelevant context and unnecessary tools present on requests to the LLM. LiveKit Agents supports handoffs (one agent hands control to another) and tasks (tightly-scoped prompts to achieve a specific outcome) to support building reliable workflows. You should make use of these features, instead of writing long instruction prompts that cover multiple phases of a conversation. Refer to the [documentation](https://docs.livekit.io/agents/build/workflows/) for more information.
36+
3437
## Testing
3538

3639
When possible, add tests for agent behavior. Read the [documentation](https://docs.livekit.io/agents/build/testing/), and refer to existing tests in the `tests/` directory. Run tests with `uv run pytest`.
3740

38-
Important: When modifying core agent behavior such as instructions, tool descriptions, and tasks/workflows/handoffs, never make guesses about what will work. Always use test-driven development (TDD) and begin by writing tests for the desired behavior. For instance, if you're planning to add a new tool, write one or more tests for the tool's behavior, then iterate on the tool until the tests pass correctly. This will ensure you are able to produce a working, reliable agent for the user.
41+
Important: When modifying core agent behavior such as instructions, tool descriptions, and tasks/workflows/handoffs, never just guess what will work. Always use test-driven development (TDD) and begin by writing tests for the desired behavior. For instance, if you're planning to add a new tool, write one or more tests for the tool's behavior, then iterate on the tool until the tests pass correctly. This will ensure you are able to produce a working, reliable agent for the user.
3942

4043
## LiveKit CLI
4144

42-
You can make use of the LiveKit CLI (`lk) for various tasks, with user approval. Installation instructions are available at https://docs.livekit.io/home/cli if needed.
45+
You can make use of the LiveKit CLI (`lk`) for various tasks, with user approval. Installation instructions are available at https://docs.livekit.io/home/cli if needed.
4346

4447
In particular, you can use it to manage SIP trunks for telephony-based agents. Refer to `lk sip --help` for more information.

0 commit comments

Comments
 (0)