Name | functionsmith JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Functionsmith is a general-purpose problem-solving agent using dynamic function calling |
upload_time | 2025-01-22 03:55:16 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | Apache-2.0 |
keywords |
ai
agent
llm
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!--
Copyright 2024 The Google Earth Engine Community Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Functionsmith
## Overview
Functionsmith is a general-purpose problem-solving agent using dynamic
function calling.
USING THIS AGENT IS UNSAFE. It directly runs LLM-produced code, and thus
should only be used for demonstration purposes.
Install with:
```
pip install functionsmith
```
To run with the default task investigating a CSV file with airport data:
```
export GOOGLE_API_KEY=my-api-key
wget https://raw.githubusercontent.com/davidmegginson/ourairports-data/refs/heads/main/airports.csv
functionsmith_cli
```
This agent uses dynamic function calling, which means that instead of
relying on a fixed set of tools predefined in the agent
[in normal LLM function calling](https://ai.google.dev/gemini-api/docs/function-calling),
we let the agent itself write with all the functions it needs.
The functionsmith system prompt asks the agent to first write any low-level
function it needs, as well as tests for them. The agent loop will try
to run these functions and ask the LLM to make corrections if necessary.
Once all the functions are ready, the agent will write and run the code
to solve the actual user task.
The agent does not use function calling features of LLM clients. Instead,
it simply tries to parse all the ```python or ```tool_use sections
present in the raw LLM output. It keeps all function definitions as well
as their source code in memory. Each call to the LLM is preceded
by the function definitions to let the LLM know what functions are available
locally.
The functions are not saved permanently, though this feature can be added.
TODO(simonf): add a notebook version of the general-purpose agent,
as well as an Earth Engine-specific notebook agent.
## Attribution
Functionsmith was written by Simon Ilyushchenko (simonf@google.com).
I am grateful to Renee Johnston and other Googlers for implementation advice,
as well as to Earth Engine expert advisors Jeffrey Cardille, Erin Trochim,
Morgan Crowley, and Samapriya Roy, who helped me choose the right training
tasks.
Raw data
{
"_id": null,
"home_page": null,
"name": "functionsmith",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "ai, agent, llm",
"author": null,
"author_email": "Simon Ilyushchenko <simonf@google.com>",
"download_url": "https://files.pythonhosted.org/packages/d6/af/f18db7edb38e734e2e713ed640e338f7b3812e3d1efef509e158dcd1aa01/functionsmith-0.1.1.tar.gz",
"platform": null,
"description": "<!--\nCopyright 2024 The Google Earth Engine Community Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\n# Functionsmith\n\n## Overview\n\nFunctionsmith is a general-purpose problem-solving agent using dynamic\nfunction calling.\n\nUSING THIS AGENT IS UNSAFE. It directly runs LLM-produced code, and thus\nshould only be used for demonstration purposes.\n\nInstall with:\n```\npip install functionsmith\n```\n\nTo run with the default task investigating a CSV file with airport data:\n```\nexport GOOGLE_API_KEY=my-api-key\nwget https://raw.githubusercontent.com/davidmegginson/ourairports-data/refs/heads/main/airports.csv\nfunctionsmith_cli\n```\n\nThis agent uses dynamic function calling, which means that instead of\nrelying on a fixed set of tools predefined in the agent\n[in normal LLM function calling](https://ai.google.dev/gemini-api/docs/function-calling),\nwe let the agent itself write with all the functions it needs.\n\nThe functionsmith system prompt asks the agent to first write any low-level\nfunction it needs, as well as tests for them. The agent loop will try\nto run these functions and ask the LLM to make corrections if necessary.\nOnce all the functions are ready, the agent will write and run the code\nto solve the actual user task.\n\nThe agent does not use function calling features of LLM clients. Instead,\nit simply tries to parse all the ```python or ```tool_use sections\npresent in the raw LLM output. It keeps all function definitions as well\nas their source code in memory. Each call to the LLM is preceded\nby the function definitions to let the LLM know what functions are available\nlocally.\n\nThe functions are not saved permanently, though this feature can be added.\n\nTODO(simonf): add a notebook version of the general-purpose agent,\nas well as an Earth Engine-specific notebook agent.\n\n## Attribution\n\nFunctionsmith was written by Simon Ilyushchenko (simonf@google.com).\nI am grateful to Renee Johnston and other Googlers for implementation advice,\nas well as to Earth Engine expert advisors Jeffrey Cardille, Erin Trochim,\nMorgan Crowley, and Samapriya Roy, who helped me choose the right training\ntasks.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Functionsmith is a general-purpose problem-solving agent using dynamic function calling",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/google/earthengine-community/tree/master/experimental/functionsmith"
},
"split_keywords": [
"ai",
" agent",
" llm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1ccf0fc6e0356daddaaa518ef92151aa05f54d39995bb86106d5ed8876f6b713",
"md5": "7166554fd1865bf0f55c8a18cd483e0a",
"sha256": "6bb507be15ed21307bb334fd68a37f9c4866af0474c08fa67d7c51b210d28765"
},
"downloads": -1,
"filename": "functionsmith-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7166554fd1865bf0f55c8a18cd483e0a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 15938,
"upload_time": "2025-01-22T03:55:12",
"upload_time_iso_8601": "2025-01-22T03:55:12.383692Z",
"url": "https://files.pythonhosted.org/packages/1c/cf/0fc6e0356daddaaa518ef92151aa05f54d39995bb86106d5ed8876f6b713/functionsmith-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d6aff18db7edb38e734e2e713ed640e338f7b3812e3d1efef509e158dcd1aa01",
"md5": "a07d3290f62c10aacb5d6f3a04736edb",
"sha256": "ecbd3bd279a3d8f7c1944086cb624c855a1988b5f9284b245555f021087abf19"
},
"downloads": -1,
"filename": "functionsmith-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a07d3290f62c10aacb5d6f3a04736edb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 15543,
"upload_time": "2025-01-22T03:55:16",
"upload_time_iso_8601": "2025-01-22T03:55:16.174369Z",
"url": "https://files.pythonhosted.org/packages/d6/af/f18db7edb38e734e2e713ed640e338f7b3812e3d1efef509e158dcd1aa01/functionsmith-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-22 03:55:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "google",
"github_project": "earthengine-community",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "functionsmith"
}