Skip to main content

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:

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

The wheel contains the generated UniFFI binding, native Rust library, and the same complete Vifu binary distributed in Vifu releases. That binary includes the Server, Dashboard, TUI, Gateway, SQLite storage, and Runtime APIs. The Python API calls the Runtime in the application process. It reuses a running local Server or starts the bundled binary in Server-only mode.

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.
  • VifuServerConfig for typed local Server startup configuration from Python.
  • AppProvider and Vifu.provider() for declaring reusable App-private Providers and binding them to Agent roles.
  • LocalWhisper, LocalLlama, and OpenAICompatible for code-configured speech and language-model Providers.
  • Vifu.run() for the same registered Agent App lifecycle locally and on a compatible managed host.

Call app.run() after registering Agents to serve Endpoint invocations until the local process stops. An App may instead pass a local entrypoint such as app.run(local_main). Vifu calls that entrypoint for direct local execution. A compatible managed host uses the registered Endpoints from the same script, does not enter the local interaction loop, and stops after its assigned invocation completes. Managed lifecycle details are not part of application input or output.

Framework integrations can be registered as normal Agent handlers. An integration may declare vifu_name, vifu_capability, vifu_metadata, vifu_instructions, and related defaults on the handler object. It may also implement vifu_bind(...) and vifu_run() when it owns one foreground runtime such as a voice session. Vifu.run() binds and starts that lifecycle, so the application entrypoint remains only Agent registration:

app.agent("voice", voice_agent)
app.agent("assistant", assistant_agent)
app.run()

Keep an Agent's implementation separate from the Provider it uses:

from vifu import LocalLlama, Vifu

app = Vifu("support-call")
reasoning = app.provider(
    "reasoning",
    LocalLlama(model="qwen2.5-3b-instruct-q4_k_m.gguf"),
)
app.agent(
    "reply-agent",
    reply_agent,
    implementation="strands-agents",
    providers={"reasoning": reasoning},
)

The App reports the Provider as an App-private resource. Vifu creates an Agent Profile only for reply-agent; it does not turn reasoning into another Agent.

Install the optional Strands integration, then select an OpenAI-compatible Provider directly in Python, including hosted and loopback model servers:

python -m pip install "vifu[strands]"
from vifu.integrations.strands import openai_compatible_model

model = openai_compatible_model(
    request,
    url="http://127.0.0.1:11434/v1/chat/completions",
    model="qwen2.5:7b",
)

The API key remains process configuration and is never included in Agent metadata. strands_model(...) remains available when an App intentionally uses a versioned Vifu Agent Profile.

Start with the Python tutorial. Runnable framework integrations are available for Google ADK and Foundry Local.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

vifu-0.1.7-py3-none-win_amd64.whl (20.2 MB view details)

Uploaded Python 3Windows x86-64

vifu-0.1.7-py3-none-manylinux_2_28_x86_64.whl (23.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

vifu-0.1.7-py3-none-manylinux_2_28_aarch64.whl (22.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

vifu-0.1.7-py3-none-macosx_11_0_arm64.whl (21.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

vifu-0.1.7-py3-none-macosx_10_15_x86_64.whl (22.4 MB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

Details for the file vifu-0.1.7-py3-none-win_amd64.whl.

File metadata

  • Download URL: vifu-0.1.7-py3-none-win_amd64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vifu-0.1.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 62e05adf98cc911605708b8074e97cf25c60a7370538ca4dda8218debdd50686
MD5 529193e86a17dea6a405032070e1bc83
BLAKE2b-256 d291a56fe01c9cf67e9239caef56c63a0ee7d9a5da7abe8737e083ab02d62ed2

See more details on using hashes here.

Provenance

The following attestation bundles were made for vifu-0.1.7-py3-none-win_amd64.whl:

Publisher: release-python.yml on vifudotdev/vifu

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

File details

Details for the file vifu-0.1.7-py3-none-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: vifu-0.1.7-py3-none-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 23.5 MB
  • Tags: Python 3, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vifu-0.1.7-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68ee82d9561c9345b4ce84abf39f1428a7979c7b3e9a2201512b098ee165e586
MD5 2b9f275cf12498692e8c69ac4009d7e0
BLAKE2b-256 c88c7a6200261a465cff43cbbc0fffd2b22702ffa3a23876e4f0a240c1bd6eb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vifu-0.1.7-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release-python.yml on vifudotdev/vifu

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

File details

Details for the file vifu-0.1.7-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vifu-0.1.7-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 078968e8ea33b3043137909df06e5772edf1342176cdf2a867e50bd1695d317b
MD5 fee4beb6ddd1542caa6de8ae48d374ab
BLAKE2b-256 99762970ddb7e98912b88faf2c3099bf7fb36ac6ce870a80d7fca383ec37d88c

See more details on using hashes here.

Provenance

The following attestation bundles were made for vifu-0.1.7-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release-python.yml on vifudotdev/vifu

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

File details

Details for the file vifu-0.1.7-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: vifu-0.1.7-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 21.2 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vifu-0.1.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c57db6e5c4c64895626afb9ea3498a960cfc194e090af1aedd5e9c40222cbc90
MD5 4d970043c59d05fede49bdbdfcc679aa
BLAKE2b-256 7d8b27a6bc70149507bfa5331090dfe474a76fd115d4f1d446c56190b76f9b6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for vifu-0.1.7-py3-none-macosx_11_0_arm64.whl:

Publisher: release-python.yml on vifudotdev/vifu

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

File details

Details for the file vifu-0.1.7-py3-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: vifu-0.1.7-py3-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 22.4 MB
  • Tags: Python 3, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vifu-0.1.7-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6909632af724ffff72f1c6c259eb8ad5f16735340014c12b6742434ed15486c1
MD5 91dd2615a86b5f602596151ea5c1a3fd
BLAKE2b-256 a6cc26aa00c5c742a4e06249c4c707a72a71bf45084e885be241c79ea8e63ef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for vifu-0.1.7-py3-none-macosx_10_15_x86_64.whl:

Publisher: release-python.yml on vifudotdev/vifu

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

Release history Release notifications | RSS feed

This release

0.1.7 This release

5 files

0.1.6

5 files

0.1.5

5 files

0.1.4

5 files

0.1.3

5 files

0.1.2

5 files

0.1.1

5 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page