Design agent workflows that stay legible
Last updated: March 2026
The best Lev agent workflows are narrow, state-aware, and easy to review. Start with retrieval and explanation, then graduate to bounded write actions only when the workflow is stable.
Workflow Design Principles
- Retrieve before acting: pull deals, placements, term sheets, and account context before the agent makes a recommendation.
- Keep tools narrow: prefer smaller reads and explicit actions over one giant prompt that asks the model to infer missing state.
- Make handoffs visible: when the agent wants to mutate data or message a human, show the exact reasoning and source records first.
- Use resource pages as contracts: tie prompt instructions to the schemas and constraints in the API reference pages.
Recommended Tool Flow
Default workflow shape
1. Identify contextResolve the deal, account, or lender the user is talking about before asking the model to reason about next steps.
2. Gather primary recordsRead the smallest set of records needed: deal, financials, placements, term sheets, lender search results, or team context.
3. Summarize with citationsHave the agent restate the key facts before it proposes any write or outbound action.
4. Request confirmationFor writes or external actions, require an explicit user confirmation or a review checkpoint.
5. Execute and logPerform the bounded action, then return the updated state plus the request_id when relevant.
Prompt Patterns
Prompt templates
markdown
You are helping a broker evaluate lender fit.
1. Read the deal, deal financials, and any recent lender search results.
2. Summarize the facts you found.
3. Recommend the next action only if the records are sufficient.
4. If data is missing, say exactly what to fetch next.Safety and Review
Prefer reviewable agents
An agent that exposes its retrieved records, next action, and exact write payload is more useful than an agent that tries to feel magical.
- Keep outbound actions gated behind approval.
- Treat lender search, placements, and term-sheet comparisons as high-value review checkpoints.
- Use
request_idvalues from the API when you need to trace surprising behavior.