You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,9 @@ The following is a guide for working with this project.
6
6
7
7
## Project structure
8
8
9
-
10
9
This Python project uses the `uv` package manager. You should always use `uv` to install dependencies, run the agent, and run testss
11
10
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).
13
12
14
13
Be sure to maintain code formatting. You can use the ruff formatter/linter as needed: `uv run ruff format` and `uv run ruff check`.
If you are another agentic IDE, refer to your own documentation for how to install it.
33
32
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
+
34
37
## Testing
35
38
36
39
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`.
37
40
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.
39
42
40
43
## LiveKit CLI
41
44
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.
43
46
44
47
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