Multi-provider agentic AI with live runtime access for PyQt6 applications.
Project description
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_pythonexecutes 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/Nconsole 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file executie-0.1.1.tar.gz.
File metadata
- Download URL: executie-0.1.1.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00db47eda5638752cc35e110422749f0803000c3ff3561049da6b0e6d7c3d9d1
|
|
| MD5 |
18273e6a69f9b8bff46aa2004c4de9ff
|
|
| BLAKE2b-256 |
3ca017191d5dd9d6d2afb38e01f6d2e20baaa0869fd00b440ac5c5ef84e4df1b
|
File details
Details for the file executie-0.1.1-py3-none-any.whl.
File metadata
- Download URL: executie-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b0db393997acc7a569aaef9a82974c8dde9c16147e88a6437b7eaa6a41a4c2
|
|
| MD5 |
ee41b9846e5d76ba5ae2a5cedd935a90
|
|
| BLAKE2b-256 |
b2b6876b6e3caae2414b8c93536ada0bb2dd5229c7c3424f826449221f794f08
|