Skip to main content
Pass skills in the skills parameter when creating chat completions:
from vlmrun.client import VLMRun
from vlmrun.client.types import AgentSkill

client = VLMRun(api_key="<VLMRUN_API_KEY>")

response = client.agent.completions.create(
    model="vlmrun-orion-1:auto",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Extract data from this document."},
                {"type": "file_url", "file_url": {"url": "https://example.com/invoice.pdf"}}
            ]
        }
    ],
    skills=[AgentSkill(skill_name="invoice-extraction")],
)

Multiple Skills

You can pass multiple skills in a single request. The agent applies all skills during execution:
response = client.agent.completions.create(
    model="vlmrun-orion-1:auto",
    messages=[...],
    skills=[
        AgentSkill(skill_name="invoice-extraction"),
        AgentSkill(skill_name="line-item-validation"),
    ],
)

Inline Skills

Instead of referencing a server-stored skill, you can send a skill bundle directly in the request as a base64-encoded zip. Set type to "inline" and provide a source object:
import base64, io, zipfile
from vlmrun.client import VLMRun
from vlmrun.client.types import AgentSkill, InlineSkillSource

# Build a skill zip in memory
buf = io.BytesIO()
with zipfile.ZipFile(buf, "w") as zf:
    zf.writestr("SKILL.md", """\
---
name: invoice-extraction
description: Extract structured data from invoices
---
# Invoice Extraction

Extract invoice_id, date, and total_amount from the provided document.
""")
    zf.writestr("schema.json", '{"type":"object","properties":{"invoice_id":{"type":"string"},"date":{"type":"string"},"total_amount":{"type":"number"}},"required":["invoice_id","date","total_amount"]}')

bundle = base64.b64encode(buf.getvalue()).decode()

client = VLMRun(api_key="<VLMRUN_API_KEY>")

response = client.agent.completions.create(
    model="vlmrun-orion-1:auto",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Extract data from this invoice."},
                {"type": "file_url", "file_url": {"url": "https://example.com/invoice.pdf"}}
            ]
        }
    ],
    skills=[
        AgentSkill(
            type="inline",
            name="invoice-extraction",
            description="Extract structured data from invoices",
            source=InlineSkillSource(data=bundle),
        )
    ],
)
See Skill Structure — Inline Skill Bundles for details on bundle contents and the Reference for AgentSkill inline fields.
You can mix referenced and inline skills in the same request. Each entry in the skills array is resolved independently.

Pinned Versions

Pin a specific skill version for reproducible results:
response = client.agent.completions.create(
    model="vlmrun-orion-1:auto",
    messages=[...],
    skills=[AgentSkill(skill_name="patient-referral", version="20260219-abc123")],
)
See Version Pinning for details.