A plugin-based agent framework with CLI
Project description
AgentForge SDK
Welcome to the official Software Development Kit (SDK) for AgentForge, the next-generation platform for building, deploying, and monetizing AI agents. This SDK provides the essential tools and command-line interface (CLI) to create powerful plugins that extend the capabilities of any agent on the AgentForge platform.
What is AgentForge?
AgentForge is a platform that empowers users to create dynamic, interactive AI agents without needing to code. Instead of static workflows, agents are customized with powerful plugins created by developers like you. This SDK is your entry point into the AgentForge ecosystem, allowing you to build and distribute your tools to thousands of users.
Features of the SDK
- Simple and Intuitive Base Classes: Inherit from
BaseToolto create your tools with a clear and simple structure. - Secure Configuration Access: Safely access user-provided configurations (like API keys) via the
ToolContext. - Powerful CLI (
ag-cli): A command-line tool to initialize, validate, and package your plugin for upload. - Standardized Manifest: A simple
agentforge.jsonfile to define your plugin's metadata, tools, and dependencies.
Getting Started
1. Installation
The AgentForge SDK is available on PyPI. You can install it using pip:
pip install agentforge-sdk
This will also install the ag-cli command-line tool.
2. Initializing a New Plugin
To start a new plugin project, navigate to your desired directory and run the init command:
ag-cli init my-awesome-plugin
This will create a new directory named my-awesome-plugin with the following structure:
my-awesome-plugin/
├── agentforge.json # Your plugin's manifest file
└── tools/
├── __init__.py
└── sample_tool.py # An example tool to get you started
3. Developing Your Tool
Open tools/sample_tool.py to see the basic structure of a tool. Every tool must inherit from BaseTool and implement the run method.
# in tools/sample_tool.py
from agentforge_sdk.base import BaseTool, ToolContext
class SampleTool(BaseTool):
def __init__(self, context: ToolContext):
super().__init__(context)
# You can access user-defined configurations here
# For example, if you defined a config "api_key" in your manifest:
# self.api_key = self.context.get_config("api_key")
def run(self, **kwargs) -> str:
# The LLM will provide arguments based on the user's prompt
# and the parameters defined in your manifest.
location = kwargs.get("location", "world")
if not location:
return "Error: Location was not provided."
# Your tool's logic goes here
return f"Hello, {location}! The weather is sunny."
4. Configuring the Manifest
The agentforge.json file is the heart of your plugin. It tells the AgentForge platform everything it needs to know about your plugin, including its name, description, tools, and dependencies.
Make sure to edit this file to match your plugin's details. The entrypoint for each tool should point to your class in the format module.path:ClassName.
5. Validating and Packaging
Before you can upload your plugin, you should validate its manifest:
# Navigate into your plugin's root directory
cd my-awesome-plugin
ag-cli validate
If the validation is successful, you can package your plugin into a .afp file. This file contains all your code and is ready for upload.
ag-cli package
This will create a file like My_Awesome_Plugin-v1.0.0.afp in your current directory. You can now upload this file through the AgentForge developer dashboard.
Contributing
We welcome contributions to the AgentForge SDK! If you have ideas for new features, bug fixes, or improvements, please feel free to open an issue or submit a pull request on our GitHub repository. (Link to be added)
License
This SDK is licensed under the MIT License. See the LICENSE file for more details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentforge_sdk-0.1.1.tar.gz.
File metadata
- Download URL: agentforge_sdk-0.1.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb4f46e07d4e1b3a5aa8125645a87cf17719ba68411d62196d0843a5455ece5
|
|
| MD5 |
a8dd42ccfaa2e3064b4840e2c68c2d54
|
|
| BLAKE2b-256 |
80b9f6551bebf5b678bf1e6c59d6e17e786c91f24e453a343e1ce9fdad6ebd80
|
File details
Details for the file agentforge_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentforge_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
260b572c770bcfb37b01b6cb7a75b27ac4437709722c0c7e4a024150fec6206d
|
|
| MD5 |
2d9c9baa630a1ed22048df2656ef62b0
|
|
| BLAKE2b-256 |
cf2b401e337a06da344620102f81e7529c68e0f00fb4372b75e2c786c308637e
|