Choose an agent framework by running the same failure fixtures
Compare implementations of Alder with a shared behavioral contract. Test tool results, resume, handoff ownership and cancellation before choosing framework conveniences.
21 MIN
By AIAgentInterviews · Updated
TL;DR: Choose a framework by the application semantics it preserves under failure. Run the same contract fixtures through each adapter, record the behavior you must implement yourself, and keep authority and grading independent of the framework.
Where you are. Alder's contracts are defined. Compare implementation choices by the failure behavior they preserve.
The demo looks identical until the process dies
Two implementations of Alder both inspect a work order, ask a specialist and propose a visit. One stores a conversation in memory; the other persists a checkpoint. A restart after approval exposes a difference that the happy-path demo cannot show. “Supports agents” says little about the failure contract you need.
Write the application contract first. It includes unique tool-call pairing, typed failures, a durable task handle, scoped delegation, independent policy checks and a result that distinguishes completed from unresolved effects. A framework can supply some of those pieces. The remainder stays your responsibility.
In plain language. A framework adapter translates your application contract into a library's interfaces. Failure semantics describe what happens after timeout, restart or cancellation. Similar method names do not imply the same recovery behavior.
Compare semantic boundaries
Use one scripted model and identical fake tools for every candidate adapter. The model should emit a normal call, a malformed call, multiple calls whose results arrive out of order, a request for a forbidden tool and a final proposal without completion evidence. The expected outcome comes from Alder's contract, not from whatever each framework happens to return.
| Fixture | Question the implementation must answer |
|---|---|
| Restart after approval | What state survives, and what code reruns? |
| Lost booking response | Which operation identity is reused for reconciliation? |
| Worker failure | Who owns the user reply and missing evidence? |
| Cancel during dispatch | Which work stops, and which effect remains uncertain? |
| Schema change | Does old state migrate, pin or refuse? |
A passing fixture demonstrates the behavior in the tested configuration. It is not a claim that every deployment backend or SDK version behaves identically.
Separate components that share a name
A session may mean stored chat history, while a checkpoint may include control state required to resume. A cross-session store may provide memory without providing workflow replay. A handoff may transfer dialogue ownership while an agent-as-tool returns to a caller. Trace exporters may record events without enforcing any execution rule.
Describe these differences in the comparison report. Avoid a feature-count table where every product receives a check mark for “memory” despite storing different things. The useful row names the record, who writes it, how it is scoped, what survives a crash and how it is corrected.
Keep adapter code narrow
Translate provider messages and framework events into the internal task contract. Keep business policy, operation identity and graders outside this translation layer. That makes a migration testable: replacing the orchestration engine should not silently replace the definition of authorized booking.
Record any framework-specific replay behavior and isolate effecting operations accordingly. A node or callback that can run again after resume must not hide an unjournaled service write. Likewise, a synchronous-looking worker call may retain substantial context that you intended to filter; inspect the actual request snapshot.
Make an evidence-based choice
Score a candidate on the failure fixtures, operational requirements, team familiarity and the amount of custom code left to maintain. Include deployment dependencies and version pinning. Do not claim speed or cost advantages without measuring the same task and configuration.
If plain code meets the contract with less machinery, it remains a valid choice. If a framework supplies tested persistence and routing you would otherwise build, document that benefit and the exact backend used. A small abstraction is useful only when its semantics remain understandable at the point where your system can fail.
Choose the implementation whose unsupported behavior you can name and own. Keep the contract suite so the next upgrade must demonstrate those same properties again.
Convenience is evaluated after failure behavior is understood.
Contract
application invariants
Adapters
framework-specific mapping
Fixtures
restart, deny, cancel, replay
Choice
verified behavior and owned gaps
Compare two adapters at the same crash boundary
Two candidate adapters both expose a function called resume. In a synthetic test, adapter A restores the recorded model output. Adapter B replays the prompt through the model. Both return a plausible continuation, but B may select a different part after a previous operation already committed.
Write the acceptance fixture in application terms: after a crash following booking acceptance, one booking remains, the original operation identity is preserved and the final report names its receipt. Then map each adapter's behavior to that contract.
| Contract question | Evidence to request |
|---|---|
| What is replayed? | Recorded result versus repeated computation |
| What survives interruption? | Pending operation and approval identities |
| What does cancellation stop? | New dispatch and in-flight reconciliation |
A missing built-in feature need not disqualify a framework if the application can implement the boundary clearly. Count that adapter work, the maintenance burden and the tests it requires. Conversely, a built-in “durable” label does not qualify an implementation without checking the exact effect boundary.
Keep the same fake model, services and assertions across candidates. Otherwise you can accidentally compare one candidate's happy path with another's failure path and call the result an architectural preference.
Recompute recorded decisions
Crash after effect
Booking may exist
Call model again
A different carrier may be chosen
Outcome, unsafe: Continuation may conflict with committed history
Restore and reconcile
Restore decision
Keep operation identity
Resolve prior effect
Recover its receipt before replanning
Outcome, safe: Recovery preserves the application contract
What if · interview follow-ups
Change one condition
Two adapters both resume a run, but one calls the model again for an already recorded decision.
Start here
Should the adapter with the shortest demo code win?
Identify the behavior the demo leaves untested.
Only if it also satisfies the application contract with acceptable maintenance cost. Inspect recovery, effects, authority and observability under the same fixtures before comparing convenience.
Weak answerChoosing by API brevity while ignoring the code needed around it.
Constraint changes
One adapter needs a custom operation ledger. Does that automatically make it worse?
Evaluate the whole application, including owned glue.
No. Compare the ledger's correctness, complexity and operational burden with the other candidate's actual guarantees. A small explicit component may be acceptable; undocumented assumptions are not.
Weak answerTreating built-in and correct as synonyms.
Do this before moving on
Write a comparison report for plain-code Alder and one chosen framework, using recorded documentation plus actual local fixtures where available. Mark unexecuted rows unverified. Pass when the report distinguishes history from resumable state, identifies replay behavior and assigns every policy and effect boundary an owner.
Review your result. Produce a behavior matrix with passing evidence, required adapter work and unverified claims. State the condition under which you would change your choice.
Go deeper
- Harness ownership: retain business controls when the orchestration library changes.
- Resume semantics: test what survives a restart and which operations repeat.
- Delegation semantics: compare dialogue ownership rather than matching feature names.
Key takeaways
- Compare identical failure fixtures across implementations.
- History, checkpoints and cross-session memory are different capabilities.
- An untested integration row should remain visibly unverified.
Check yourself
Answer aloud or on paper before revealing. Producing the explanation unaided is exactly what a panel listens for.
1Both frameworks advertise memory. What should the comparison ask next?
2Why keep policy outside framework adapters?
Sign in to track which lessons you have finished.