---
title: "Several agents on one box"
lesson_id: "05"
---

# Several agents on one box

- **Lesson ID:** 05
- **Goal:** Size and measure one local server shared by several agents.
- **Human lesson:** [05-several-agents-on-one-box.html](05-several-agents-on-one-box.html)

## Prerequisites

- Lesson 01 environment.

## Inputs, outputs, and artifacts

- **Inputs:** Number of agents and their longest prompt.
- **Outputs:** Slot layout and a speed table for 1, 2, 4 agents.
- **Artifacts:** `parallel_bench.py` output and the server startup log.

## Agent build steps

1. Start `llama-server -hf Qwen/Qwen3-1.7B-GGUF:Q8_0 --port 8080 -c 8192 -np 4`.
2. Read `n_slots`, `n_ctx_slot`, `kv_unified` from the log.
3. Run `uv run python parallel_bench.py 1 2 4`.
4. Repeat with `-kvu` and compare.
5. Check Ollama logs for a forced single slot on hybrid models (Ollama #18938).
6. Write down when you would move to vLLM.

## Constraints

Keep the language simple, friendly, and literal. No quizzes, no em dashes. Brand Edge FDE only. Use small local models. Do not invent flags, endpoints, or issue numbers. 

## Key concepts

- `-np N` with `-c` splits the context per slot unless you add `-kvu`.
- A full context returns an error. Nothing is trimmed for you.
- More slots raise total speed and lower per-agent speed.
- Some runtimes force one slot for hybrid models (Ollama #18938).

## Takeaways

- Read `n_slots`, `n_ctx_slot`, and `kv_unified` from your own log.
- Measure total and per-agent speed with your own prompts.
- Move to vLLM when you need many users or several GPUs.

## Acceptance checks

- The table shows total and per-agent tok/s.
- The split vs shared context behavior is stated from the real log.
- Links to Ollama #18938 and llama.cpp #30276 are present.
- [ ] Return to the [course SKILL.md](SKILL.md).
