@@ -83,7 +83,6 @@ def create_from_blueprint_id(
8383 :param blueprint_id: Blueprint ID to create from
8484 :type blueprint_id: str
8585 :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters
86- :type params:
8786 :return: Wrapper bound to the newly created devbox
8887 :rtype: Devbox
8988 """
@@ -226,11 +225,10 @@ class BlueprintOps:
226225 Example:
227226 >>> from datetime import timedelta
228227 >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext
229- >>>
230228 >>> runloop = RunloopSDK()
231229 >>> obj = runloop.object_storage.upload_from_dir(
232230 ... "./",
233- ... ttl=timedelta(hours=1),
231+ ... ttl=timedelta(hours=1),
234232 ... )
235233 >>> blueprint = runloop.blueprint.create(
236234 ... name="my-blueprint",
@@ -421,6 +419,7 @@ def upload_from_dir(
421419 :return: Wrapper for the uploaded object
422420 :rtype: StorageObject
423421 :raises OSError: If the local file cannot be read
422+ :raises ValueError: If ``dir_path`` does not point to a directory
424423 """
425424 path = Path (dir_path )
426425 if not path .is_dir ():
@@ -545,7 +544,7 @@ def list(self, **params: Unpack[SDKScorerListParams]) -> list[Scorer]:
545544 page = self ._client .scenarios .scorers .list (** params )
546545 return [Scorer (self ._client , item .id ) for item in page ]
547546
548-
547+
549548class AgentOps :
550549 """High-level manager for creating and managing agents.
551550
@@ -555,15 +554,10 @@ class AgentOps:
555554 Example:
556555 >>> runloop = RunloopSDK()
557556 >>> # Create agent from NPM package
558- >>> agent = runloop.agent.create_from_npm(
559- ... name="my-agent",
560- ... package_name="@runloop/example-agent"
561- ... )
557+ >>> agent = runloop.agent.create_from_npm(name="my-agent", package_name="@runloop/example-agent")
562558 >>> # Create agent from Git repository
563559 >>> agent = runloop.agent.create_from_git(
564- ... name="git-agent",
565- ... repository="https://github.com/user/agent-repo",
566- ... ref="main"
560+ ... name="git-agent", repository="https://github.com/user/agent-repo", ref="main"
567561 ... )
568562 >>> # List all agents
569563 >>> agents = runloop.agent.list(limit=10)
@@ -605,9 +599,7 @@ def create_from_npm(
605599
606600 Example:
607601 >>> agent = runloop.agent.create_from_npm(
608- ... name="my-npm-agent",
609- ... package_name="@runloop/example-agent",
610- ... npm_version="^1.0.0"
602+ ... name="my-npm-agent", package_name="@runloop/example-agent", npm_version="^1.0.0"
611603 ... )
612604
613605 :param package_name: NPM package name
@@ -624,7 +616,9 @@ def create_from_npm(
624616 :raises ValueError: If 'source' is provided in params
625617 """
626618 if "source" in params :
627- raise ValueError ("Cannot specify 'source' when using create_from_npm(); source is automatically set to npm configuration" )
619+ raise ValueError (
620+ "Cannot specify 'source' when using create_from_npm(); source is automatically set to npm configuration"
621+ )
628622
629623 npm_config : dict = {"package_name" : package_name }
630624 if npm_version is not None :
@@ -652,9 +646,7 @@ def create_from_pip(
652646
653647 Example:
654648 >>> agent = runloop.agent.create_from_pip(
655- ... name="my-pip-agent",
656- ... package_name="runloop-example-agent",
657- ... pip_version=">=1.0.0"
649+ ... name="my-pip-agent", package_name="runloop-example-agent", pip_version=">=1.0.0"
658650 ... )
659651
660652 :param package_name: Pip package name
@@ -671,7 +663,9 @@ def create_from_pip(
671663 :raises ValueError: If 'source' is provided in params
672664 """
673665 if "source" in params :
674- raise ValueError ("Cannot specify 'source' when using create_from_pip(); source is automatically set to pip configuration" )
666+ raise ValueError (
667+ "Cannot specify 'source' when using create_from_pip(); source is automatically set to pip configuration"
668+ )
675669
676670 pip_config : dict = {"package_name" : package_name }
677671 if pip_version is not None :
@@ -701,7 +695,7 @@ def create_from_git(
701695 ... name="my-git-agent",
702696 ... repository="https://github.com/user/agent-repo",
703697 ... ref="main",
704- ... agent_setup=["npm install", "npm run build"]
698+ ... agent_setup=["npm install", "npm run build"],
705699 ... )
706700
707701 :param repository: Git repository URL
@@ -716,7 +710,9 @@ def create_from_git(
716710 :raises ValueError: If 'source' is provided in params
717711 """
718712 if "source" in params :
719- raise ValueError ("Cannot specify 'source' when using create_from_git(); source is automatically set to git configuration" )
713+ raise ValueError (
714+ "Cannot specify 'source' when using create_from_git(); source is automatically set to git configuration"
715+ )
720716
721717 git_config : dict = {"repository" : repository }
722718 if ref is not None :
@@ -743,9 +739,7 @@ def create_from_object(
743739 >>> obj = runloop.storage_object.upload_from_dir("./my-agent")
744740 >>> # Then create agent from the object
745741 >>> agent = runloop.agent.create_from_object(
746- ... name="my-object-agent",
747- ... object_id=obj.id,
748- ... agent_setup=["chmod +x setup.sh", "./setup.sh"]
742+ ... name="my-object-agent", object_id=obj.id, agent_setup=["chmod +x setup.sh", "./setup.sh"]
749743 ... )
750744
751745 :param object_id: Storage object ID
@@ -758,7 +752,9 @@ def create_from_object(
758752 :raises ValueError: If 'source' is provided in params
759753 """
760754 if "source" in params :
761- raise ValueError ("Cannot specify 'source' when using create_from_object(); source is automatically set to object configuration" )
755+ raise ValueError (
756+ "Cannot specify 'source' when using create_from_object(); source is automatically set to object configuration"
757+ )
762758
763759 object_config : dict = {"object_id" : object_id }
764760 if agent_setup is not None :
0 commit comments