Skip to main content
  1. Prompt-level techniques — what a single model call is asked to do and how the ask is phrased.
  2. Context engineering — what fills the context window: what gets written, selected, compressed and isolated.
  3. Agentic workflow patterns — how many calls, in what shape, with which gates: chains, routing, parallel workers, evaluators, waves, phases.
Lousho gives you the second and third layers as real machinery (tools, permissions, memory, sub-agents, flows, evaluators), so prompt-level techniques stay a thin layer of instructions on top.

Prompt-level techniques

These all reduce to instructions and message shape — createAgent’s instructions / prompt, seeded session turns, and output schemas. Two rules of thumb:
  • Instructions steer; machinery enforces. Anything that must never happen (no deletes, no prod writes) goes in permissions, guardrails and tools — not the prompt.
  • Techniques that spend more tokens (self-consistency, trees, critiques) pay off where a wrong answer is expensive; watch result.usage / limits and budget them like any other spend.

Context engineering

The four operations, and where each lives in the SDK:
The practical ordering: write durable facts to memory, select skills and tools on demand, compress the transcript when it grows, isolate anything token-hungry (search result dumps, file reads, subprocess output) behind a sub-agent or a tool that returns a digest.

Agentic workflow patterns

The canonical shapes (Anthropic’s “building effective agents” taxonomy) and the community terms that named two of them — all runnable in the repo:

Typed decisions (“System One” style)

Some steps shouldn’t generate text at all — they should decide: classify, route, score, verify. The pattern (TypeSafe’s Jev makes a whole model of it) is a typed probabilistic decision: unstructured state in, { action, confidence } out, and the workflow branches on it. In Lousho that’s an agent with an output schema feeding a flow’s oneOf — and a confidence floor that routes low-confidence calls to a human instead of acting on a guess:
coding-agent-workflows is the full example: a coding agent driven by a deterministic workflow whose branch points are typed decisions, where confidence below the floor exits needs-human instead of patching.

Where to go next