llm-functions  by sigoden

Tool for building LLM tools/agents using Bash/JS/Python functions

created 1 year ago
599 stars

Top 55.3% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a framework for easily creating Large Language Model (LLM) tools and agents using plain Bash, JavaScript, and Python functions. It targets developers and researchers looking to integrate custom code, system commands, and APIs with LLMs via function calling, simplifying complex integrations.

How It Works

The core mechanism relies on LLM Functions automatically generating JSON declarations for tools based on specially formatted comments within the script files. These declarations describe the tool's purpose and parameters. The argc command-line framework is used to build these tools and manage their linking, enabling LLMs to discover and invoke them. Agents are defined by a combination of prompts, tools, and optional documents (for RAG), mirroring OpenAI's GPTs structure.

Quick Start & Requirements

  • Install argc and jq.
  • Clone the repository: git clone https://github.com/sigoden/llm-functions && cd llm-functions
  • Build tools and agents: argc build
  • Link with AIChat: ln -s "$(pwd)" "$(aichat --info | sed -n 's/^functions_dir\s+//p')" or export AICHAT_FUNCTIONS_DIR="$(pwd)"
  • Official Docs: https://github.com/sigoden/llm-functions

Highlighted Details

  • Supports Bash, JavaScript, and Python for tool creation.
  • Enables custom web search tools via symbolic linking (e.g., web_search_perplexity.sh).
  • Agent definitions (index.yaml) support prompts, tools, RAG documents, and variables.
  • Includes MCP (Model Context Protocol) for interoperability.

Maintenance & Community

The project is actively maintained by sigoden. Community channels are not explicitly mentioned in the README.

Licensing & Compatibility

  • License: MIT
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The project currently only integrates with AIChat, with plans to support more CLI tools. The web_search functionality requires explicitly linking a specific search tool implementation.

Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
3
Star History
96 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.