| Crates.io | openfunctions-rs |
| lib.rs | openfunctions-rs |
| version | 0.1.0 |
| created_at | 2025-06-08 21:09:10.32092+00 |
| updated_at | 2025-06-08 21:09:10.32092+00 |
| description | A universal framework for creating and managing LLM tools and agents |
| homepage | https://github.com/user/openfunctions-rs |
| repository | https://github.com/user/openfunctions-rs |
| max_upload_size | |
| id | 1705273 |
| size | 113,236 |
A universal framework for creating and managing LLM tools and agents.
OpenFunctions is a Rust-powered framework that enables you to build and deploy powerful tools and agents for Large Language Models. Write your functions in Bash, JavaScript, or Python, and let OpenFunctions handle the parsing, execution, and integration, so you can focus on building great AI-powered applications.
Add this to your Cargo.toml:
[dependencies]
openfunctions-rs = "0.1"
Or install the CLI tool:
cargo install openfunctions-rs
Create a tool file, for example, tools/greet.sh:
#!/usr/bin/env bash
# @describe A simple tool to greet someone
# @option --name! The name to greet
echo "Hello, $argc_name!"
# Build and test your tools
openfunctions build
openfunctions test
# Check your environment
openfunctions check
Tool definitions are extracted from specially formatted comments in your code.
# @describe A description of the tool.
# @option --param! A required parameter.
# @flag --verbose A boolean flag.
# @env API_KEY! A required environment variable.
/**
* A description of the tool.
* @property {string} param - A required parameter.
* @property {boolean} [verbose] - An optional parameter.
*/
def run(param: str, verbose: bool = False):
"""
A description of the tool.
Args:
param: The description for this parameter.
verbose: The description for this flag.
"""
pass
Create an openfunctions.toml file in your project root to configure settings:
[project]
name = "my-openfunctions-project"
version = "0.1.0"
[runtime]
execution_timeout = 60 # in seconds
# Directories where your tools and agents are stored
tool_dirs = ["tools"]
agent_dirs = ["agents"]
OpenFunctions is built with a modular architecture:
Tool, Agent, Registry, Builder, Checker, and TestRunner.ToolDefinition and AgentDefinition.Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.