Skip to main content

The Framework

Python library for building agent applications: tool execution, durable conversations, private specialists, backend services, authenticated clients and editable interfaces. The application owns its instructions, permissions and UI; the library owns their composition and runtime contracts.

Python 3.12+ · alpha · distribution b4pt0r-the-framework · import the_framework

Call a model in Python

Install b4pt0r-the-framework, authenticate once with python -c 'from codex_backend_sdk import OpenAI; OpenAI().authenticate()', and set FRAMEWORK_MODEL to a model supported by your Codex/ChatGPT account. Then run:

import os
from the_framework import AgentSpec

agent = AgentSpec(
    name="assistant",
    instructions="Answer clearly and briefly.",
    configuration={"model": os.environ["FRAMEWORK_MODEL"]},
).build_agent()
for event in agent.stream("What can I build with an agent framework?"):
    if event.type == "agent.text.delta" and event.channel == "output":
        print(event.delta, end="", flush=True)
print()

This calls the real backend and uses account quota. Continue with First agent to let the model read a file through a Python tool and resume the conversation from disk, or host a complete app below.

Run an editable application

With Python 3.12+, Node.js/npm and Chromium's OS dependencies installed:

python -m pip install b4pt0r-the-framework
the-framework bootstrap --code-dir /path/to/my-agent-code --data-dir /path/to/my-agent-data --run

Use absent or empty, separate, non-overlapping directories. Bootstrap copies the starter, uses the CLI's current Python environment, prepares the React UI, downloads Playwright Chromium and launches a local desktop window. Model login is a separate step; see First application for credentials, a first reply, instruction changes and resuming the same conversation.

The starter includes shell/browser tools with the configured account's real permissions. It is not a sandbox. Keep its listener on loopback and private data outside source control.

Compose an application

This is a declaration, not a running server. It gives one recipe shell tools, a durable registry and artifact presentation. There is no compulsory persona or UI:

from the_framework import AgentSpec, Application
from the_framework.plugins.artifacts import ARTIFACTS
from the_framework.plugins.bash import BASH
from the_framework.plugins.registry import REGISTRY

application = Application(
    name="Workbench",
    version="0.1.0",
    agents=(AgentSpec(
        name="assistant",
        instructions="Inspect existing files before editing; verify changes with tests.",
        configuration={"model": "your-supported-model"},
    ),),
    plugins=(BASH, REGISTRY, ARTIFACTS),
    surfaces=(),  # explicitly headless; omit to use editable ui/ beside the app module
)
plan = application.compile()  # validates composition; starts no workers or services

A host calls application.build(...) with the importable application reference, storage paths and access policy, then runs the returned ASGI app. Each independent conversation has one writer worker and a canonical Session. Plugins may add worker tools, scoped server services/routes and private agents. Application specifies assembly; Hosting specifies process and bridge boundaries.

Choose a working path

Task Starting point
Run, authenticate and customize the desktop starter First application
Run a real model/tool turn without a server Executable agent example
Build a feature with storage, HTTP, tools and live context Notebook tutorial, complete source
Look up schemas, tool results, commands, state or hooks Tools, Extensions
Build a client, integrate voice or operate deployments Documentation index
Understand data/process ownership and restart limits Architecture, Continuity
Work on the library itself Development

Documentation describes this checkout, not every published wheel. See CHANGELOG for releases, security for hosting boundaries and MIT license for reuse terms.

Metadata

Release files for b4pt0r-the-framework 0.3.3

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

Source distribution (sdist)

Source distribution for b4pt0r-the-framework 0.3.3
File Size Uploaded Provenance Actions
b4pt0r_the_framework-0.3.3.tar.gz 665.5 kB Without provenance Details for b4pt0r_the_framework-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for b4pt0r-the-framework 0.3.3
File Interpreter ABI Platform Actions
b4pt0r_the_framework-0.3.3-py3-none-any.whl Python 3 none any Details for b4pt0r_the_framework-0.3.3-py3-none-any.whl

Total release size: 1.0 MB

Release files / b4pt0r_the_framework-0.3.3.tar.gz

Download URL b4pt0r_the_framework-0.3.3.tar.gz
Size 665.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd33bb4843de362e339070aaa239e3519e66cd75c851e2742a63cc70710ac798
BLAKE2b-256 checksum
How to use checksums
12ae2cf5c53c976e8852cd63d569698b179f635ae1b973232148e63949dfefe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / b4pt0r_the_framework-0.3.3-py3-none-any.whl

Download URL b4pt0r_the_framework-0.3.3-py3-none-any.whl
Size 374.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54fe0767258fcfe4829cd357ca3cc6a3fd0a51c458a687f050e169151501d606
BLAKE2b-256 checksum
How to use checksums
eb4924351d5d971057eb235a9218ab6cfeb90d0e7da761bdd73c2871e2023643
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for b4pt0r-the-framework 0.3.3

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