Metadata-Version: 2.4
Name: z4j-bare
Version: 2026.4.0a1
Summary: z4j framework-free agent bootstrapper (Apache 2.0)
Project-URL: Homepage, https://z4j.com
Project-URL: Source, https://github.com/z4jdev/z4j
Project-URL: Documentation, https://z4j.com/docs
Project-URL: Issues, https://github.com/z4jdev/z4j/issues
Project-URL: Changelog, https://github.com/z4jdev/z4j/blob/main/CHANGELOG.md
Author: z4j contributors
License: Apache-2.0
License-File: LICENSE
Keywords: agent,celery,queue,task,z4j
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: httpx>=0.28
Requires-Dist: websockets>=14
Requires-Dist: z4j-core
Description-Content-Type: text/markdown

# z4j-bare

**License:** Apache 2.0
**Status:** Phase 1 scaffolding — not yet implemented.

Framework-free agent bootstrapper for z4j. Ships in v1 both as a
working reference for standalone Python workers and as proof that the
domain core is actually framework-free.

## What it does (once implemented)

- Provides `AgentRuntime` — the pure-Python agent runtime
- WebSocket client with exponential-backoff reconnect
- HTTPS long-poll fallback for restricted networks
- Local SQLite buffer (crash-safe event storage)
- Command dispatcher
- Heartbeat loop
- CLI entry point: `python -m z4j_bare run --config ...`

## Use cases

- Pure Celery worker projects (no web framework)
- ML pipelines that run Celery but don't use Django
- Environments where you want to run the agent as a separate process

## Installation (once v0.1.0-alpha ships)

```bash
pip install z4j-bare z4j-celery
```

## Usage

```python
from celery import Celery
from z4j_bare import install_agent
from z4j_celery import CeleryEngineAdapter

app = Celery("myproject", broker="redis://localhost/0")

agent = install_agent(
    engines=[CeleryEngineAdapter(celery_app=app)],
    brain_url="https://z4j.internal",
    token="z4j_agent_...",
    project_id="ml-pipeline-prod",
)
```

Or as a standalone process:

```bash
python -m z4j_bare run \
    --brain-url https://z4j.internal \
    --token $Z4J_TOKEN \
    --project-id ml-pipeline-prod \
    --engine celery \
    --celery-app myproject.celery:app
```

See [`docs/ADAPTER.md §6`](../../docs/ADAPTER.md) for the full
bare-Python integration guide.
