Tools and Agents
Tools and agents allow you to extend your prompts with external capabilities.
Tools in AgentMark allow you to extend your prompts with custom functionality, such as web searching, calculation, API calls, and more.
Creating Tools
Tools are simple async functions that receive parameters and return a result:
Registering Tools
Tools can be registered using the ToolPluginRegistry
:
Tool Configuration
Tools are configured using JSON Schema in your frontmatter metadata. Each tool requires:
key
: The name of the tool, as a property key in thetools
objectdescription
: What the tool does (helps the LLM understand when to use it)parameters
: JSON Schema defining the tool’s input parameters
Example:
Agents
When setting max_llm_calls
, your LLM can make multiple calls to solve complex agentic tasks.
Tools are defined in your prompt’s frontmatter configuration and can be accessed within your messages:
To enable agents:
- Add
max_llm_calls
to your model settings - Define your tools schema
- The SDK will automatically handle multiple LLM call communication
Best Practices
- Keep tools focused on a single responsibility
- Provide clear descriptions to help the LLM use tools appropriately
- Handle errors gracefully and return informative error messages
- Use descriptive parameter names and include helpful descriptions
Have Questions?
We’re here to help! Choose the best way to reach us:
Join our Discord community for quick answers and discussions
Email us at hello@puzzlet.ai for support
Schedule an Enterprise Demo to learn about our business solutions
Was this page helpful?