Llm Functions logo

Llm Functions

Free

Easily create LLM tools and agents using plain Bash/JavaScript/Python functions.

FreeFree tier
#Shell
Type
Saas

About Llm Functions

LLM Functions is an open-source project that enables developers to easily create and use LLM-powered tools and agents by writing plain functions in Bash, JavaScript, or Python. It automatically generates the required JSON declarations for function calling from code comments, allowing seamless integration with LLMs. The project provides ready-to-use tools such as weather lookup, command execution, web search, and agents like a code reviewer and a to-do manager. It integrates primarily with the AIChat CLI tool and requires argc and jq for setup. Designed to bridge LLMs with custom code, system commands, APIs, and data processing tasks, LLM Functions simplifies the process of building extensible AI workflows.

Key Features

Automatic generation of JSON function declarations from code comments
Support for tools written in Bash, JavaScript, and Python
Pre-built tools: weather lookup, command execution, web search (multiple providers)
Pre-built agents: code reviewer and to-do list manager
Seamless integration with AIChat CLI via functions_dir or environment variable
Function calling to connect LLMs directly to custom code, system commands, and APIs
Extensible: add new tools by creating scripts in the ./tools/ directory
Uses argc for command running and jq for JSON processing

Pros & Cons

Pros
  • Leverages widely-known languages (Bash, JS, Python) for tool creation
  • Automatic JSON schema generation reduces manual work and errors
  • Open-source and free to use
  • Extensible design allows adding custom tools and agents easily
  • Works with popular LLM CLI AIChat
  • Well-documented setup and examples
Cons
  • Currently only compatible with AIChat CLI (limited ecosystem support)
  • Requires external dependencies: argc and jq
  • Setup involves cloning repo, linking files, and environment configuration
  • Web search tool requires selecting and linking an external search tool
  • No built-in visual interface; command-line only

Best For

Building custom LLM-powered assistants for system administrationCreating agents that can execute shell commands or run scriptsIntegrating LLMs with external APIs (e.g., weather, web search)Automating repetitive tasks through natural language commandsDeveloping tool-using AI applications without complex infrastructureRapid prototyping of AI agents with familiar scripting languages

FAQ

How do I add a web search tool?
Choose one of the available search tools (e.g., web_search_cohere.sh, web_search_perplexity.sh) and use `argc link-web-search` to create a symbolic link to web_search.sh. Then add web_search.sh to your ./tools.txt file.
Which languages can I use to write tools?
Tools can be written in Bash, JavaScript, or Python. See the demo_tool.sh/js/py files for examples.
How do I integrate LLM Functions with AIChat?
Symlink the LLM Functions repository to AIChat's functions_dir, or set the environment variable AICHAT_FUNCTIONS_DIR to point to the repository directory.
Do I need to manually write JSON schemas for tools?
No. LLM Functions automatically generates JSON declarations for tools based on specially commented code.