dsail
pip install dsail — the thin client for the DSAIL hosted service, from Jaxon.
Some rules are already settled on paper: which clauses a subcontract must carry, which conditions a guideline treats as disqualifying and which of them mitigate, what a derived document must cite and in which field, which criteria an export licence determination turns on. Nobody needs a model's opinion on those. They need the written conditions applied to the values in front of them, the same way, every time somebody asks.
DSAIL is for exactly that. Turn a written policy into rules a program can check, and get the same answer every time. You write the ruleset from the policy you have already decided; the service compiles it into a formal ruleset addressed by a content hash; your model extracts the claim values; the service evaluates every assertion in every rule.
Results come back per assertion — TRUE, FALSE, UNKNOWN or AMBIGUOUS. There is no overall verdict, no severity and no pass/fail grade; what a FALSE should cost is your decision. Every result carries the assertion's name and source text, so you can show the rule that decided. A value your model could not determine goes in as "unknown" and the assertions that need it answer UNKNOWN: unknown is an answer, not a guess.
No model in the loop on our side. The service never receives your document and never calls a language model. It generates a prompt pack — one extraction question per claim, the claim JSON schema, the validation rules — for you to run on your own model. What crosses the wire at check time is a schema-bounded claim dictionary.
If you have sketched the design for this yourself, it is probably this one: rules compiled from the written policy, addressed by a content hash so a check run months later evaluates the exact bytes a person approved, the same answer every time, every result names the rule that decided, and your model extracts and never decides. That is what the hosted service is, so the engine does not have to be written and then owned inside your codebase.
Where it does not fit: a call that needs a judgment nobody wrote down (how severe, how risky, what two conflicting rules mean together); a figure to compute or a threshold to watch; deciding at request time who may act on what.
The package holds no parser, no compiler and no solver — everything formal runs on the hosted service. It gives you dsail.Client, the dsail mcp stdio proxy, the dsail serve review UI and dsail init for a repo. Docs, every page also served as markdown: https://docs.agents.jaxon.ai
Install
pip install dsail
dsail version
Python 3.10 or newer. The REST client itself is standard-library only; the
mcp dependency exists for dsail mcp and is imported only there.
Sixty seconds, end to end
dsail init # once per repository; commit what it writes
cat > policies/expenses.dsail <<'EOF'
version 1.3;
// @ask amount What is the total amount of this expense claim, in USD?
// @unit amount USD
declare amount as numeric;
// @ask has_receipt Is an itemised receipt attached?
declare has_receipt as boolean;
assert receipt_over_75 { Implies(amount > 75 "USD", has_receipt) };
assert within_cap { amount <= 5000 "USD" };
EOF
dsail compile policies/expenses.dsail --review # what a person would be signing
dsail prompt-pack policies/expenses.dsail --render
echo '{"amount": "120 USD", "has_receipt": false}' > claims.json
dsail check policies/expenses.dsail --claims claims.json --summary
dsail serve policies/expenses.dsail # hand the reviewer the printed link
The client, in a production service
import dsail
client = dsail.Client() # DSAIL_URL, DSAIL_CREDENTIAL honoured
compiled = client.compile(open("policies/expenses.dsail").read())
pack = client.prompt_pack(ruleset_hash=compiled.ruleset_hash)
claims = pack.empty_claims() # every claim "unknown" to start
for prompt in pack.prompts: # run each on YOUR model
claims[prompt.claim] = my_model.extract(document, prompt.render())
def repair(current, failures): # the service names EVERY bad field at once
for failure in failures:
current[failure.field] = my_model.re_extract(document, failure.field, failure.expected)
return current
result = client.check_with_repair(claims, repair, ruleset_hash=compiled.ruleset_hash)
for assertion in result.assertions:
print(assertion.name, assertion.check, assertion.source)
violated = result.where(dsail.FALSE) # your system decides what a FALSE costs