Learn how to create your own custom integration with Agentmark.
text
, object
, image
, speech
, etc.) into provider-specific input formats (like OpenAI chat completions, Google PaLM input, etc).
It uses the raw prompt configuration (TextConfig
, ObjectConfig
, etc.) and combines it with:
Adapter
class from @agentmark/agentmark-core
that defines the following methods:
adaptText(input, options, metadata)
adaptObject(input, options, metadata)
adaptImage(input, options)
adaptSpeech(input, options)
MyCustomAdapter
:
Adapter
interface is defined as follows:
D
is the AgentMark type and K
is the path of the prompt.
You can then create a custom AgentMark client using your adapter:
PromptShape
is a type that represents the shape of a prompt object in AgentMark types. KeysWithKind
is a type that represents the keys of a prompt object in AgentMark types with a specific kind (eg. "text"
, "object"
, "image"
, "speech"
).
For more information on AgentMark types, see the AgentMark types documentation.
VercelAIToolRegistry
defined here.
Make sure the tool registry is type safe to make the tools type safe with agentmark.
We’re here to help! Choose the best way to reach us: