Skip to main content Switch to mobile version Pre-release This release is a pre-release and may not be stable for production use.
Local-first AI agents, persistent RAG, governed code review, auditability, and optional observability.
pip install privateaistack==0.2.0b6 Copy PIP instructions
A local-first AI stack for controlled model execution, explicit RAG persistence, auditability, and reproducible development deployment.
PrivateAIStack is a local-first Beta candidate for running governed AI-agent workflows on infrastructure you control. It uses FastAPI, Forge from agentforge-oss, Ollama, PostgreSQL/pgvector, portable audit records, deterministic code-quality tools, and optional OpenTelemetry tracing.
Status: Beta candidate 0.2.0b6. This candidate is not a claim of production hardening: security review and organization-specific policy review remain required before operational use.
Runs a FastAPI API with Swagger at http://127.0.0.1:8000/docs.
Uses Ollama with qwen2.5:3b by default.
Uses PostgreSQL for durable document chunks by default; startup fails when that configured store is unavailable.
Reviews local repositories in safe-static mode.
Produces Markdown, JSON, and SARIF-style review reports.
Records portable JSONL audit events.
Exports the knowledge store as agent-memory.v1 (privateaistack memory export), with every chunk bound to its vector, for the AI Infrastructure Suite's memory vector. A chunk that looks like a credential stops the export; redact or exclude it, and the decision is audited.
Rebuilds a vector store with a different built-in embedding model (privateaistack reembed run) and compares the two by neighborhood agreement (reembed quality). That metric is not a measure of search quality; the thresholds are yours. See docs/re-embedding.md.
Optionally sends traces through the OpenTelemetry Collector to Jaeger.
Supports public-sector evaluation needs such as local operation, auditability, human oversight, accessibility, portability, and measurable mission outcomes.
It is not a foundation model.
It is not VM-grade isolation.
It does not claim regulatory compliance.
It does not prove reviewed code is secure.
It does not automatically download large models.
It does not use hosted providers by default.
Local execution is not automatically secure execution.
Development Compose defaults require operator hardening before production use.
User or CI -> FastAPI -> Forge Orchestrator |-> Ollama |-> PostgreSQL/pgvector |-> policy and audit |-> deterministic review tools |-> optional OTLP Collector -> Jaeger Five-Minute Quickstart
After this candidate is published, install its exact version:
python -m pip install "privateaistack==0.2.0b6" privateaistack --version General installation can use the latest published version:
PyPI distribution: privateaistack
Python import package: private_ai_stack
CLI command: privateaistack
For development from a local checkout:
python -m pip install -e ".[dev,postgres,observability]" privateaistack --version Create a standalone deployment template:
privateaistack init ./privateaistack-deploy cd privateaistack-deploy privateaistack config check --directory . privateaistack up --directory . privateaistack model pull --directory . --model qwen2.5:3b privateaistack health --directory . The packaged template includes compose.yaml, .env.example, OpenTelemetry Collector config, PostgreSQL initialization SQL, helper scripts, and local audit/, reports/, exports/, and backups/ directories. Compose loads .env.example and optional .env overrides. privateaistack init refuses non-empty directories unless --force is used and never overwrites an existing .env file.
Repository checkout workflow:
git clone https://github.com/sekacorn/PrivateAIStack.git cd PrivateAIStack cp .env.example .env docker compose up --build -d make model-pull make health Model download is explicit. The default laptop model is qwen2.5:3b, selected for a 16 GB laptop profile with about 6 GB free RAM. On Windows, the Makefile targets call PowerShell scripts in scripts/.
API: http://127.0.0.1:8000
Swagger: http://127.0.0.1:8000/docs
Bundled Ollama: internal Compose endpoint http://ollama:11434
Host Ollama: http://127.0.0.1:11434 only if you run Ollama outside Compose
Jaeger with observability profile: http://127.0.0.1:16686
docker compose --profile observability up --build -d # or privateaistack up --directory . --observability Core operation does not require observability. The application should keep working if the collector or Jaeger is unavailable. OpenTelemetry is disabled by default. The bundled Collector and Jaeger configuration is for local development and is not live-verified by the unit tests.
curl -sS http://127.0.0.1:8000/health curl -sS http://127.0.0.1:8000/ready curl -sS http://127.0.0.1:8000/version privateaistack doctor --directory . First Task
curl -sS -X POST http://127.0.0.1:8000/v1/tasks \ -H "content-type: application/json" \ -d '{"goal":"Create a safe implementation plan for a local RAG feature."}' privateaistack task run --directory . "Create a safe implementation plan for a local RAG feature." Task records and task events are process-local. A task is created and executed synchronously by the current API process, and task/review lookup state does not survive an API restart. Audit records and PostgreSQL-backed documents have separate persistence behavior.
Forge is the normal task path and uses fixed local Ollama routing. If Forge fails, PrivateAIStack fails the task by default. Set ALLOW_DIRECT_OLLAMA_FALLBACK=true only when an operator deliberately accepts a degraded direct-Ollama path; that path stays local and is audited, but is not Forge-equivalent policy, routing, limit, or telemetry behavior.
curl -sS -X POST http://127.0.0.1:8000/v1/knowledge/documents \ -H "content-type: application/json" \ -d '{"source_name":"mission.md","content":"PrivateAIStack stores local documents and audit records."}' privateaistack knowledge add --directory . --source-name mission.md --content "PrivateAIStack stores local documents and audit records." DATABASE_URL=postgresql://... is the durable default. If PostgreSQL cannot initialize, the API does not start and cannot falsely present volatile data as persistent. Packaged Compose verification confirmed that PostgreSQL-backed knowledge survives an API restart; task and review registries remain process-local. DATABASE_URL=memory://local is an explicit test/development mode: documents are process-local and /ready reports a degraded persistence: volatile check.
curl -sS -X POST http://127.0.0.1:8000/v1/reviews \ -H "content-type: application/json" \ -d '{"repository_path":"/app/sample-target","mode":"safe-static"}' privateaistack review --directory . /app/sample-target Then fetch a report:
curl -sS "http://127.0.0.1:8000/v1/reviews/REVIEW_ID/report?format=markdown" safe-static copies only selected regular files into a temporary analysis tree before invoking its fixed tool list. Secret paths, symlinks, binary files, and oversized files are excluded from that copy. Tool output and the total review runtime are bounded. The tools still execute as local subprocesses against copied repository content; safe-static is not VM-level sandboxing, does not prove code safety, and does not execute the target project. sandboxed-execution remains intentionally unavailable pending an explicit approval and isolation implementation.
Review reports focus on Technical Quality and Risk. Public-sector teams should still evaluate whether any proposed AI workflow has a real user need, measurable mission outcome, accessible user path, clear records and retention plan, human ownership for high-impact decisions, operational owner, continuity plan, and a deterministic non-AI alternative where that is safer or simpler.
Policies deny sensitive file reads, require approval for network access, and log database mutations. Missing approvers deny by default.
curl -sS http://127.0.0.1:8000/v1/policies The current HTTP API exposes the policy catalog. Executable policy-gate checks are currently covered through the internal policy engine and tests, not a public policy-test endpoint.
Backup, Restore, And Export
make backup make restore RESTORE_FILE=backups/file.sql make export-memory make export-audit privateaistack memory export exports/memory # agent-memory.v1, inside the api container privateaistack backup --directory . privateaistack restore --directory . backups/file.sql privateaistack audit export --directory . Audit, report, and export output is bind-mounted into audit/, reports/, and exports/ for local inspection. PostgreSQL and Ollama model storage use Docker named volumes. docker compose down preserves named volumes. docker compose down -v deletes PostgreSQL and Ollama model data.
Get-Content audit/audit.jsonl -Tail 20 make export-audit privateaistack audit show --directory . --lines 20 privateaistack audit verify --directory . Audit records are JSONL with chained hashes and redacted sensitive fields. They are intended for local review and export, not as a substitute for organization-specific logging controls. Cooperating local writers serialize appends and verify the existing chain before extending it. The chain is tamper-evident rather than immutable evidence, externally anchored provenance, or an AIAuditLog runtime integration.
Backup and restore commands operate on the Compose PostgreSQL service only. They do not back up audit bind mounts, reports, exports, configuration, or Ollama model volumes. The scripts are convenience tooling; live backup/restore verification depends on an operator-run Compose deployment.
docker compose down Do not use docker compose down -v unless you intentionally want to delete PostgreSQL and Ollama named-volume data.
OLLAMA_MODEL=qwen2.5:3b OLLAMA_BASE_URL=http://ollama:11434 For external Ollama, point OLLAMA_BASE_URL to your private endpoint. The URL must not contain credentials, a query string or a fragment; configure authentication outside it. Hosted providers remain disabled unless explicitly configured in future adapters.
The deterministic embedding fallback is private and testable, but not as semantically strong as a dedicated local embedding model.
Safe-static review does not execute project tests or install dependencies.
Tool availability depends on the local/container environment.
Local model output can be wrong and requires human review.
Application policy is not a replacement for VM or microVM isolation.
API-key authentication is one shared-key authentication mechanism, not authorization, tenancy, or identity management. It is optional in development and required by configuration for production environment mode.
/health means the API process is alive. /ready checks the configured Ollama endpoint/model and persistence state; memory://local is intentionally reported as degraded rather than durable readiness.
Compose uses development credentials and local bind mounts. Operators must supply secrets, network policy, TLS, retention, backup validation, and production deployment controls.
Review reports, task state, and review state are process-local unless an external durable system is added.
Stronger local embedding adapters.
Richer Forge event correlation.
Hardened sandboxed-execution mode.
Optional hosted-provider adapters with explicit opt-in.
Hosted providers are off by default, PostgreSQL is not published to the host, configured URLs refuse credentials and query-string tokens, and an inconsistent knowledge index fails loudly instead of ranking wrongly. See SECURITY.md.
All advisories: github.com/sekacorn/PrivateAIStack/security/advisories.
Understood problems that are not yet fixed are listed in docs/known-issues.md.
Original repository code is Apache-2.0 licensed. Third-party dependencies have their own licenses; see docs/dependency-licenses.md.
Author/Maintainer: sekacorn
Both files in this release have provenance metadata.
Apache-2.0 View SPDX License List
all cost dev observability postgres quality security
agents ai audit devsecops local-first ollama rag
Development Status 4 - Beta
Intended Audience Developers
License OSI Approved :: Apache Software License
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Application Frameworks
System :: Distributed Computing
System :: Systems Administration
Release files for privateaistack 0.2.0b6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 314.5 kB
Release files / privateaistack-0.2.0b6.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Security for privateaistack 0.2.0b6
Both files in this release have been uploaded with provenance metadata.
With provenance privateaistack-0.2.0b6.tar.gz Nov 30, 2026
Attestation for privateaistack-0.2.0b6.tar.gz
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files Full provenance
Nov 26, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
Nov 24, 2026 2 release files Full provenance
Aug 12, 2026 2 release files Full provenance
Aug 6, 2026 2 release files Full provenance
Jul 8, 2026 2 release files Change of provenance
Jul 5, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




