Empowering Agents: The Significance of Agents That Craft Their Own Tools
- Steven Hooker
- Mar 4
- 3 min read
Large Language Models (LLMs): Beyond Text Generation
What Are LLMs? Large Language Models (LLMs) are computer programs that "learn" similarities and generate human-like text. They’re trained on huge amounts of written material—like books, websites, and articles—so they can predict the best possible words to follow in a sentence. This training helps them respond to questions, carry on conversations, and create new text that often sounds like it was written by a person.
Limits of Text GenerationWhile LLMs are getting better at producing text, most tasks in the IT world go beyond simple text generation. Professionals spend a great deal of time researching, opening and using applications, designing and implementing ideas, and testing features. These tasks rely on programmatic and visual interfaces—i.e., tools—rather than just textual output.
The “Strawberry” Example: A Simple Illustration of LLM Limitations
Even powerful LLMs can stumble on seemingly trivial problems when they rely solely on statistical patterns. Consider the following example:
Prompt: How many R's are in the word "strawberry"?
LLM Response: There are two "R"s in the word "strawberry."
Prompt: Sure, I don't pay for that answer.The LLM’s response is incorrect highlighting that purely probabilistic text generation can lead to errors. Without access to external tools or methods to verify the answer, the model can’t always provide the right result.
Extending LLM Functionality with Tools
Modern LLMs can now call predefined tools to get more accurate information and perform specific tasks. A list of available tools is added to the user prompt, and the LLM can choose to invoke them as needed. Tools can address two main areas:
Deterministic Certainty: Lots of tasks, within the company workflows and tasks, such as mathematical calculations (77 + 222 / 4), should always yield the same result. Using a dedicated math tool guarantees consistency—rather than relying on a probability-driven guess from the LLM.
External Apps & APIs: LLMs can call APIs, create Jira tickets, modify files, and write or test code. By interacting with these tools, an LLM moves beyond text generation into more active roles in the software development lifecycle and other processes.
A Character-Counting Tool Example
Back to our strawberry example. We could code a tool like the following to count a character in a given string:
from crewai.tools import tool
@tool("countCharacters")
def countCharacters(sentence: str, characterToCount: str) -> str:
"""
Counts the number of times the specified character appears in the given sentence.
Args:
sentence (str): The sentence to analyze.
characterToCount (str): The character to count.
Returns:
str: The count of the specified character in the sentence.
"""
try:
if len(characterToCount) != 1:
return "Error: characterToCount should be a single character."
count = sentence.count(characterToCount)
return f"The character '{characterToCount}' appears {count} times in the given sentence."
except Exception as e:
return f"An error occurred while tool execution: {str(e)}"By including this tool in the prompt given to the LLM, the model can recognize when to use it and thus deliver more accurate responses. However, this process still involves considerable manual setup and can be cumbersome.
Fortunately, much of the documentation and guidelines for these interfaces are publicly available on the internet or within private enterprise networks, and modern LLMs are already capable of generating code. Our framework goes a step further by enabling agents to create their own tools, which can then be debugged, loaded, and utilized during the agents’ “thought” or “reasoning” process—allowing them to do far more than simply generate text.
The following task is in Jira:
DP-7: For my llm execution it would be create to have a terraform template ready to run whenever i need to have a fast executing LLM.
So add a terraform file in git repository
git@github.com:agentsphere/infra.git
to start a GCP Compute instance with one H100 GPU instanceGiven some Jira variables within its enviroment (like url and token), lets watch our tools directory during the follwoing prompt:
"Please solve Jira Task 'DP-7' for me. create a PR with your changes, comment on the task when you are done"

Comment on Jiratask:
"Added 1 PR to git@github.com:agentsphere/infra.git repo containing the added gcp compute instance."
Pullrequest in Github:
Even commit message and branch name look good.

Now that looks more like the work IT professionals actually do.

Comments