Kit Development
Understand the philosophy and goals behind creating reusable Genbase Kits.
Welcome to the Kit Developer Guide! This section provides the information you need to create your own reusable AI capabilities as Genbase Kits.
The Power of Kits
Kits are the cornerstone of Genbase's modularity. By packaging specific functionalities, expertise, and workflows into a standardized format, Kits enable:
- Reusability: Build a capability once (like managing a specific database or interacting with an external API) and reuse it across multiple projects and modules.
- Specialization: Focus a Kit on solving one problem domain exceptionally well, incorporating best practices and tailored logic.
- Collaboration: Share your Kits via a Registry, allowing others to benefit from your work and build upon it.
- Composition: Construct complex AI systems by assembling and connecting Modules instantiated from different specialized Kits.
- Standardization: Provide a common structure (
kit.yaml
, standard directories) for defining and understanding AI capabilities.
What Makes a Good Kit?
When designing a Kit, consider these principles:
- Clear Purpose: Define a specific problem or capability the Kit addresses (e.g., "PostgreSQL Schema Management," "React Component Generation," "Web Content Summarization").
- Well-Defined Interface: Expose functionality through clear Profiles and well-documented Tools. Think about how other modules or users will interact with it.
- Encapsulation: Keep internal logic hidden where possible. Expose necessary functionality via Tools and manage internal state within the Module's Workspace or Profile Store.
- Configuration: Use environment variables (defined in
kit.yaml
) for necessary external configurations (API keys, connection strings). Provide sensible defaults where possible. - Reusability: Design Tools and logic to be generally applicable within the Kit's domain, avoiding hardcoding project-specific details.
- Resource Sharing (Provide): Clearly define what the Kit provides (
provide
section inkit.yaml
) if it's intended to share functionality (Tools) or data (Workspace) with other Modules. - Documentation: Include clear descriptions in
kit.yaml
and potentially aREADME.md
within the Kit explaining its purpose, usage, and configuration.
Think Modularly
Avoid creating monolithic Kits that try to do everything. Instead, break down complex problems into smaller, composable Kits that can work together through defined interfaces (Profiles, Tools, Provide).
Development Workflow Overview
Developing a Kit typically involves:
- Planning: Define the Kit's purpose, inputs, outputs, tools, and configuration.
- Structuring: Set up the standard Kit directory structure. (See Structure)
- Defining the Manifest: Create and populate the
kit.yaml
file. (See kit.yaml Reference) - Implementing Tools: Write the core Python logic in the
tools/
directory. (See Tools) - (Optional) Implementing Agents: Create custom agent logic if needed. (See Agents)
- Defining Profiles: Link agents and tools for specific interaction modes in
kit.yaml
. (See Profiles) - Adding Instructions: Write relevant Markdown guides. (See Instructions)
- Configuring Workspace: Add necessary initial files to the
workspace/
directory. (See Workspace) - Defining Provisions: Specify shared resources in the
provide
section. (See Providing Resources) - Packaging: Create the
.tar.gz
archive. (See Packaging) - Testing: Install the Kit locally, create a Module, and test its Profiles and Tools thoroughly.
- Publishing (Optional): Upload the Kit package to a registry.
Where to Go Next
Use the following guides to dive deeper into specific aspects of Kit development: