Skip to main content

Run an AI agent

Project description

agent.py

This is to run different AI agents.

Installation

uv pip install git+https://github.com/trobz/agent.py

Usage

agent <instructions>

Run the above command to run the agent with instructions and default codex agent.

agent --instructions-file <instructions file name>
agent -f <instructions file name>

Alternatively run one of the above commands to run the agent with instructions in the file name.

agent --workflow <workflow file name>
agent -w <workflow file name>

Or one of the above command can be ran to run the agent with multiple instructions in workflow file name. The format of the workflow file is as follows:

- name: name of the work flow
  code: code of the work flow
  steps:
    - name: name of the step
      original: original instruction
      work_dir: optional work directory
      command: bash command to run
    - name: name of other step
      original: original instruction
      condition: optional bash command to run and check the return code
      instruction: instruction to run the agent
    - name: name of other step
      original: original instruction
      ignore: true
      notes: notes

step can have files set to a list of files to include in the instruction for the agent to consult.

step can have commit_if_change set to either true or a string to commit the changes. If set to true, the step name is used as the commit message. If set to a string, the string is used instead.

--backend <agent name>

Add the above option to run the agent with agent name. Available agents: codex, opencode, and gemini.

--mode <mode>

Add the above option to run the agent with the mode. Available modes: normal, yolo. Mode yolo is to run codex with --dangerously-bypass-approvals-and-sandbox option and run gemini with --yolo option.

--model

Add the above option to use a different model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trobz_agent-1.0.1.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trobz_agent-1.0.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file trobz_agent-1.0.1.tar.gz.

File metadata

  • Download URL: trobz_agent-1.0.1.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for trobz_agent-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5a516c38f6dca04f177373441290ea5ad4aaa97854bc9fe6e26d26cd0ee5d975
MD5 07957c47425672ea924dc145fea08d50
BLAKE2b-256 30d96e9f4e88bd707c31a924b2eb96faaef0da0e4335ebf6fef3d17c5ccec27d

See more details on using hashes here.

File details

Details for the file trobz_agent-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: trobz_agent-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for trobz_agent-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18fef24a8518b15de1884f00d0165fb0dd14b5e03c91c7b8c7219583e00280c7
MD5 c0f0440681c6a285d198db6544ac008e
BLAKE2b-256 76509325e9fffd61e38aed86ade039d009c9c12815d6d10a203483afb01943e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page