@@ -541,7 +541,7 @@ def list(self, **params: Unpack[SDKScorerListParams]) -> list[Scorer]:
541541 page = self ._client .scenarios .scorers .list (** params )
542542 return [Scorer (self ._client , item .id ) for item in page ]
543543
544-
544+
545545class AgentOps :
546546 """High-level manager for creating and managing agents.
547547
@@ -551,15 +551,10 @@ class AgentOps:
551551 Example:
552552 >>> runloop = RunloopSDK()
553553 >>> # Create agent from NPM package
554- >>> agent = runloop.agent.create_from_npm(
555- ... name="my-agent",
556- ... package_name="@runloop/example-agent"
557- ... )
554+ >>> agent = runloop.agent.create_from_npm(name="my-agent", package_name="@runloop/example-agent")
558555 >>> # Create agent from Git repository
559556 >>> agent = runloop.agent.create_from_git(
560- ... name="git-agent",
561- ... repository="https://github.com/user/agent-repo",
562- ... ref="main"
557+ ... name="git-agent", repository="https://github.com/user/agent-repo", ref="main"
563558 ... )
564559 >>> # List all agents
565560 >>> agents = runloop.agent.list(limit=10)
@@ -601,9 +596,7 @@ def create_from_npm(
601596
602597 Example:
603598 >>> agent = runloop.agent.create_from_npm(
604- ... name="my-npm-agent",
605- ... package_name="@runloop/example-agent",
606- ... npm_version="^1.0.0"
599+ ... name="my-npm-agent", package_name="@runloop/example-agent", npm_version="^1.0.0"
607600 ... )
608601
609602 :param package_name: NPM package name
@@ -620,7 +613,9 @@ def create_from_npm(
620613 :raises ValueError: If 'source' is provided in params
621614 """
622615 if "source" in params :
623- raise ValueError ("Cannot specify 'source' when using create_from_npm(); source is automatically set to npm configuration" )
616+ raise ValueError (
617+ "Cannot specify 'source' when using create_from_npm(); source is automatically set to npm configuration"
618+ )
624619
625620 npm_config : dict = {"package_name" : package_name }
626621 if npm_version is not None :
@@ -648,9 +643,7 @@ def create_from_pip(
648643
649644 Example:
650645 >>> agent = runloop.agent.create_from_pip(
651- ... name="my-pip-agent",
652- ... package_name="runloop-example-agent",
653- ... pip_version=">=1.0.0"
646+ ... name="my-pip-agent", package_name="runloop-example-agent", pip_version=">=1.0.0"
654647 ... )
655648
656649 :param package_name: Pip package name
@@ -667,7 +660,9 @@ def create_from_pip(
667660 :raises ValueError: If 'source' is provided in params
668661 """
669662 if "source" in params :
670- raise ValueError ("Cannot specify 'source' when using create_from_pip(); source is automatically set to pip configuration" )
663+ raise ValueError (
664+ "Cannot specify 'source' when using create_from_pip(); source is automatically set to pip configuration"
665+ )
671666
672667 pip_config : dict = {"package_name" : package_name }
673668 if pip_version is not None :
@@ -697,7 +692,7 @@ def create_from_git(
697692 ... name="my-git-agent",
698693 ... repository="https://github.com/user/agent-repo",
699694 ... ref="main",
700- ... agent_setup=["npm install", "npm run build"]
695+ ... agent_setup=["npm install", "npm run build"],
701696 ... )
702697
703698 :param repository: Git repository URL
@@ -712,7 +707,9 @@ def create_from_git(
712707 :raises ValueError: If 'source' is provided in params
713708 """
714709 if "source" in params :
715- raise ValueError ("Cannot specify 'source' when using create_from_git(); source is automatically set to git configuration" )
710+ raise ValueError (
711+ "Cannot specify 'source' when using create_from_git(); source is automatically set to git configuration"
712+ )
716713
717714 git_config : dict = {"repository" : repository }
718715 if ref is not None :
@@ -739,9 +736,7 @@ def create_from_object(
739736 >>> obj = runloop.storage_object.upload_from_dir("./my-agent")
740737 >>> # Then create agent from the object
741738 >>> agent = runloop.agent.create_from_object(
742- ... name="my-object-agent",
743- ... object_id=obj.id,
744- ... agent_setup=["chmod +x setup.sh", "./setup.sh"]
739+ ... name="my-object-agent", object_id=obj.id, agent_setup=["chmod +x setup.sh", "./setup.sh"]
745740 ... )
746741
747742 :param object_id: Storage object ID
@@ -754,7 +749,9 @@ def create_from_object(
754749 :raises ValueError: If 'source' is provided in params
755750 """
756751 if "source" in params :
757- raise ValueError ("Cannot specify 'source' when using create_from_object(); source is automatically set to object configuration" )
752+ raise ValueError (
753+ "Cannot specify 'source' when using create_from_object(); source is automatically set to object configuration"
754+ )
758755
759756 object_config : dict = {"object_id" : object_id }
760757 if agent_setup is not None :
0 commit comments