Create an Agent Executor Job

Create an Agent Executor Job

pythonCopy codeimport agentorbit

agentorbit.api_key = "YOUR_API_KEY"

# Create and execute an agent executor job
executor_job = agentorbit.AgentExecutorJob.create(
    agent_id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e",
    payload={"foo": "bar"},
)

Returns: An AgentExecutorJob object.

Details: Creating an agent executor job executes the agent with the provided agent_id. The payload parameter is optional and can be used to pass data to the agent. The agent accesses this payload via the request parameter:

pythonCopy codedef main(request, store):
    print(request.payload["foo"])  # Outputs: "bar"

Last updated