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.

Metadata

Release files for vifu 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vifu 0.1.10
File Actions
vifu-0.1.10-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for vifu-0.1.10-py3-none-win_amd64.whl
vifu-0.1.10-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for vifu-0.1.10-py3-none-manylinux_2_28_x86_64.whl
vifu-0.1.10-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for vifu-0.1.10-py3-none-manylinux_2_28_aarch64.whl
vifu-0.1.10-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for vifu-0.1.10-py3-none-macosx_11_0_arm64.whl
vifu-0.1.10-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details for vifu-0.1.10-py3-none-macosx_10_15_x86_64.whl

Total release size: 110.2 MB

Release files / vifu-0.1.10-py3-none-win_amd64.whl

Download URL vifu-0.1.10-py3-none-win_amd64.whl
Size 20.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6f2481c5fe4dfece0117143e90d5e233a43ce65ef2a5e4c5c700ba2372427db0
BLAKE2b-256 checksum
How to use checksums
2fe9bdefa41a5d0d898f6889eb57af0f3505346728cd8a0fd79e9f32d07e1899
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / vifu-0.1.10-py3-none-manylinux_2_28_x86_64.whl

Download URL vifu-0.1.10-py3-none-manylinux_2_28_x86_64.whl
Size 23.5 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3ea4ddde02671ce71ff879cffb09c0af5fcd338ccee632d026ac1fd247ce058b
BLAKE2b-256 checksum
How to use checksums
4568972b6f8b1b66e2d2bc17d32c35c49f3a6593346015854d345a38d4421eda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / vifu-0.1.10-py3-none-manylinux_2_28_aarch64.whl

Download URL vifu-0.1.10-py3-none-manylinux_2_28_aarch64.whl
Size 22.8 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
83c13f1afc41599d5617affc8d49450505b57759555129dea8c61ce043789171
BLAKE2b-256 checksum
How to use checksums
f13282c3771a4539c27c675bdeb59ed384a097b614285b7a741c36fac09ae869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / vifu-0.1.10-py3-none-macosx_11_0_arm64.whl

Download URL vifu-0.1.10-py3-none-macosx_11_0_arm64.whl
Size 21.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
62400646a26a1d8ed4d1f85cadb6cfdbbc8f7ad6ad76cb9eeaa90279add75480
BLAKE2b-256 checksum
How to use checksums
7f0926ece5f40709818425a37cc6f059bdb97be724310f2087eea25f60aaa257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / vifu-0.1.10-py3-none-macosx_10_15_x86_64.whl

Download URL vifu-0.1.10-py3-none-macosx_10_15_x86_64.whl
Size 22.4 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
0567485be7f2041c55bed9fa72785d956e884fc396565a5056b8d3046929612f
BLAKE2b-256 checksum
How to use checksums
50d42c123a8d4bc2dd8df5909b61509cf2d812b034708e030b168fa9a660d63b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Security for vifu 0.1.10

Provenance

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for vifu-0.1.10-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

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.

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