org.llm4s.agent.graph.tool
Members list
Type members
Classlikes
A tool the agent loop can call: typed arguments, validated against AgentToolSpec.argumentSchema and decoded with its codec before execute runs. A tool writes only the state keys in writes.
A tool the agent loop can call: typed arguments, validated against AgentToolSpec.argumentSchema and decoded with its codec before execute runs. A tool writes only the state keys in writes.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
What a tool tells the model and the loop: its name, description and argument schema, how its arguments decode, an optional check on the decoded value, and the question it may ask.
What a tool tells the model and the loop: its name, description and argument schema, how its arguments decode, an optional check on the decoded value, and the question it may ask.
name must match [a-zA-Z0-9_-]{1,64}: apply throws IllegalArgumentException otherwise, and ToolSet.of refuses one too, so a spec built another way is still checked.
Arguments are validated against argumentSchema, the schema rendered non-strict, which is what core's Anthropic, Gemini and Vertex AI clients send. A call from a client that sends tools strict (OpenAI and the OpenAI-compatible ones) carries every property, which that schema also accepts.
Value parameters
- question
-
the question this tool may ask; set by AgentTool.Asking
- validateDecoded
-
a check on the decoded arguments;
Leftbecomes an error the model sees
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AgentToolSpec.type
Checks raw tool-call arguments against the JSON Schema a tool sent to the provider.
Checks raw tool-call arguments against the JSON Schema a tool sent to the provider.
The default implementation supports exactly the subset core's SchemaDefinition emits: type (a string or an array of strings), description (ignored), properties, required, additionalProperties (boolean), enum, minLength, maxLength, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, items, minItems, maxItems and uniqueItems. Any other keyword, and a supported one with a malformed value (a bound that is not a number, a length or count that is not a non-negative whole number, a non-boolean uniqueItems, a required that is not an array of strings, an enum that is not an array, properties that is not an object), is reported by unsupported so a tool set can refuse it when it is built, rather than silently skip the constraint on every call.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
What a tool call knows: the run, the call's id, the thread state it may read, and whether the call has been approved.
What a tool call knows: the run, the call's id, the thread state it may read, and whether the call has been approved.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
What a tool call produced, as data.
What a tool call produced, as data.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The codecs of a tool's question and of the answer it takes.
The codecs of a tool's question and of the answer it takes.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The tools an agent loop offers, in order, with the validator that checks their arguments. Built only through ToolSet.of, so every name is valid and unique, every argument schema is an object, and every schema keyword is one the validator checks.
The tools an agent loop offers, in order, with the validator that checks their arguments. Built only through ToolSet.of, so every name is valid and unique, every argument schema is an object, and every schema keyword is one the validator checks.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any