Skip to content

Skills & Primitives

Moxxy has two distinct concepts for agent capabilities: primitives (built-in tool calls) and skills (composable Markdown instructions).

Primitives

Primitives are the 85 built-in tools that agents invoke through standard LLM tool_use/function calling. They are implemented in Rust as part of the gateway and are always available (subject to per-agent allowlists and denylists).

Primitive Categories

Filesystem

PrimitiveDescription
fs.readRead file contents
fs.writeWrite content to a file
fs.listList directory contents
fs.removeRemove a file or directory
fs.cdChange working directory

Git

PrimitiveDescription
git.initInitialize a git repository
git.cloneClone a repository
git.statusShow working tree status
git.commitCreate a commit
git.pushPush to remote
git.checkoutSwitch branches or restore files
git.pr_createCreate a pull request
git.forkFork a repository
git.worktree_addAdd a git worktree
git.worktree_listList git worktrees
git.worktree_removeRemove a git worktree

Web

PrimitiveDescription
browse.fetchHTTP fetch with CSS selector extraction
browse.extractExtract structured data from web content

Shell

PrimitiveDescription
shell.execExecute a shell command (allowlist enforced)

HTTP

PrimitiveDescription
http.requestMake an HTTP request (domain-gated)

Memory

PrimitiveDescription
memory.storeStore information in long-term memory
memory.recallSemantic search over long-term memory
memory.stm_readRead short-term memory
memory.stm_writeWrite to short-term memory

Skills Management

PrimitiveDescription
skill.createCreate a new skill
skill.executeExecute a skill
skill.findSearch for skills
skill.getGet skill details
skill.listList available skills
skill.removeRemove a skill
skill.validateValidate a skill definition

Vault

PrimitiveDescription
vault.setStore a secret
vault.getRetrieve a secret
vault.deleteDelete a secret
vault.listList secret keys

Webhooks

PrimitiveDescription
webhook.registerRegister a webhook endpoint
webhook.listList webhooks
webhook.listenListen for webhook events
webhook.deleteDelete a webhook
webhook.updateUpdate a webhook
webhook.rotateRotate webhook secret

Notifications

PrimitiveDescription
notify.cliSend a CLI notification
channel.notifySend a notification through a channel

Heartbeats

PrimitiveDescription
heartbeat.createCreate a scheduled heartbeat
heartbeat.listList heartbeats
heartbeat.updateUpdate a heartbeat
heartbeat.disableDisable a heartbeat
heartbeat.deleteDelete a heartbeat

User Interaction

PrimitiveDescription
user.askPrompt the user for input
agent.respondSend a response to the user

Agent Management

PrimitiveDescription
agent.spawnSpawn a sub-agent
agent.statusCheck agent status
agent.listList agents
agent.stopStop an agent
agent.dismissDismiss a sub-agent
agent.self.getGet own agent info
agent.self.updateUpdate own configuration
agent.self.persona_readRead own persona
agent.self.persona_writeUpdate own persona

Allowlist Management

PrimitiveDescription
allowlist.listList allowlist entries
allowlist.addAdd to allowlist
allowlist.removeRemove from allowlist
allowlist.denyAdd to denylist
allowlist.undenyRemove from denylist

Configuration

PrimitiveDescription
config.getRead a configuration value
config.setSet a configuration value

MCP (Model Context Protocol)

PrimitiveDescription
mcp.listList connected MCP servers
mcp.connectConnect to an MCP server
mcp.disconnectDisconnect from an MCP server
mcp.toolInvoke an MCP tool

Hive (Swarm Orchestration)

PrimitiveDescription
hive.createCreate a hive
hive.recruitRecruit a worker into a hive
hive.disbandDisband a hive
hive.task_createCreate a task on the board
hive.task_claimClaim a task
hive.task_completeMark a task complete
hive.task_failMark a task failed
hive.task_reviewReview a completed task
hive.task_listList tasks on the board
hive.signalSend a signal to hive members
hive.board_readRead the hive task board
hive.proposePropose a decision for voting
hive.voteVote on a proposal
hive.resolve_proposalResolve a voted proposal
hive.assignAssign a task to a worker
hive.aggregateAggregate results from workers

Reply

PrimitiveDescription
replySend a reply in the current conversation

Invocation

Agents invoke primitives through standard LLM tool_use/function calling. The LLM provider returns structured tool call requests, and the gateway's Executor dispatches them to the appropriate primitive handler.

There is no custom XML invoke format. Primitives use the native tool calling mechanism of whichever LLM provider is configured (Anthropic, OpenAI, Ollama, or OpenAI-compatible).

Allowlists and Denylists

Each agent has an allowlist.yaml file that controls which primitives it can access:

yaml
allowed:
  - fs.read
  - fs.write
  - shell.exec
  - memory.*
denied:
  - vault.delete

Glob patterns are supported (e.g., git.* matches all git primitives). Agents can also modify their own allowlists at runtime via the allowlist.* primitives.

Skills

Skills are Markdown files with YAML frontmatter that define higher-level agent capabilities. Unlike primitives, skills are not code -- they are structured instructions that tell the agent how to compose primitives to accomplish complex tasks.

Skill Format

markdown
---
id: code-review
name: Code Review
version: 1.0.0
inputs_schema:
  type: object
  properties:
    repo_path:
      type: string
      description: Path to the repository to review
    focus_areas:
      type: string
      description: Specific areas to focus on (optional)
allowed_primitives:
  - fs.read
  - fs.list
  - git.status
  - shell.exec
  - reply
safety_notes: >
  This skill only reads files and runs safe git/shell commands.
  It does not modify any files.
---

# Code Review

Review the code in the given repository for quality, bugs, and best practices.

## Steps

1. Use `fs.list` to understand the project structure
2. Use `git.status` to check for uncommitted changes
3. Use `fs.read` to examine key source files
4. Analyze the code for:
   - Potential bugs and edge cases
   - Code style and consistency
   - Performance concerns
   - Security issues
5. Use `reply` to provide a structured review report

Key Differences from Primitives

AspectPrimitivesSkills
ImplementationRust code in the gatewayMarkdown files with YAML frontmatter
Count85 built-inExtensible (9 examples included)
InvocationLLM tool_use/function callingskill.execute primitive
ApprovalAlways available (subject to allowlist)Start quarantined, require approval
PurposeAtomic operationsComposed workflows with instructions

Quarantine and Approval

All skills start in a quarantined state when installed. A quarantined skill cannot be executed until it is approved. This safety mechanism ensures that skills are reviewed before being used, especially those created by agents or installed from external sources.

Example Skills

Moxxy includes 9 example skills:

SkillDescription
code-reviewReview code for quality and bugs
web-researcherResearch topics using web browsing
git-workflowStandard git branching and PR workflow
And 6 moreVarious development and research workflows

Installing Skills

Skills can be installed via the API:

bash
curl -X POST http://127.0.0.1:3000/v1/agents/{id}/skills/install \
  -H "Authorization: Bearer mox_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "skill_content": "---\nid: my-skill\nname: My Skill\n..."
  }'

Or agents can create skills themselves using the skill.create primitive:

Create a new skill called "deploy-checker" that verifies deployment readiness
by checking git status, running tests, and reviewing environment configuration.

Managing Skills

Skills are managed through primitives:

PrimitivePurpose
skill.createCreate a new skill definition
skill.executeRun a skill
skill.findSearch for skills by name or description
skill.getGet full skill details
skill.listList all installed skills
skill.removeRemove a skill
skill.validateValidate a skill's YAML and Markdown structure

MCP Integration

Connect external tools via Model Context Protocol:

bash
# Agents can connect to MCP servers at runtime
# using the mcp.connect primitive

MCP tools are invoked through the mcp.tool primitive, which dispatches to the connected MCP server.

Security Model

Primitive-Level Controls

  • Allowlists - Per-agent YAML configuration restricting available primitives
  • Domain gating - http.request only reaches approved domains
  • Command allowlists - shell.exec only runs approved commands
  • PathPolicy - Filesystem primitives are confined to the agent's workspace

Skill-Level Controls

  • Quarantine - New skills start disabled until approved
  • Allowed primitives - Skills declare which primitives they need in frontmatter
  • Safety notes - Skills document their safety characteristics
  • Validation - skill.validate checks skill structure before installation

Open source · Self-hosted · Data sovereign