The REST API documentation: https://docs.generalagents.com/
General Agents Python API client is available as a python package on PyPI:
pip install generalagentsThis client includes both an interface for calling the agent, and a simple computer controller. An example execution loop:
from generalagents import Agent
from generalagents.macos import Computer
agent = Agent(model="ace-small", api_key='your-api-key-here')
computer = Computer()
instruction = "Star the generalagents-python github repository"
session = agent.start(instruction)
observation = computer.observe()
for _ in range(25): # max actions
action = session.plan(observation)
print(f"Executing: {action}")
if action.kind == "stop":
break
observation = computer.execute(action)