Skip to main content

ai-ify

Embed an AI agent inside any app. The person chats with it in a panel inside the app (or opens a console on the same conversation); the agent runs on the Claude or Codex subscription already logged in on the machine, and controls the app only in the ways the app's developer allows: backend actions, named UI commands, and an automatic tree of the page's controls.

Install

pip install "ai-ify[web]"     # chat panel for FastAPI apps
pip install ai-ify            # control port and the aiify command only

Also needed: Node.js with npx (the first chat downloads the agent adapter, which brings its own copy of Claude Code or Codex), and a Claude or ChatGPT subscription. People who are not signed in get a "Sign in" card in the panel. No API key is used.

Models and verified compatibility

Use Claude or Codex with the model choices offered by the signed-in adapter. The panel's Model picker is the list available in that application; account access and adapter versions determine its contents. Profile(model=None) retains the provider default, which is not necessarily the cheapest model.

Claude Sonnet 5.5 (claude-sonnet-5-5) passed six synthetic native-action tasks. Those tests used Claude's command-line interface; selection through the embedded adapter still depends on its advertised model choices. Read the packaged guide with python -m aiify.context models and the evidence with python -m aiify.context model-tests.

Use

from aiify import Agent, Profile
from aiify.actions import from_functions

agent = Agent(
    app="myapp",
    actions=from_functions({"notes.add": add_note, "notes.clear": clear_notes},
                           destructive=["notes.clear"]),
    profiles={"default": Profile(provider="claude")},
)
agent.mount(fastapi_app)          # chat panel + websocket + local control port

and in the page:

<script src="/aiify/panel.js" defer></script>

The app can add its own context: rules on what the person typed or the model in use (When(prompt="cost", add_instructions=price_note)), and buttons that start the assistant with their own set-up (launches={"explain": Launch(...)}, then <button data-aiify-launch="explain">). See python -m aiify.context context. Hooks before and after each message, suggested prompts, locked pickers, one-off questions from code (await agent.ask(...)), attachments, app notes, and queued or scheduled messages are each one switch: python -m aiify.context chat-options.

Destructive actions show a "Run it?" card before they run. Agents (the embedded one, or any other on the machine) reach the running app with the aiify command: aiify apps, aiify --app myapp action.list, aiify --app myapp ui tree.

Helper setup and defaults

Think of a toolbox: the developer packs it, and the assistant chooses which tool to use for each request. The app developer ships the map and verified shortcuts and permits web-route paths. People can change available helpers under Controls in the shared panel, then start New chat. The switches preserve running tasks; they do not generate assets or widen the app's permitted route paths.

Helper Developer setup Default during normal use Configuration
Local guidance search: finds instructions, actions and controls None Available automatically; the assistant chooses when to search how=True; use how=False to disable
App map: guide to screens and tasks Run the generator and ship aiify_map.md with the app package Automatically finds a shipped map; adds its overview to the first message and makes its tasks searchable app_map="auto"; use another file path or None to disable
Prepared actions: verified shortcuts into the app's functions Generate, review, verify and ship the bundle; supply its folder Loads and enables the supplied bundle when mounted; no automatic bundle discovery prepared=folder; default None supplies no bundle
Web-route actions: callable versions of the app's web functions Explicitly enable all routes or selected paths Off until the developer opts in; selected routes are then discovered automatically routes=False; opt in with True or a list such as ["/api/samples*"]
flowchart TB
    subgraph Setup["App developer - before shipping"]
        A["No setup for guidance search"]
        B["Run map generator and ship the guide"]
        C["Generate, review and verify shortcuts; supply their folder"]
        D["Optionally enable selected web routes"]
    end
    subgraph Runtime["Normal use - automatic loading"]
        E["Guidance search available"]
        F["Shipped map found and read"]
        G["Supplied shortcuts loaded and enabled"]
        H["Selected routes exposed as actions"]
    end
    A --> E
    B --> F
    C --> G
    D --> H
    E --> I["Assistant chooses what to use for the user's request"]
    F --> I
    G --> I
    H --> I

Generation is automated after the developer starts it. Reviewing, verifying, rebuilding when the app changes, and packaging the generated files remain release responsibilities. Neither maps nor shortcut bundles are generated during ordinary chats. See the discovery guide and preparation guide for the generation commands.

from pathlib import Path
from aiify import Agent

# Defaults: guidance search on, shipped map auto-discovered, routes off.
agent = Agent("myapp")

# A host that ships reviewed, verified shortcuts supplies their folder.
agent = Agent("myapp", prepared=Path(__file__).parent / "aiify_prepared")

# Optional route actions; guidance and map defaults still apply.
agent = Agent("myapp", routes=["/api/samples*"])

# Explicitly disable the default discovery helpers; supply no shortcut bundle.
agent = Agent("myapp", how=False, app_map=None, prepared=None, routes=False)

The developer can use agent.set_helpers(...) to switch configured helpers off and back on for the next chat, including prepared=False for a loaded bundle. Routes must have been enabled when mounting, and maps and bundles must have been supplied; this switch does not discover new bundles or generate missing files. The defaults match the lowest-token tested Circadian Workbench configuration when its map and verified shortcuts are supplied; other apps may differ.

Isolated Sonnet 5.5 checks across six applications record actual native actions, independently checked outputs, token usage and enforced exclusion of user context. These are synthetic functional checks; they do not rank models or replace an application's regression suite.

Documentation

For assistants integrating ai-ify into another app, start with python -m aiify.context features for the full feature reference, then python -m aiify.context best-practices for implementation recipes. Read integration for embedding choices and programmatic for the Python API. The editable guide lives in src/aiify/guide/; README_AI.md and aiify_context.json are generated portable copies. Regenerate them with the agentify skill's scripts/context_export.py write --root . --package aiify --distribution ai-ify; use check instead of write to verify they are current.

Let connected assistants exchange messages

from aiify import Agent, MessageHub

hub = MessageHub("assistant-messages.sqlite3")
analysis = Agent("analysis", messaging=hub.mailbox("analysis", label="Analysis assistant"))
writing = Agent("writing", messaging=hub.mailbox("writing", label="Writing assistant"))
# Mount/start both agents through your existing app lifecycle.

Each shared panel gains Messages; code and agents use the same mailbox operations through their existing control ports. Messages retain sender, recipient, references and reply history. They wait for the recipient's next user-led turn and never start an automatic conversation loop. Run python -m aiify.context messaging for commands and storage behavior.

  • Usage guide, shipped with the package: python -m aiify.context [topic], or from aiify import context; print(context.read()). Also as README_AI.md.
  • Embedding guide, with Circadian Workbench as the worked example.
  • Message format.

Development

python -m venv .venv
.venv/bin/python -m pip install -e ".[web,test]"     # Windows: .venv\Scripts\python.exe
.venv/bin/python -m pytest -m "not browser"          # browser tests need Edge or Playwright's Chromium

Releases are published by GitHub Actions when a vX.Y.Z tag matching the package version is pushed (RELEASING.md).

Install name ai-ify, import name aiify. MIT licence. The bundled page-controller (Alibaba, MIT) builds the page control tree.

Metadata

Release files for ai-ify 0.5.1

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

Source distribution (sdist)

Source distribution for ai-ify 0.5.1
File Size Uploaded Provenance Actions
ai_ify-0.5.1.tar.gz 452.7 kB With provenance Details for ai_ify-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ai-ify 0.5.1
File Interpreter ABI Platform Actions
ai_ify-0.5.1-py3-none-any.whl Python 3 none any Details for ai_ify-0.5.1-py3-none-any.whl

Total release size: 790.9 kB

Release files / ai_ify-0.5.1.tar.gz

Download URL ai_ify-0.5.1.tar.gz
Size 452.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6b8a1e663d1e798ca0d9d57ab9bcfd4031b0e5e42120e2185f872bdfca6b245d
BLAKE2b-256 checksum
How to use checksums
5f5b7ab68c963aa22fd6e608c961c318242cbdb70aefef2ee8f17d7992d51e16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / ai_ify-0.5.1-py3-none-any.whl

Download URL ai_ify-0.5.1-py3-none-any.whl
Size 338.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
962c54ed112fd1aea440f6d716ad6bba728766f552de091c0899fc7666f81451
BLAKE2b-256 checksum
How to use checksums
3666044035d2eb01c40e89f370165f01ab397f599317c2f113adf643a83e851e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Security for ai-ify 0.5.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ai_ify-0.5.1.tar.gz

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 Oct 21, 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