Catalog PyPI
PACKAGE EXPLORERView in registry

aibaton

PyPI

An agent automation framework based on Codex/Claude Code

Versions collected1
Direct dependencies0From release 0.1.2
Last observed21 Oct, 10:01 UTC

README

Version 0.1.2 documentation

AIBaton

中文文档

Headless Agent Automation — Python wrapper for codex/claude CLI, enabling arbitrarily complex agent automation/workflows through programmable prompts.

Features

  • Prompt-Oriented Programming — Natural language prompts as Python code, seamlessly interact with agents
  • Skill Support — Use skills to convert intent into aibaton code, making complex tasks more controllable
  • Loop Detection — Built-in iterative optimization (loop_max)
  • Response Parsing — Parse agent results with semantic options using parse(options)

Use Cases

  • Repetitive Tasks — Batch tasks that reuse the same prompt workflow for agent interaction
  • Context Explosion Tasks — Tasks with extensive context where agents miss too many details, requiring finer-grained control
  • Automated Workflows — Build workflows directly on agents, implement arbitrarily complex logic with simple Python syntax

Not Suitable For

  • Non-Repetitive Tasks — No need to script for repeated use
  • Complex Tasks Requiring Step-by-Step Confirmation — Difficult to pre-define all scenarios via script, requires human confirmation at each agent stage

Example

Install the aibaton SKILL using codex, then enter the following prompt:

$aibaton Find Go code files over 300 lines in the project and optimize them, extract redundant code into sub-functions following DRY principles, and update references in other files.

Output executable script:

from aibaton import run, set_default
import os

set_default(provider="codex", dangerous_permissions=True)

prompt = """Review the current file code and optimize, extract redundant code into sub-functions following DRY principles, and update references in other files."""

def get_go_files(root_dir: str, min_lines: int = 0) -> list[str]:
    go_files = []
    for dirpath, _, filenames in os.walk(root_dir):
        for f in filenames:
            if f.endswith('.go'):
                fpath = os.path.join(dirpath, f)
                if min_lines <= 0 or sum(1 for _ in open(fpath)) > min_lines:
                    go_files.append(fpath)
    return go_files

if __name__ == '__main__':
    par_dir = '/app/banbot'
    for fpath in get_go_files(par_dir, min_lines=300):
        run(f"File path: {fpath}\n\n{prompt}", cwd=par_dir, add_dirs=[par_dir], stream=True)

Run the script as prompted.

More Complex Task Example

A complex workflow prompt

After codex uses aibaton skill, output executable script: work_flow.py

Installation

pip install aibaton
# or
uv pip install aibaton

License

Apache 2.0

Downloads & popularity

3downloads
1-day window · source-reported counts21 Oct 2026
73.50
2026-07-24: 4 · observed 2026-10-22T10:59:47.5670542Z · period 2026-07-24–2026-07-242026-07-27: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-07-27–2026-07-272026-07-28: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-07-28–2026-07-282026-08-01: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-02–2026-08-022026-08-05: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-05–2026-08-052026-08-06: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-06–2026-08-062026-08-09: 3 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-09–2026-08-092026-08-13: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-13–2026-08-132026-08-14: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-14–2026-08-142026-08-15: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-15–2026-08-152026-08-17: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-17–2026-08-172026-08-21: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-21–2026-08-212026-08-22: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-22–2026-08-222026-08-23: 3 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-23–2026-08-232026-08-24: 5 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-24–2026-08-242026-08-25: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-25–2026-08-252026-08-31: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-08-31–2026-08-312026-09-06: 6 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-06–2026-09-062026-09-07: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-07–2026-09-072026-09-20: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-20–2026-09-202026-09-21: 7 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-21–2026-09-212026-09-26: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-26–2026-09-262026-09-27: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-27–2026-09-272026-09-28: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-28–2026-09-282026-09-30: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-09-30–2026-09-302026-10-01: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-01–2026-10-012026-10-02: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-02–2026-10-022026-10-04: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-04–2026-10-042026-10-06: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-06–2026-10-062026-10-09: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-09–2026-10-092026-10-10: 4 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-10–2026-10-102026-10-13: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-13–2026-10-132026-10-14: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-14–2026-10-142026-10-15: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-15–2026-10-152026-10-17: 2 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-17–2026-10-172026-10-20: 1 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-20–2026-10-202026-10-21: 3 · observed 2026-10-22T10:59:47.5670542Z · period 2026-10-21–2026-10-21
24 Jul21 Oct

pypistats · 38 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-21 – 2026-10-2132026-10-22T10:59:47.5670542Z
2026-10-20 – 2026-10-2012026-10-22T10:59:47.5670542Z
2026-10-17 – 2026-10-1722026-10-22T10:59:47.5670542Z
2026-10-15 – 2026-10-1512026-10-22T10:59:47.5670542Z
2026-10-14 – 2026-10-1412026-10-22T10:59:47.5670542Z
2026-10-13 – 2026-10-1312026-10-22T10:59:47.5670542Z
2026-10-10 – 2026-10-1042026-10-22T10:59:47.5670542Z
2026-10-09 – 2026-10-0912026-10-22T10:59:47.5670542Z
2026-10-06 – 2026-10-0622026-10-22T10:59:47.5670542Z
2026-10-04 – 2026-10-0412026-10-22T10:59:47.5670542Z
2026-10-02 – 2026-10-0222026-10-22T10:59:47.5670542Z
2026-10-01 – 2026-10-0122026-10-22T10:59:47.5670542Z
2026-09-30 – 2026-09-3022026-10-22T10:59:47.5670542Z
2026-09-28 – 2026-09-2822026-10-22T10:59:47.5670542Z
2026-09-27 – 2026-09-2712026-10-22T10:59:47.5670542Z
2026-09-26 – 2026-09-2622026-10-22T10:59:47.5670542Z
2026-09-21 – 2026-09-2172026-10-22T10:59:47.5670542Z
2026-09-20 – 2026-09-2012026-10-22T10:59:47.5670542Z
2026-09-07 – 2026-09-0712026-10-22T10:59:47.5670542Z
2026-09-06 – 2026-09-0662026-10-22T10:59:47.5670542Z
2026-08-31 – 2026-08-3112026-10-22T10:59:47.5670542Z
2026-08-25 – 2026-08-2512026-10-22T10:59:47.5670542Z
2026-08-24 – 2026-08-2452026-10-22T10:59:47.5670542Z
2026-08-23 – 2026-08-2332026-10-22T10:59:47.5670542Z
2026-08-22 – 2026-08-2212026-10-22T10:59:47.5670542Z
2026-08-21 – 2026-08-2122026-10-22T10:59:47.5670542Z
2026-08-17 – 2026-08-1722026-10-22T10:59:47.5670542Z
2026-08-15 – 2026-08-1522026-10-22T10:59:47.5670542Z
2026-08-14 – 2026-08-1422026-10-22T10:59:47.5670542Z
2026-08-13 – 2026-08-1312026-10-22T10:59:47.5670542Z
2026-08-09 – 2026-08-0932026-10-22T10:59:47.5670542Z
2026-08-06 – 2026-08-0612026-10-22T10:59:47.5670542Z
2026-08-05 – 2026-08-0512026-10-22T10:59:47.5670542Z
2026-08-02 – 2026-08-0212026-10-22T10:59:47.5670542Z
2026-08-01 – 2026-08-0112026-10-22T10:59:47.5670542Z
2026-07-28 – 2026-07-2812026-10-22T10:59:47.5670542Z
2026-07-27 – 2026-07-2722026-10-22T10:59:47.5670542Z
2026-07-24 – 2026-07-2442026-10-22T10:59:47.5670542Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.228 Jan 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
banbox/aibaton

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2d7b6a0b62856f0921ee2681aad3dd7184f62afc902e08d1cf4e925266a07007