Basic Usage Overview
This section introduces the basic concepts and workflow for using FrameX as a plugin-based algorithm framework.
It is designed for developers who are starting with FrameX and want to quickly understand how to:
- Organize their project
- Register plugins and expose APIs
- Configure plugins
- Load and run plugins
- Debug and test their implementations
1) What you will learn
After reading this section, you will be able to:
-
Understand the project structure
Learn how to organize your project files and keep plugins under theplugins/directory. -
Register and expose plugin APIs
Use__plugin_meta__ = PluginMetadata(...)and@on_request(...)to define plugin metadata and expose endpoints. -
Cross-plugin communication
Call APIs from other plugins using_call_remote_api(...), and handle synchronous, streaming, and function-style calls. -
Manage plugin configuration
Define plugin-specific configuration withpydantic.BaseModeland inject it viaconfig_class. -
Load and start plugins
Load plugins via configuration (config.toml) or dynamically from code, and run the FrameX runtime withframex.run(). -
Debug and test plugins
Use FrameX in non-Ray mode for debugging, and leverage FastAPI’sTestClientfor writing automated tests.
2) Roadmap of this Section
-
Project Structure
How to organize your project and where to place your plugins. -
Plugin Register & API Expose
How to define plugin metadata and expose APIs. -
Cross-Plugin Access
How to call APIs provided by other plugins. -
Plugin Configuration
How to define and load plugin configurations. -
Plugin Loading & Startup
How to load and run plugins from configuration or code. -
Plugin Debugging & Testing
How to debug your plugins and write automated tests.
👉 With these basics, you will be ready to build modular, extensible, and testable algorithmic systems with FrameX.