Skip to main content
Pass skills in the config.skills parameter when executing agents:
from vlmrun.client import VLMRun
from vlmrun.client.types import AgentExecutionConfig, AgentSkill
from vlmrun.types import MessageContent, FileUrl

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

response = client.agent.execute(
    inputs={"file": MessageContent(type="file_url", file_url=FileUrl(url="<file-url>"))},
    config=AgentExecutionConfig(
        skills=[AgentSkill(skill_name="patient-referral", skill_version="20260219-abc123")]
    ),
    batch=True,
)

Multiple Skills

Pass multiple skills in the config.skills array:
response = client.agent.execute(
    inputs={...},
    config=AgentExecutionConfig(
        skills=[
            AgentSkill(skill_name="document-parsing"),
            AgentSkill(skill_name="data-validation"),
        ]
    ),
    batch=True,
)

Inline Skills

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

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

response = client.agent.execute(
    inputs={"file": {"type": "file_url", "file_url": {"url": "<file-url>"}}},
    config=AgentExecutionConfig(
        skills=[
            AgentSkill(
                type="inline",
                name="my-skill",
                source=InlineSkillSource(data="<base64-encoded-zip>"),
            )
        ]
    ),
    batch=True,
)
See Skill Structure — Inline Skill Bundles for details on bundle contents and the Reference for AgentSkill inline fields.

Synchronous vs Batch

  • Synchronous (batch=False): Blocks until the agent completes. Best for short tasks.
  • Batch (batch=True): Returns immediately with a prediction ID. Poll for results. Best for long-running tasks like video analysis.
# Batch execution
response = client.agent.execute(
    inputs={...},
    config=AgentExecutionConfig(
        skills=[AgentSkill(skill_name="video-analysis")]
    ),
    batch=True,
)

# Poll for results
prediction = client.predictions.get(response.id)