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.3.tar.gz (16.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.3-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trobz_agent-1.0.3.tar.gz
  • Upload date:
  • Size: 16.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.3.tar.gz
Algorithm Hash digest
SHA256 ffc4a679e5484f78393f49da262f21775ec6b92806bcd44f6f314c586f7d83d1
MD5 3b00bf43a2c7d5664814f548c30f8a53
BLAKE2b-256 2678677970c49587fff54dd1bcd493cba010ea671f03d70785fe4d730da75bee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trobz_agent-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 47585a9e304500e30aae5e879150a908941e787f22b5d9b8b69b127a5e5de63a
MD5 1955257a5e194ee81afb3499f75c93f5
BLAKE2b-256 d4b5b4ebf8c7b39ebbf0533c4db3a9b431a7dd8da82d6dfa885d44db87327461

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