Metadata-Version: 2.4
Name: vifu
Version: 0.1.2
Summary: Embed Vifu Runtime, Gateway, and local Server in Python agent applications.
Requires-Python: >=3.10
License-Expression: Apache-2.0
Description-Content-Type: text/markdown
Author: Vifu Contributors
Keywords: agents,on-device-ai,gateway,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Provides-Extra: foundry
Requires-Dist: foundry-local-sdk>=1.0,<2; extra == "foundry"
Provides-Extra: foundry-winml
Requires-Dist: foundry-local-sdk-winml>=1.0,<2; extra == "foundry-winml"
Project-URL: Homepage, https://vifu.dev
Project-URL: Documentation, https://github.com/vifudotdev/vifu/tree/main/docs/get-started
Project-URL: Repository, https://github.com/vifudotdev/vifu
Project-URL: Issues, https://github.com/vifudotdev/vifu/issues
License-File: LICENSE
License-File: NOTICE

# Vifu Python SDK

The Python SDK embeds the Vifu Runtime, Agent Gateway, and local Server. Python
functions can become local Agent providers. `Vifu("name")` creates or reopens
one real App in the personal Server and records its project binding in
`.vifu/app.json`.

Create an environment and install Vifu:

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install vifu
```

The wheel contains the generated UniFFI binding, native Rust library, and Vifu
Server binary. The Python API calls the Runtime in the application process. It
reuses a running local Server or starts its bundled Server.

The public API provides:

- `Vifu` for App identity, Agent registration, local Server connection,
  invocation, tracing, and remote calls.
- `VifuRuntime` for persistent Runtime state, Agent registration, invocation,
  snapshots, and pending traces.
- `AgentTrace` for activity, output deltas, and typed provider stages.
- `VifuGateway` for explicit remote enrollment and advanced Gateway control.
- `VifuServer` for advanced control of the bundled Vifu Server process.

Start with the [Python tutorial](../../docs/get-started/python.md). Runnable
framework integrations are available for
[Google ADK](../../examples/google-adk-python/) and
[Foundry Local](../../examples/foundry-local-python/).
