Connect Your Skills to Senpi
Now that you've developed your Skills, it's time to inject dynamic user data from the states and connect your Skills to Senpi and register them to the Skills Marketplace.
This guide will walk you through each step to integrate Senpi user data into your Skills and get your Skills successfully listed.
Step 1: Inject Senpi User Data From State
First, open the balanceProvider.ts
file in the src/providers
directory again and replace the placeholder address with the agent wallet address instance from the state state.agentWallet
as shown below:
import {
type Provider,
type IAgentRuntime,
type Memory,
type State,
elizaLogger,
} from "@moxie-protocol/core";
import { formatEther, http, createPublicClient } from "viem";
import { base } from "viem/chains";
const balanceProvider: Provider = {
get: async (runtime: IAgentRuntime, message: Memory, state: State) => {
const publicClient = createPublicClient({
chain: base,
transport: http(),
});
// Get the agent wallet address from the state
const { address } = state.agentWallet as SenpiWalletClient;
const balance = await publicClient.getBalance({
// Use the agent wallet address from the state
address: address as `0x${string}`,
});
const balanceAsEther = formatEther(balance);
return balanceAsEther;
},
};
export default balanceProvider;
Step 2: Add Your Skills to skills.json
First, open the skills.json
file in the registry/src
folder and add your Skills metadata.
During this step, you can rename your Skill, polish its description, or add a logo.
To replace the logo for your skill, you can simply replace the image under images/logo.png
with your own image (400x400 px).
Once you’ve prepared all the metadata, follow the structure below:
interface Skills {
pluginId: string; // Any UUID, must be unique, to generate one use this https://www.uuidgenerator.net/
name: string; // AI Agent Skills name (based on package.json)
displayName: string; // Display name shown in marketplace
version: string; // AI Agent Skills Version (based on package.json)
author: string | null; // Author/Creator of the Skills
description: string; // Description of what the Skills can do
githubUrl: string; // GitHub URL to your Skills folder under `/packages`
logoUrl: string; // Logo URL for the skill (400x400 px PNG)
settings: Record<string, any>; // Skill settings configuration
capabilities: string[]; // List of skill capabilities
starterQuestions: Array<{
label: string;
value: string;
}>; // Example questions to get started
mediaUrls: string[]; // Additional media URLs
actions: string[]; // Supported actions & similes on the Skill
isPremium: boolean; // Whether skill is premium or not, if yes, it will check `freeQueries` and `skillCoinAddress`
freeQueries: number; // Number of free queries available for users in the case of premium skills
skillCoinAddress: string; // Coin address to token gate the Skill
minimumSkillBalance: number; // Minimum token balance required
status: string; // Skill status, "ACTIVE" or "INACTIVE"
isDefault: boolean; // 3rd party Skill should be `false`
loaders: string[]; // Messages when loading AI agent responses
}
A valid skills.json entry will look like this:
[
{
"pluginId": "a1aa9887-fc11-5f54-aa62-235c7536ba67",
"name": "@moxie-protocol/plugin-first-skill",
"displayName": "My First Senpi Skill",
"version": "0.1.8+build.1",
"author": null,
"description": "Enables your agent to fetch token details for any token on Base",
"githubUrl": "https://github.com/Senpi-ai/senpi-agent-skills/tree/main/packages/plugin-first-skill",
"logoUrl": "https://raw.githubusercontent.com/moxie-protocol/moxie-agent-skills/refs/heads/main/packages/plugin-first-skill/images/logo.svg",
"settings": {},
"capabilities": ["Read ETH balance on Base"],
"starterQuestions": [
{
"label": "Show my ETH balance on Base",
"value": "Show my ETH balance on Base"
}
],
"mediaUrls": [
"https://raw.githubusercontent.com/moxie-protocol/moxie-agent-skills/refs/heads/main/packages/plugin-first-skill/images/logo.svg"
],
"actions": [
"ETH_BALANCE_ON_BASE",
"CHECK_ETH_BALANCE_ON_BASE",
"GET_ETH_BALANCE_ON_BASE",
"VIEW_ETH_BALANCE_ON_BASE",
"SHOW_ETH_BALANCE_ON_BASE",
"WALLET_ETH_BALANCE_ON_BASE",
"BASE_ETH_BALANCE_ON_BASE"
],
"isPremium": false,
"freeQueries": 0,
"skillCoinAddress": "",
"minimumSkillBalance": 0,
"status": "ACTIVE",
"isDefault": false,
"loaders": []
}
]
Step 3: Submit Request to Add Environment Variables (Optional)
If your Skills do not require any environment variables, you can skip this step.
If your Skills need environment variables for production, fill out this form to request them from the Senpi team. The team will reach out via Email ([email protected]) or Farcaster (group chat).
Step 4: Create a PR to main
Branch
Lastly, create a new PR targeting the main branch. The Senpi team will review your submission and provide any feedback if changes are needed.
Before submitting your PR, make sure that you have fulfilled all the requirements from our pre-launch checklist.
Once your PR is approved and merged, congratulation! 🥳🎉 You've successfully added your Skills to the Skills Marketplace where it's accessible for Senpi users to use.
Developer Support
If you have any questions or need help with other use cases, feel free to join the Senpi Telegram Developers Channel and ask your questions there.
Our team is always ready to help you with any questions you may have.