Tiny Fnc Engine AI Agent
tiny_fnc_engine is a minimal python library that provides a flexible engine for calling functions extracted from a LLM.
Tiny Fnc Engine is an open-source ai agent by AtakanTekparmak, written mainly in Python, with 37 GitHub stars and the Apache-2.0 license. Its code was last updated Aug 13, 2026. The latest PyPI release is tiny_fnc_engine 0.2.1, published Sep 10, 2024, with 10 downloads last week.
tiny_fnc_engine
tiny_fnc_engine is a minimal python library (one file, 212 lines of code) that provides a flexible engine for calling functions extracted from LLM (Large Language Model) outputs in JSON format. The engine stores functions and their outputs in memory, allowing for chained function calls and parameter referencing. It also supports using Pydantic models for type safety and validation.
Features
- Add and call functions dynamically
- Parse function calls from JSON or string format
- Chain multiple function calls
- Store and reference function outputs
- Support for Pydantic models as function parameters and return values
- Reset session to clear stored outputs
- Parse & call functions from OpenAI compatible "tool_calls" format
Documentation
The documentation is available at https://atakantekparmak.github.io/tiny_fnc_engine/.
Warning
Users are responsible for the functions they load in the interpreter.
Project Structure
tiny_fnc_engine/
│
├── tiny_fnc_engine/
│ ├── __init__.py
│ └── engine.py
├── tests/
│ ├── __init__.py
│ └── test_engine.py
├── docs/
│ ├── index.html
│ ├── installation.html
│ ├── function-loading.html
│ ├── function-call-formats.html
│ ├── examples.html
│ ├── api-reference.html
│ ├── script.js
│ └── style.css
├── main.py
├── requirements.txt
├── package_requirements.txt
├── Makefile
└── LICENSE
Requirements
- Python 3.10 or later
Installation and Usage
1. Install from PyPI
- The package is available on PyPI. You can install it using pip:
pip install tiny_fnc_engine
- Then you can use it in your project as follows:
from tiny_fnc_engine import FunctionCallingEngine
from pydantic import BaseModel
# Define a Pydantic model (optional)
class User(BaseModel):
name: str
age: int
def get_user() -> User:
return User(name="Alice", age=30)
def greet_user(user: User) -> str:
return f"Hello, {user.name}!"
# Initialize the engine and load functions
engine = FunctionCallingEngine()
engine.add_functions([get_user, greet_user])
# Optionally, you can load functions from a file
# engine.add_functions_from_file('path/to/functions.py')
# Parse and call functions from an example model response
example_response = """
[
{
"name": "get_user",
"parameters": {},
"returns": [{"name": "user", "type": "User"}]
},
{
"name": "greet_user",
"parameters": {"user": "user"},
"returns": [{"name": "greeting", "type": "str"}]
}
]
"""
results = engine.parse_and_call_functions(example_response, verbose=True)
# Print the results
print(results)
# Reset the session if needed
engine.reset_session()
2. Just grab the code
Since all the code in the library is located in a single file, you can just download it and use it in your project as follows:
curl -o tiny_fnc_engine.py https://raw.githubusercontent.com/AtakanTekparmak/tiny_fnc_engine/main/tiny_fnc_engine/engine.py
After that, all you need to do is install Pydantic:
pip install pydantic
and then use it the same way as in the PyPI installation.
3. Build from Source
-
Clone the repository:
git clone https://github.com/yourusername/tiny_fnc_engine.git cd tiny_fnc_engine -
Install dependencies:
make install -
Run the main script:
make run -
Run the tests:
make run_tests
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Tiny Fnc Engine alternatives
View more →Similar ai agents in Coding Agents, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.
| Name | Stars | Licence | Last updated | Scan |
|---|---|---|---|---|
| Tiny Fnc Engine (this page) AtakanTekparmak | 37 | Apache-2.0 | Aug 13, 2026 | Scanned, no flagged issues |
| AutoGPT Significant-Gravitas | 188k | None found | Nov 1, 2026 | Not scanned yet |
| Langchain langchain-ai | 149k | MIT | Nov 1, 2026 | Scanned, no flagged issues |
| Gemini CLI google-gemini | 109k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| MetaGPT FoundationAgents | 71k | MIT | Jan 21, 2026 | Scanned, no flagged issues |
| Oh My Openagent code-yeongyu | 71k | None found | Nov 1, 2026 | Not scanned yet |