- The publishable artifact —
contract.yaml+strategy.py. These describe what the strategy needs and what it computes. They are environment-agnostic by design. - The environment binding —
binding.yaml. This describes how to fetch the data the contract asks for, in your particular environment.
binding.yaml to point at its own Elasticsearch cluster, its own VendorSecurity tenant, its own Snowflake warehouse — and the same Python code runs unchanged.
What lives where
| File | Lives where | Travels with the strategy? |
|---|---|---|
contract.yaml | The strategy directory | Yes — publishable |
strategy.py | The strategy directory | Yes — publishable |
binding.yaml | Same directory, but environment-specific | No — local to your install |
Why a separate file
The contract declares an abstract requirement:Do I always need a binding.yaml?
No. Bindings are optional. Without one, the resolver attempts automatic resolution via the knowledge graph using semantic column tags in the contract:semantic tag and the knowledge graph knows which MCP tool returns that semantic, the resolver picks the source automatically. No binding.yaml needed.
You write an explicit binding when:
- Some columns lack semantic tags (or no tags at all).
- Multiple backends could satisfy the contract and you want to pin one explicitly.
- You need non-default fetch behavior — a custom query template, pagination, a specific MCP tool argument, a response adapter.
- You want guarantees: the binding makes the data path explicit and reviewable.
How this plays at runtime
When an agent callsstrategy_run:
- The gateway loads
contract.yamlto learn what tables the strategy wants. - It looks for
binding.yamlnext to it. If present, the binding tells it exactly how to fetch each table. - For any table not covered by the binding, the gateway falls back to auto-resolve via semantic tags + the knowledge graph.
- The fetched rows are written to Parquet, loaded into a fresh DuckDB, and the strategy’s
@stepmethods run on top.
strategy.py only ever sees DuckDB tables matching the contract — it has no knowledge of where they came from. That’s what makes the whole thing portable.
Next
- Bindings — the full
binding.yamlschema, fetch modes, and field mapping - Contracts — the full
contract.yamlschema, including semantic tags - Quick Start — see all three files in a minimal working strategy

