org.llm4s.agent.graph.middleware.MiddlewareRef
See theMiddlewareRef companion object
@Experimental
Names the middleware an ordering constraint is about (AgentMiddleware.runsBefore, AgentMiddleware.runsAfter): the one with an id, MiddlewareRef(id), or every middleware of a type, MiddlewareRef.ofType[GuardrailMiddleware] (#2795). Name another middleware by its type when you can: its id is its user's to choose.
A reference is required unless it is made optional with ifPresent: a required one that matches nothing in the stack is refused, so a mistyped id cannot silently leave an order unarranged; an optional one applies when the other is there and is ignored when it is not, which is how a reusable middleware says "outside the guardrails, if there are any".
Attributes
- Companion
- object
- Source
- AgentMiddleware.scala
- Graph
-
- Supertypes
Members list
In this article
