Skip to main content

executie

(as in "ExeCutie" — it executes, live, inside your running app)

One function. The model decides everything else.

from executie import ai

ai.setup("groq", "your-key-here")  # free, 14,400 req/day, no card
ai("what's the weather API look like for this project")

No ai.ask(), no ai.search(), no ai.code(), no extra flag for "agent mode." One call. The model decides whether to answer directly, search the web, run code, read a file, or reach into your application's own live objects — and when it's done. Exactly like talking to Claude in a chat window: one message box, one model, no separate modes.

What makes this different

Agent frameworks exist. What we couldn't find anywhere else is an agent that runs inside a live desktop application's own process, with direct access to that application's live objects, while it's running.

Picture QGIS. It doesn't have the exact mapping algorithm you need today. Ask anyway — the agent writes the backend function, builds a QDialog for it that never existed before, and shows it to you live, inside your running QGIS session. Close it and it's gone. Ask again tomorrow and it gets rebuilt fresh, possibly a little different each time, because it's generated live, not pulled from a template. (Nvidia's Jensen Huang has talked about software increasingly being generated in real time, unique to the exact prompt and moment — this is that idea, running inside a desktop app today.)

  • Claude Code and Cursor work on files and processes. They can't call app.render_current_view() on your actual running app.
  • LangChain / AutoGen / smolagents-style frameworks are script/server tools. No live GUI, no in-process kernel.
  • executie runs inside your app's own IPython kernel. run_python executes in the same namespace your app is already running in — your instances, your data, your methods, all directly reachable — while the model can also create Qt widgets on the fly, install packages, hit the filesystem, and search the web, all in the same call.

Built for and stress-tested inside SeismicFlow (<link-to-your-seismicflow-repo>) — a production PyQt6 geoscience application — where it interprets seismic data, calls the app's own processing functions, and creates PyQt6 dialogs live, on the fly, in the running app.

Install

pip install executie          # core: agent, tools, 5 providers
pip install executie[gui]     # + AIChatDock, a ready-made Qt chat panel

Quick start

from executie import ai

ai.setup("groq", "gsk_your_key_here")   # or ai.setup_from_env()

ai("search the web for the latest PyQt6 release notes")
ai("read ~/data.csv, clean the nulls, plot column 3, save to ~/out.png")
ai("list every variable in the current namespace and what it is")

# Multi-turn conversation
chat = ai.new_chat()
chat("create a Flask app with two endpoints")
chat("now add JWT auth")

# Control a running job
job = ai("do something long")
job.on_done(lambda result: print("done:", result[:100]))
job.stop()   # cancel mid-run, stops cleanly after the current step

Drop-in GUI

from executie import AIChatDock
from PyQt6.QtCore import Qt

dock = AIChatDock(parent=main_window)
main_window.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, dock)
dock.setup("groq", "gsk_your_key_here")   # optional — the dock also has its own connect form

Colors inherit from your application's palette automatically. No dark/light mode flag needed — if your app re-themes, the dock follows.

Safety: manual confirmation by default

Full computer access and live application access is a lot of power to hand an agent. By default, every single tool call — run_python, run_bash, file reads/writes, web search/fetch, install_package, and any custom tool you register — shows a dialog with the exact call, syntax-highlighted, before anything runs. Nothing is guessed at as "safe" and skipped; nothing is hidden.

  • Allow / Cancel on every call, no exceptions
  • Fails closed — if the dialog times out or something goes wrong, the tool does not run
  • Falls back to a plain y/N console prompt outside a Qt context

For fully autonomous operation (CI, batch jobs, once you trust the setup):

ai.set_manual_mode(False)

or, without touching code:

export EXECUTIE_AUTO=1

The environment variable always wins, so it's a safe way to force autonomous mode in a deployment without hunting through code paths.

Give it your own tools

from executie import register_tool

def query_my_database(sql: str) -> str:
    return str(my_db.execute(sql).fetchall())

register_tool(
    name="query_database",
    func=query_my_database,
    description="Run a SQL query against the application database.",
    parameters={
        "type": "object",
        "properties": {"sql": {"type": "string"}},
        "required": ["sql"],
    },
)

ai("query the database for all records from the last 7 days")

The model now has this tool alongside the built-ins — run_python, run_bash, web_search, web_fetch, read_file, write_file, list_directory, install_package — and decides on its own when to reach for it. Custom tools go through the same confirmation dialog as everything else.

Providers

Provider Default model Notes
groq llama-3.3-70b-versatile Free · 14,400 req/day · no card
openrouter qwen/qwen3-coder-480b-a22b:free Free · 200 req/day · 50+ models
gemini gemini-2.5-flash Free · 1,500 req/day · 1M context
openai gpt-4o-mini Paid · BYOK
claude claude-sonnet-4-6 Paid · BYOK · highest quality

Switch providers with one call: ai.setup("<provider>", "<api_key>"). Override the model for any provider with ai.setup("<provider>", "<key>", model="...").

Philosophy

No keyword matching. No regex on the user's message. No if "search" in message.lower(). The model is told what it has access to — full computer access, live application runtime, the web — and it decides, every single time, whether a plain answer is enough or a dozen tool calls are needed. There is exactly one entry point (ai(...)) for a one-word greeting and a fifty-step task alike.

Staying safe on the Qt main thread

run_python code — including matplotlib figures, new QDialogs, anything Qt — is automatically dispatched to the main thread through a pyqtSignal-based queue, so agent code never deadlocks your GUI even though the agent itself runs in a background QThread.

License

MIT — see LICENSE.

Metadata

Release files for ExeCutie 0.1.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 ExeCutie 0.1.1
File Size Uploaded Provenance Actions
executie-0.1.1.tar.gz 29.6 kB Without provenance Details for executie-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ExeCutie 0.1.1
File Interpreter ABI Platform Actions
executie-0.1.1-py3-none-any.whl Python 3 none any Details for executie-0.1.1-py3-none-any.whl

Total release size: 61.9 kB

Release files / executie-0.1.1.tar.gz

Download URL executie-0.1.1.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
00db47eda5638752cc35e110422749f0803000c3ff3561049da6b0e6d7c3d9d1
BLAKE2b-256 checksum
How to use checksums
3ca017191d5dd9d6d2afb38e01f6d2e20baaa0869fd00b440ac5c5ef84e4df1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / executie-0.1.1-py3-none-any.whl

Download URL executie-0.1.1-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49b0db393997acc7a569aaef9a82974c8dde9c16147e88a6437b7eaa6a41a4c2
BLAKE2b-256 checksum
How to use checksums
b2b6876b6e3caae2414b8c93536ada0bb2dd5229c7c3424f826449221f794f08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for ExeCutie 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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