Update an Agent

Update an Agent

import agent_orbit as orbit

orbit.api_key = "YOUR_API_KEY"

orbit.Agent.update(
    id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e",
    name="Updated name",
    script="def main(request, store):\n    return 'Hello!'",
    requirements="requests==2.31.0",
    env_vars="FOO=bar",
    python_version="3.10",
)

Description: Updates an Agent with the specified id. The following fields can be modified:

  • name: New name for the agent.

  • script: Updated script logic.

  • requirements: Dependencies required by the agent.

  • env_vars: Environment variables.

  • python_version: Specify the Python version to use (e.g., "3.10").

Returns: An updated Agent object.

Last updated