Handling complex policies
Judging long policies precisely
Some of your agent's hardest policies are also its longest: a return procedure with six steps, a retention offer with three conditions. On every turn, the agent has to work out which part of such a policy matters right now. Compass Pro adds a policy distiller that does this work for it. The agent gets a focused reading of the policy instead of the whole document, so it follows long procedures step by step and applies exceptions where they belong. You write policies exactly as before.
- Why long policies are hard to judge at matching time
- What the policy distiller does on each turn
- When distillation runs, by policy weight and turn effort
- How to turn it on by serving with the Pro engine
Consider a toy case. A customer answers two steps of your return procedure at once, then changes which item they want to return. Your agent now has to work out which part of the procedure matters right now. That is a harder question when the instructions include several steps, branches, and exceptions.
This page explains why, and what Compass Pro does about it.
Policies as whole documents
A policy is the plain-language instruction or procedure your agent follows. A retention policy, for example, can make an offer depend on the customer's plan, their tenure, and the offers they have already received.
Designing policies encourages you to write a policy like this as one complete document. The reason is simple: your agent follows a whole procedure far better than it follows scattered fragments of one.
The trade-off at matching time
The trade-off shows up at matching time. Matching is the part of every turn where Parlant judges which of your agent's policies apply to the current moment (i.e., which ones it should act on now).
Judging whether a six-step procedure applies right now, and which part of it, is harder than judging a one-line steering policy. The open engine does this well for most catalogs. Compass Pro does it better for the catalogs where the hard policies carry the business.
The policy distiller
Now that we have seen where the difficulty lies, let's look at how Compass Pro addresses it.
The policy distiller makes sure your agent acts on the right part of a complex policy, rather than interpreting the whole document on its own each turn. Compass Pro adds it to the matching stage.
On the turns where a complex, high-weight policy is in play, the distiller works out which part of that policy the current moment actually calls for. It then hands your agent that focused reading, instead of the entire document.
The effect is threefold. Your agent follows long procedures step by step more reliably. It applies the exceptions inside a policy where they belong. And it stops re-deciding, on every turn, where in a flow it is.
Nothing about how you write policies changes. Write the document the way the policy design guide recommends, and the Pro engine gets more out of it.
When distillation runs
Distillation is selective, which is what keeps it affordable. Two settings decide when Parlant runs it.
The first is a policy's weight, how strictly your agent must follow it. You set it with weight when you create the policy.
The second is a turn's effort, how much model work the turn gets, from MIN to MAX. You set it on the agent, and rules that need care can raise it.
Parlant runs the distiller only on policies it has already judged worth a careful model verdict: high-weight policies at medium effort, and medium- and high-weight policies at high effort.
Note that routine turns and simple policies take the same fast path as before. The cost lands only where a wrong match would cost you more.
Adaptive effort covers each of the levels and how rules raise them.
Turning it on
Once you have decided the distiller is worth trying, there is very little to do.
There is no distiller to configure and nothing to annotate on a policy. You get it by running your existing agent on the Pro engine. That means you can compare the two engines on the same policies before committing.
Compass Pro is a wheel you install next to Parlant. After installing it, ask your coding agent to serve with ProServer in place of Server:
pip install ./parlant_pro-<version>-py3-none-any.whl
import parlant.sdk as p
from parlant.pro import ProServer
async with ProServer(models={"*": "openrouter"}) as server: # the only line that changes
agent = await server.create_agent(
id="support",
name="Support Agent",
instructions="Help customers with orders, returns, and billing.",
)
ProServer accepts the same arguments as p.Server: models, prompts, stores, auth, and the container hooks. Your config.py from parlant init changes in one line, and the same agent, policies, and tools run on the Pro engine.
The distiller's prompts are customizable through the same mechanism as the open engine's, under their own section names, as Customizing prompts describes.
What else is in Compass Pro
To bring it all together, the distiller is one of several additions in Compass Pro. The overview lists everything Compass Pro adds and how to get access.