Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion vlmrun/client/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations
import warnings
from functools import cached_property
from typing import Any, Optional, Union
from typing import Any, List, Optional, Union

from pydantic import BaseModel

Expand All @@ -16,6 +16,7 @@
AgentExecutionConfig,
AgentCreationConfig,
AgentCreationResponse,
AgentToolset,
)
from vlmrun.client.exceptions import DependencyError

Expand Down Expand Up @@ -169,6 +170,7 @@ def execute(
metadata: Optional[RequestMetadata] = None,
callback_url: Optional[str] = None,
model: str = "vlmrun-orion-1:auto",
toolsets: Optional[List[AgentToolset]] = None,
) -> AgentExecutionResponse:
"""Execute an agent with the given arguments.

Expand All @@ -180,6 +182,11 @@ def execute(
metadata: Optional request metadata
callback_url: Optional URL to call when execution is complete
model: VLM Run Agent model to use for execution (default: "vlmrun-orion-1:auto")
toolsets: Optional list of tool categories to enable for this execution.
Available categories: core, image, image-gen, 3d_reconstruction,
viz, document, video, web.
When specified, only tools from these categories will be available.
If None, defaults to 'core' tools only.

Returns:
AgentExecutionResponse: Agent execution response
Expand All @@ -203,6 +210,9 @@ def execute(
if callback_url:
data["callback_url"] = callback_url

if toolsets is not None:
data["toolsets"] = toolsets

response, status_code, headers = self._requestor.request(
method="POST",
url="agent/execute",
Expand Down
12 changes: 12 additions & 0 deletions vlmrun/client/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@

JobStatus = Literal["enqueued", "pending", "running", "completed", "failed", "paused"]

# AgentToolset type - tool categories available for agent execution
AgentToolset = Literal[
"core",
"image",
"image-gen",
"3d_reconstruction",
"viz",
"document",
"video",
"web",
]


@dataclass
class APIError(Exception):
Expand Down
Loading