Technology · Language

Python

Python is where I prototype and where frameworks demand it: ActiveKV began in Python inside vLLM before the native port, the OAuth server is Python, and the training and evaluation harnesses are Python.

Auth and access plane · FAFOHive · ActiveKVPrototypes, integrations, measurementFastAPI · FastMCP
Prove it in Python · keep it or move it
PythonRust or C++, once the idea was proved
proportions illustrative
  • 22,000lines of Python in the OAuth authorization server
  • 11,800hand-written lines in the X module
  • 45,000lines of Python that proved ActiveKV before the native port
  • ~1 sfixed cost per speech request removed by caching voice conditioning

I use Python where integration speed and ecosystem matter.

An OAuth server for outside assistants

In the Auth and access plane I needed commercial AI assistants, including Copilot Studio, to authenticate to my private tool estate, and a FastAPI service was the fastest way to speak OAuth correctly. See The hardening fix that locked everyone out.

assistants that registered themselves

CJconsent

grants a person approved

Every grant also carries PKCE, refresh and revocation, published signing keys and the discovery documents MCP clients look for; vendors that cache their client identity get a profile of their own.

Platform clients with their own safety

In FAFOHive agents needed social platforms the hosted vendor could not reach, and I chose Python on the FastMCP framework for speed against the platforms' APIs. The X module is the largest, the Facebook module about 4,500 lines, and a Reddit module is small. The tool explorer that treats tool descriptions as untrusted input is Python too. The gateway these modules sit behind is told in Agents with real tools and no keys.

A day's budget · illustrativeCalls, spaced by the rate limiter
  • Every action, into a durable SQLite ledgerkept
  • An outcome left uncertain by a crashnever resent

Integration around Rust services

In Helix Python handles integration around Rust services. The Teams working service, a FastAPI work service on PostgreSQL with a host launcher and a worker runtime, lets a Teams user hand work to coding agents on machines that accept no inbound connections, with idempotent submissions and start claims. The speech-synthesis server is a FastAPI streaming wrapper around an open text-to-speech model.

BeforeAfter
Proportions illustrative.

A prototype kept as the parity reference

In ActiveKV a Python extension inside vLLM proved the design, and I then had it ported to C++: Rewriting an engine extension without changing a token. The tooling that drives the benchmark matrix, samples host and GPU load and generates comparison tables is still Python.

The native C++ engine
The Python product, kept unwired as the reference

Numerical checks before a kernel

In the Capabilities model Python carries the work around the model: evaluation probes, baseline sweeps, recall analysis and the numerical checks behind the CUDA decoder.

Layout ALayout BLayout CkeptLayout D
Illustrative proportions. The kernel was written only for the layout that matched; a wrong one is found in minutes of Python.

Tooling beside Rust runtimes

In AgentOS the runtime is Rust and Python is tooling: programs that inventory and check the workflow rules, and a snapshot emitter for the operator console. In FAFO Core and Function Forge the first version was a Python FastAPI dispatch service that pushed embedding, local-model and cluster-health jobs to workers over Redis; it proved the idea, could not carry the load, and was re-engineered in Rust. Earlier Python policy validators were ported into the Rust runtime, wire-compatible with what they replaced, and the research pipeline, four generations of Python, became typed Rust functions on the substrate. A Python script still regenerates the build registry behind link-time function registration.

Python FastAPI dispatchRust substrate
Illustrative. The dark line is the load the substrate had to carry.

Components that must be long-lived, concurrent and governed move to Rust once the Python prototype has proved the idea.