Skip to content
Open
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
21 changes: 15 additions & 6 deletions vlmrun/client/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def __init__(self, client: "VLMRunProtocol") -> None:

def get(
self,
name: str | None = None,
id: str | None = None,
prompt: str | None = None,
name: Optional[str] = None,
id: Optional[str] = None,
prompt: Optional[str] = None,
) -> AgentInfo:
"""Get an agent by name, id, or prompt. Only one of `name`, `id`, or `prompt` can be provided.

Expand Down Expand Up @@ -78,11 +78,20 @@ def get(

return AgentInfo(**response)

def list(self) -> list[AgentInfo]:
"""List all agents."""
def list(self, skip: int = 0, limit: int = 10) -> list[AgentInfo]:
"""List all agents.

Args:
skip: Number of items to skip
limit: Maximum number of items to return

Returns:
List[AgentInfo]: List of agent information objects
"""
response, status_code, headers = self._requestor.request(
method="GET",
url="agent",
params={"skip": skip, "limit": limit},
)

if not isinstance(response, list):
Expand Down Expand Up @@ -135,7 +144,7 @@ def create(

def execute(
self,
name: str | None = None,
name: Optional[str] = None,
inputs: Optional[dict[str, Any]] = None,
batch: bool = True,
config: Optional[AgentExecutionConfig] = None,
Expand Down
2 changes: 1 addition & 1 deletion vlmrun/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.3"
__version__ = "0.3.4"