Skip to content

malhardeshmukh/generalagents-python

 
 

Repository files navigation

General Agents Python API client

Release Build status License

Documentation

The REST API documentation: https://docs.generalagents.com/

Installation

General Agents Python API client is available as a python package on PyPI:

pip install generalagents

Usage

This 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)

Contributing

See the contributing documentation.

About

General Agents Python API client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.3%
  • Just 4.7%