Create an Agent

Create an Agent

import agent_orbit as orbit

orbit.api_key = "YOUR_API_KEY"

orbit.Agent.create(
    name="My Agent",
    script="def main(request, store):\n    return 'Hello, world!'",
    requirements="requests==2.31.0\npandas==2.1.4",
    env_vars="FOO=bar\nBAZ=qux",
    python_version="3.11",
)

Description: Creates a new Agent with the following attributes:

  • name: The name of the agent.

  • script: The Python script logic the agent will execute.

  • requirements: The dependencies required, specified as a multiline string.

  • env_vars: Environment variables for the agent, specified as a multiline string.

  • python_version: The Python version to be used (e.g., "3.11").

Returns: An Agent object.

Last updated