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.2.tar.gz (20.3 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.2-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trobz_agent-1.0.2.tar.gz
  • Upload date:
  • Size: 20.3 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.2.tar.gz
Algorithm Hash digest
SHA256 5fab73c0bbc9b9cc66bf19e3c3823ca6e4c138e860249939061ed4d87c732406
MD5 35564e80551b6e6de1e29c8aab9938d8
BLAKE2b-256 747af458a9bfa96d01560d04d678363ae81ba599e63cc24fec12201836bd5dbf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trobz_agent-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 21.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f064e75a3d3ae79135bbffcd990e93616d3d008736986d61ce36d31a190f3c3
MD5 f7a484ec21bb534042387a7e1183034c
BLAKE2b-256 5ec8e5269442f7608c6706d9e324701b53cbeae7c30af9396553d7699e1ca07c

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