> **creating-agents-in-medusa** — skill 15 of 18 in [medusajs/medusa-agent-skills](https://skillsdocs.com/medusajs/medusa-agent-skills).
>
> Book (all skills, one file): https://skillsdocs.com/medusajs/medusa-agent-skills.md
> Machine manifest: https://skillsdocs.com/medusajs/medusa-agent-skills/.well-known/agent-skills/index.json
> Install the book: `npx skills add medusajs/medusa-agent-skills`
> Upstream: https://github.com/medusajs/medusa-agent-skills/blob/main/plugins/medusa-dev/skills/creating-internal-agents/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/
> Licence: No licence detected — all rights reserved by its authors
>
> Bundled files (7), referenced from this skill's directory:
>   - `reference/admin-extension.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/admin-extension.md
>   - `reference/agent-setup.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/agent-setup.md
>   - `reference/api-route.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/api-route.md
>   - `reference/data-models.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/data-models.md
>   - `reference/medusa-exec.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/medusa-exec.md
>   - `reference/service.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/service.md
>   - `reference/streaming.md` — https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/reference/streaming.md
>
> Content © its authors. This skill's body is not served here; the links above are. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

# creating-agents-in-medusa

Use when building an internal admin-facing AI agent in a Medusa project. These agents are operated by merchants and store operators — not customers. Covers data models, module service, agent runtime (tools, system prompt, streamText), streaming API routes (NDJSON), and admin UI chat extensions. Load for any internal agent type: store operations assistant, product audit, cohort analysis, customer service tooling for support staff, etc. Do NOT use for customer-facing agents (storefront chatbots, buyer-side assistants).

No licence could be detected for this skill at either the repository or the skill level, so its body is not reproduced here. Read it upstream:

https://raw.githubusercontent.com/medusajs/medusa-agent-skills/main/plugins/medusa-dev/skills/creating-internal-agents/SKILL.md
