smithery.ai

minicode_usage

Guide for using the minicode-sdk library. Use this skill when the user wants to learn how to use minicode-sdk to build AI agents, integrate tools, use MCP servers, or configure the SDK.

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,019 B
  • docs SUMMARY.md 207 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

minicode-sdk Usage Guide

Installation

pip install minicode-sdk

Quick Start

Basic Agent

import asyncio
from minicode import Agent
from minicode.llm import OpenAILLM

async def main():
    agent = Agent(
        name="assistant",
        llm=OpenAILLM(api_key="your-api-key"),
    )

    response = await agent.generate("Hello, how are you?")
    print(response)

asyncio.run(main())

Streaming Response

async def main():
    agent = Agent(name="assistant", llm=OpenAILLM(api_key="your-key"))

    async for chunk in agent.stream("Tell me a story"):
        if chunk["type"] == "content":
            print(chunk["content"], end="", flush=True)

Adding Tools

Built-in Tools

from minicode.tools.builtin import ReadTool, WriteTool, BashTool

agent = Agent(
    name="assistant",
    llm=my_llm,
    tools=[ReadTool(), WriteTool(), BashTool()],
)

Custom Tools

from minicode.tools.base import BaseTool

class MyTool(BaseTool):
    @property
    def name(self) -> str:
        return "my_tool"

    @property
    def description(self) -> str:
        return "Description of what this tool does"

    @property
    def parameters(self) -> dict:
        return {
            "type": "object",
            "properties": {
                "param1": {"type": "string", "description": "First parameter"},
            },
            "required": ["param1"],
        }

    async def execute(self, params: dict, context) -> dict:
        # Implement tool logic
        return {"success": True, "result": "..."}

MCP Integration

Method 1: Direct Configuration

async with Agent(
    name="assistant",
    llm=my_llm,
    mcp_servers=[
        {
            "name": "memory",
            "command": ["npx", "-y", "@modelcontextprotocol/server-memory"],
        }
    ],
) as agent:
    response = await agent.generate("Remember that my name is Alice")

Method 2: Configuration File

Create .minicode/mcp.json:

{
  "mcpServers": {
    "memory": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Then use the agent (MCP servers are loaded automatically):

async with Agent(name="assistant", llm=my_llm) as agent:
    # MCP tools are automatically available
    pass

Agent Instructions

Create .minicode/AGENT.md to define custom instructions:

# Project Guidelines

- Use Google-style docstrings
- All code must be production-ready
- Ask for clarification if requirements are unclear

Instructions are automatically injected into user messages.

Disable with:

agent = Agent(
    name="assistant",
    llm=my_llm,
    use_agent_instructions=False,
)

Skills

Using SkillTool

from minicode.tools.builtin import SkillTool

agent = Agent(
    name="assistant",
    llm=my_llm,
    tools=[SkillTool()],
)

Creating Skills

Create .minicode/skills/my-skill/SKILL.md:

---
name: my_skill
description: What this skill does and when to use it.
---

# Skill Content

Instructions for the agent when this skill is invoked.

Configuration Locations

Config Project Level User Level
MCP .minicode/mcp.json ~/.minicode/mcp.json
Agent Instructions .minicode/AGENT.md ~/.minicode/AGENT.md
Skills .minicode/skills/ ~/.minicode/skills/

Environment Variables

Variable Description
MINICODE_CONFIG Custom path for MCP config file
MINICODEAGENTINSTRUCTIONS Custom path for agent instructions, or "false" to disable
MINICODESKILLSDIR Custom path for skills directory