org.llm4s.effect.cats

Members list

Type members

Classlikes

trait AgentIO[F[_]]

cats-effect wrapper for Agent.

cats-effect wrapper for Agent.

Lifts every Result[AgentState] return value into F[AgentState], raising LLMError as LLMException in the error channel. The underlying Agent.run and related methods are blocking — each call is dispatched to the blocking thread pool via Async[F].interruptible, so cancelling the fiber interrupts the running agent loop.

Intentionally a thin wrapper: run does not expose handoffs, and continueConversation does not expose contextWindowConfig; the underlying Agent defaults apply. Tracing, debug logging and the trace log path are still available through the context parameter. Use Agent directly (inside Async[F].interruptible) when you need handoffs or context-window pruning.

Tool calls are not a failure of the effect: Agent hands a call with invalid arguments back to the model as a structured error tool result and the run continues. The experimental schema-validated AgentTool contract and the graph runtime (org.llm4s.agent.graph) are not wrapped here.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object AgentIO

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
AgentIO.type
trait LLMClientIO[F[_]]

cats-effect wrapper for LLMClient.

cats-effect wrapper for LLMClient.

All blocking LLM calls are shifted to the blocking thread pool via Async[F].interruptible, keeping the compute pool free for fibers. Cancelling the fiber (or a timeout) interrupts the provider thread, which is how llm4s providers are cancelled: they keep the interrupt and return Left(CancelledError). LLMError values are surfaced as LLMException in the F error channel.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object LLMClientIO

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
final class LLMException(val error: LLMError) extends RuntimeException

Bridges LLMError into the cats-effect error channel as a Throwable.

Bridges LLMError into the cats-effect error channel as a Throwable.

Attributes

Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all