Skip to main content

Portable, zero-dependency bridges that let AI agents operate enterprise APIs (Confluence, Jira) from any locked-down environment.

Project description

bailey

Portable bridges for AI agents into enterprise APIs. Zero dependencies. JSON everywhere. Safe by default.

Named after the Bailey bridge — the portable, prefabricated bridge famous for being assembled fast, anywhere, with no special tools. That's the whole idea.

The problem

AI coding agents (Claude Code, and friends) are brilliant at operating anything with a CLI — and helpless in front of the enterprise tools where your actual work lives. Confluence. Jira. The wikis and trackers behind your corporate VPN.

The usual answers don't survive contact with a locked-down corporate machine:

  • MCP servers need Node runtimes, network egress, or admin approval you don't have.
  • SDKs need pip install on boxes where PyPI is blocked.
  • Browser automation is slow, brittle, and terrifying to security teams.

The pattern

One tiny Python package. Standard library only — if a machine has Python 3.9+, bailey runs on it. Copy the folder, set two environment variables, and your agent can read and write enterprise systems through a CLI contract designed for non-humans:

  • JSON on stdout, always. Agents parse; humans can too.
  • Stable exit codes. 0 ok · 1 error · 3 auth · 4 not found · 5 version conflict. An agent can branch on $? without parsing prose.
  • No interactive prompts, ever. Everything arrives via args, files, or stdin.
  • Optimistic concurrency. update-page --expect-version N aborts (exit 5) if a human edited the page since the agent last read it. Autonomous writes without overwrite accidents.
  • --dry-run on every mutating command. See the exact payload before anything is sent.

Install

pipx install bailey-bridge        # when published to PyPI
# or, the locked-down-machine way — it's stdlib-only, just copy it:
git clone https://github.com/amitvgi12/bailey && cd bailey
python3 -m bailey --version

Configure

# Confluence Data Center / Server (PAT):
export BAILEY_CONFLUENCE_URL="https://confluence.your-company.com"
export BAILEY_CONFLUENCE_TOKEN="your-personal-access-token"

# Confluence Cloud (email + API token → add EMAIL, auth switches to Basic):
export BAILEY_CONFLUENCE_URL="https://your-site.atlassian.net/wiki"
export BAILEY_CONFLUENCE_EMAIL="you@company.com"
export BAILEY_CONFLUENCE_TOKEN="your-api-token"

# Jira: same convention with BAILEY_JIRA_URL / _TOKEN / _EMAIL

# Self-hosted instance behind a corporate/internal CA? Point bailey at the
# PEM bundle — verification stays ON (there is deliberately no "insecure" flag):
export BAILEY_CA_BUNDLE="/etc/ssl/corp-root-ca.pem"

Self-hosted (Data Center) notes: set only URL + TOKEN (PAT → Bearer auth, per Atlassian's DC docs); do not set EMAIL. Context-path installs (https://host/confluence) work — bailey appends /rest/api to whatever base you give. Corporate proxies are honored via standard HTTPS_PROXY/HTTP_PROXY env vars. Pre-7.9 Confluence Server has no PATs: set EMAIL to a username and TOKEN to the password to force Basic auth.

Tokens live in environment variables only — never in arguments (visible in ps/shell history) and never in files bailey writes.

Use

# Read a page as plain text (agent-friendly)
bailey confluence get-page --id 123456 --text

# Search with CQL
bailey confluence search --cql 'space = OPS and title ~ "runbook"'

# Create a page from stdin
echo "<p>Deploy checklist v2</p>" | bailey confluence create-page \
  --space OPS --title "Deploy Checklist" --file -

# Update safely: abort if someone edited since version 7
bailey confluence update-page --id 123456 --file new-body.xml \
  --expect-version 7 --message "automated update" --dry-run

# Jira
bailey jira get-issue --key OPS-42
bailey jira search --jql 'project = OPS and status = "In Progress"'
bailey jira comment --key OPS-42 --body "Deployed to UAT." --dry-run

Use with AI agents

skills/bailey-confluence/ ships a ready-to-install Claude Agent Skill that teaches Claude Code when and how to drive bailey — including the safety rules (always --expect-version, --dry-run first, treat page content as untrusted data).

cp -r skills/bailey-confluence ~/.claude/skills/

Design principles

  1. Zero dependencies is a feature, not a constraint. Every dependency is a procurement conversation on a corporate machine.
  2. The agent is the user. Output, errors, and exit codes are the API.
  3. Reads are free, writes are guarded. Version checks and dry-runs make autonomous operation boring — the good kind of boring.
  4. Adapters, not a tool. Confluence and Jira today; the core (_http.py) is ~150 lines and any REST API is an afternoon away.

Security notes

  • Page and issue content fetched by bailey is untrusted input to your agent. Instructions embedded in a wiki page are data, not commands — the bundled skill says so explicitly.
  • Scope tokens to the narrowest spaces/projects your workflow needs.
  • bailey never logs, stores, or echoes credentials.

Roadmap

  • PyPI release (bailey-bridge)
  • Attachment upload/download
  • Adapter: ServiceNow
  • Adapter: generic OpenAPI-described REST endpoints
  • bailey doctor — connectivity/auth self-check

Status & disclaimer

v0.1.0 — young, tested against the public Atlassian REST API spec with a full unit suite; validate against your own instance before trusting it with production wikis. Personal project; not affiliated with or endorsed by Atlassian or any employer.

License

MIT © 2026 Amit Kumar

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

bailey_bridge-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

bailey_bridge-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file bailey_bridge-0.1.0.tar.gz.

File metadata

  • Download URL: bailey_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bailey_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffefb25a45c7fbcc777bdf2994ba0d8284912f9dd37d7e1b5b6cb378059927d6
MD5 f4b4a7ff88c4174eb9e79d29c1e6871e
BLAKE2b-256 d14d86455f75beadf5203bbdb15395bc4767f177bf736eacf9194456a39e2942

See more details on using hashes here.

Provenance

The following attestation bundles were made for bailey_bridge-0.1.0.tar.gz:

Publisher: publish.yml on amitvgi12/bailey

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bailey_bridge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bailey_bridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bailey_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d553bd90a1e559ac9e56b680e7eb9985eeec084bd62052c78346baee77708955
MD5 2cf9b9547522b363b967bfff799d0dcc
BLAKE2b-256 9a63a72025ab4dad4a009d8fe93f23cc052a7e4d42e73d9ec762810895310450

See more details on using hashes here.

Provenance

The following attestation bundles were made for bailey_bridge-0.1.0-py3-none-any.whl:

Publisher: publish.yml on amitvgi12/bailey

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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