om-create-ai-agent

Implements typed AI agents, tools, and orchestrators with approval-gated mutations in Open Mercato modules.

1.7k|382|Updated Sep 10, 2025
One-click install
npx skills add https://github.com/open-mercato/open-mercato --skill om-create-ai-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: om-create-ai-agent
Source: https://github.com/open-mercato/open-mercato/tree/main/packages/create-app/agentic/shared/ai/skills/om-create-ai-agent
Command: npx skills add https://github.com/open-mercato/open-mercato --skill om-create-ai-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building AI agents inside a modular business application requires consistent typing, authorization, approval flows, and attachment handling; this Skill guides the creation of safe, scoped AI agents and tools that follow the Open Mercato framework conventions.

Core Features & Use Cases

  • Typed Module Agents and Tools: Create ai-agents.ts and ai-tools.ts definitions with Zod-validated inputs, ACL scoping, loop budgets, and approval-gated mutations via prepareMutation.
  • Orchestrator and Subagent Workflows: Define file-oriented agents with bounded outcomes, embedded skills, delegated subagents, and resumable error states.
  • Attachments, Artifacts, and Overrides: Handle authorized file uploads, encrypted artifact storage, cleanup policies, and agent extensions or overrides.
  • Use Case: A developer needs an AI assistant that scores customer records and drafts follow-up emails; the Skill walks through declaring the agent, gating its mutations behind user approval, and registering it for discovery.

Quick Start

Ask the assistant to create a new AI agent for a module, for example: create an AI agent that summarizes customer records with an approval step before saving notes.

Frequently Asked Questions about om-create-ai-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an AI agent in an Open Mercato module?

Create an `ai-agents.ts` file at the module root exporting typed agent definitions with stable namespaced IDs, prompts, allowed tools, ACL, and loop budgets. Then run `yarn generate` to register the agent for discovery.

How do I add an approval-gated AI tool mutation?

Define the tool with a Zod input schema and mutation flag, then route writes through `prepareMutation` so the command dispatches only after user approval. No write occurs before the approval step completes.

What is the difference between a module agent and an orchestrator file agent?

Module agents are typed in-product assistants declared in `ai-agents.ts`, while orchestrator file agents handle coding or repository automation with bounded outcomes, subagents, and durable resume checkpoints. The surface-selector reference helps choose between them.

Can I extend or disable an installed AI agent?

Yes, use `aiAgentExtensions` for additive prompt, tool, or suggestion changes to an enabled agent. Use a full override with the same definition ID to replace it, or set the value to `null` to disable it.

How are AI agent attachments secured?

Attachments are validated for type, size, and count, authorized against scope and record ownership, stored through framework attachment services with optional encryption, and served via scoped signed downloads with defined cleanup policies.

When should I use low-level MCP tool registration instead of defineAiTool?

Use `registerMcpTool` only when the request explicitly targets MCP, OpenCode, or Code Mode integrations. Ordinary product-agent tools and new domain mutations should stay on the typed `defineAiTool` plus `prepareMutation` approval path.