Skip to content

feat: add agentic-api Python distribution - #201

Open
franciscojavierarceo wants to merge 20 commits into
mainfrom
codex/agentic-api-python-0.4.0
Open

feat: add agentic-api Python distribution#201
franciscojavierarceo wants to merge 20 commits into
mainfrom
codex/agentic-api-python-0.4.0

Conversation

@franciscojavierarceo

@franciscojavierarceo franciscojavierarceo commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add the lightweight agentic-api Python distribution for the 0.5.0 build-only release, while retaining the existing Rust crates and CLI as the implementation core.

What this adds

  • A Maturin-built Python package and agentic-api CLI.
  • serve, doctor, and version commands with model/base-URL validation and safe Rust CLI passthrough.
  • Local-mode supervision for the packaged Rust server plus an optional local vLLM process. Remote mode starts only the Rust server against an existing inference endpoint.
  • Process-group cleanup, readiness handling, diagnostics, version alignment, and regression coverage.
  • Wheel validation, Python build constraints, CI matrix coverage, and a manylinux release path.
  • Installation and workflow documentation, including Claude/Codex startup examples.

This package does not add vLLM, PyTorch, CUDA, or ROCm payloads to the wheel. The optional local runtime dependency is isolated behind the local extra and remains pinned for reproducibility.

Release boundary

Version 0.5.0 builds and validates wheel artifacts in CI but does not publish to PyPI yet. PyPI publication and the public uvx pip install agentic-api workflow are deferred until supported Linux runtime/device validation is complete.

Test Plan

  • cargo test --workspace
  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • uv run --python 3.12 --with maturin==1.14.1 --with pytest==9.1.1 python -m pytest tests/python -q
  • python3 scripts/tests/agentic-cli-e2e-test.py
  • git diff --check

Add the lightweight agentic-api Python package and CLI for the 0.4.0 build-only release. The package supervises the Rust server and optional local vLLM process, exposes diagnostics and version commands, and ships the cross-platform wheel and release validation workflow while preserving the existing Rust CLI.

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Install the Rust components required by the repository toolchain during wheel builds and keep the cross-platform process test from mutating os.name globally, which was breaking pytest pathlib cleanup on Linux.

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Add standard version and machine-readable doctor commands, return actionable errors for missing binaries, reject malformed or credential-bearing upstream URLs, document the local vLLM extra, and exercise source installation through the end-to-end test.

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Keep Cargo registry caches for Python wheel jobs but do not restore or save the large compiled target directory across Python matrix entries.

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
@franciscojavierarceo
franciscojavierarceo force-pushed the codex/agentic-api-python-0.4.0 branch from c02885a to 5a3db2d Compare August 26, 2026 11:24
franciscojavierarceo and others added 14 commits August 26, 2026 07:31
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the build-only 0.5.0 Python distribution around the existing Rust gateway.

Changes:

  • Adds Python CLI, diagnostics, supervision, and packaged binary discovery.
  • Adds wheel build, validation, release workflows, and extensive tests.
  • Documents artifact installation and local/remote operation.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pyproject.toml Defines Maturin package metadata.
python-build-constraints.txt Pins Python build tools.
python/agentic_api/__init__.py Exposes the package version.
python/agentic_api/__main__.py Adds module execution support.
python/agentic_api/binary.py Discovers packaged executables.
python/agentic_api/cli.py Implements CLI parsing and validation.
python/agentic_api/compatibility.py Pins supported vLLM version.
python/agentic_api/diagnostics.py Implements doctor diagnostics.
python/agentic_api/launcher.py Launches local or remote mode.
python/agentic_api/process.py Supervises child processes.
python/agentic_api/version.py Generates version reports.
python/agentic_api.data/scripts/agentic-api Provides the packaged entry point.
scripts/check-python-wheel.sh Validates wheel contents and installation.
scripts/validate-python-release-version.sh Enforces the build-only version gate.
scripts/tests/agentic-cli-e2e-test.py Adds source-install CLI coverage.
tests/python/test_binary.py Tests executable discovery.
tests/python/test_cli.py Tests CLI validation and dispatch.
tests/python/test_diagnostics.py Tests diagnostic reporting.
tests/python/test_docs_examples.py Validates documented commands.
tests/python/test_installed_cli.py Tests installed-wheel commands.
tests/python/test_launcher.py Tests launcher behavior.
tests/python/test_metadata.py Validates package metadata.
tests/python/test_process.py Tests supervision and readiness.
tests/python/test_release_version.py Tests release constraints.
tests/python/test_version.py Tests version reporting.
tests/python/test_wheel_check.py Tests wheel validation rules.
.github/workflows/python.yml Adds Python wheel CI.
.github/workflows/release-python.yml Adds build-only release artifacts.
crates/agentic-server/src/main.rs Enables Rust server version output.
crates/agentic-server/tests/cli_test.rs Tests packaged Rust CLIs.
README.md Documents Python distribution usage.
docs/index.md Links Python installation guidance.
docs/guides/python-installation.md Adds installation and workflow guide.
AGENTS.md Updates repository and testing guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +66 to +68
def _run_local_mode(supervisor: ProcessSupervisor, options: ServeOptions) -> ChildResult:
if options.model is None:
raise ValueError("--model is required in local mode")
Comment thread python/agentic_api/diagnostics.py Outdated
Comment thread python/agentic_api/binary.py Outdated
- "python/**"
- "scripts/check-python-wheel.sh"
- "scripts/validate-python-release-version.sh"
- "tests/python/**"
- "python/**"
- "scripts/check-python-wheel.sh"
- "scripts/validate-python-release-version.sh"
- "tests/python/**"
Comment thread AGENTS.md Outdated
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants