Skip to main content

Praxium

PyPI version Python versions CI License

Praxium is a typed, asynchronous Python framework for AI agents and graph workflows. It provides provider-neutral models and tools, deterministic routing, structured events, retries, timeouts, cancellation, and checkpoints without locking application code to one model vendor.

Praxium 0.1.x is an alpha release. Its public API is usable and tested, but may evolve before 1.0.

Installation

Install the framework from PyPI:

python -m pip install praxium

The base installation includes graphs, agents, custom tools, deterministic test models, in-memory storage, memory, and retrieval. Install only the integrations your application needs:

# OpenAI, Anthropic, Gemini, Ollama, Groq, Together, OpenRouter, Kimi,
# GLM, Hugging Face, and arbitrary OpenAI-compatible HTTP endpoints
python -m pip install "praxium[providers]"

# Amazon Bedrock
python -m pip install "praxium[aws]"

# Google Vertex AI
python -m pip install "praxium[gcp,providers]"

# Azure OpenAI with optional Microsoft Entra authentication
python -m pip install "praxium[azure]"

# All cloud-provider dependencies
python -m pip install "praxium[cloud-providers]"

# FastAPI service support
python -m pip install "praxium[api]"

Praxium requires Python 3.11 or newer.

Quick start: run a graph

This example needs no API key or model provider. Save it as quickstart.py and run python quickstart.py:

import asyncio

from praxium import GraphBuilder, NodeKind, NodeResult, Runtime, State, StatePatch


async def classify(state: State, _context: object) -> NodeResult:
    route = "warm" if float(state.data["temperature"]) >= 25 else "cold"
    return NodeResult(route=route)


async def warm(_state: State, _context: object) -> StatePatch:
    return StatePatch(values={"advice": "It is warm outside."})


async def cold(_state: State, _context: object) -> StatePatch:
    return StatePatch(values={"advice": "Bring a jacket."})


async def main() -> None:
    graph = (
        GraphBuilder("weather-advice")
        .add_node("classify", classify, kind=NodeKind.CONDITION)
        .add_node("warm", warm)
        .add_node("cold", cold)
        .add_conditional_edges("classify", {"warm": "warm", "cold": "cold"})
        .set_entrypoint("classify")
        .set_finish_point("warm")
        .set_finish_point("cold")
        .build()
    )

    result = await Runtime().run(graph, {"temperature": 29})
    print(result.state.data["advice"])
    print(result.status)


asyncio.run(main())

Output:

It is warm outside.
completed

Run an agent with a custom Python tool

Praxium converts typed Python callables into model tool definitions, validates the arguments, executes the tool, and returns its result to the model. Set OPENAI_API_KEY and PRAXIUM_MODEL to values available to your OpenAI account, then run this file:

import asyncio
import os

from praxium import Agent, AgentRunner, Model, ModelProviderRegistry, Tool
from praxium.providers import ProviderFactory


def multiply(left: int, right: int) -> int:
    """Multiply two integers."""

    return left * right


async def main() -> None:
    provider = ProviderFactory.openai()
    runner = AgentRunner(ModelProviderRegistry([provider]))

    agent = Agent(
        name="calculator",
        instructions="Use the multiplication tool for arithmetic.",
        model=Model(
            name=os.environ["PRAXIUM_MODEL"],
            provider=provider.name,
        ),
        tools=[Tool.from_callable(multiply)],
    )

    result = await runner.run(agent, "What is 37 multiplied by 19?")
    print(result.response.text_content)
    print(result.tool_results)


asyncio.run(main())

Tools are provider-neutral. The same callable and agent loop work with every adapter that supports tool calling; only the provider and model configuration change.

Model providers

Praxium does not maintain a model-name allowlist. Model.name is passed to the selected provider unchanged, so newly released, fine-tuned, namespaced, routed, quantized, and local model IDs do not require a framework update.

Provider Factory Configuration
OpenAI / GPT ProviderFactory.openai() OPENAI_API_KEY
Anthropic / Claude ProviderFactory.anthropic() ANTHROPIC_API_KEY
Google Gemini ProviderFactory.gemini() GEMINI_API_KEY
Azure OpenAI ProviderFactory.azure_openai() AZURE_OPENAI_ENDPOINT and key/token
Amazon Bedrock ProviderFactory.bedrock() Standard AWS credential chain
Google Vertex AI ProviderFactory.vertex_ai() Google Application Default Credentials
Groq ProviderFactory.groq() GROQ_API_KEY
Together AI ProviderFactory.together() TOGETHER_API_KEY
OpenRouter ProviderFactory.openrouter() OPENROUTER_API_KEY
Moonshot / Kimi ProviderFactory.kimi() MOONSHOT_API_KEY
Zhipu / GLM ProviderFactory.glm() ZHIPUAI_API_KEY
Ollama ProviderFactory.ollama() Local server; no API key by default
Hugging Face router ProviderFactory.huggingface() HF_TOKEN

For vLLM, LM Studio, LocalAI, a private gateway, or any compatible endpoint:

from praxium import Model
from praxium.providers import ProviderFactory

provider = ProviderFactory.openai_compatible(
    provider_name="private-models",
    base_url="https://models.example.com/v1",
    api_key_env="PRIVATE_MODEL_API_KEY",
)

model = Model(
    name="team/fine-tuned-model:latest",
    provider=provider.name,
)

APIs with completely different protocols can be integrated with CustomModelProvider callables or by implementing the public ModelProvider protocol. See the provider guide for authentication, streaming, structured output, embeddings, custom providers, and complete agent examples.

Core capabilities

  • Typed messages, multipart content, model requests, responses, and errors
  • Async agents with bounded model/tool loops and user-defined Python tools
  • Sequential and conditional graphs with whole-graph validation
  • Cancellation, deadlines, retries, checkpoints, suspension, and resume
  • Ordered execution events and injectable observability sinks
  • Provider-neutral streaming, structured output, tool calls, and embeddings
  • Tenant-aware in-memory storage, memory, text chunking, and hybrid retrieval
  • Plugin, middleware, multi-agent, FastAPI, and OpenAI-compatible service surfaces
  • Deterministic offline providers for tests and local development

Command line

The dependency-free CLI is installed with Praxium:

praxium --version
praxium doctor

Use praxium --help to see graph, plugin, and server commands.

Documentation

Development

Editable installs are only needed when contributing to Praxium itself:

git clone https://github.com/rebel47/Praxium.git
cd Praxium
python -m pip install -e ".[dev,api]"

ruff format --check .
ruff check .
mypy src
pytest --cov=praxium --cov-branch

See CONTRIBUTING.md and SECURITY.md before opening a pull request or reporting a vulnerability.

License

Praxium is available under the Apache License 2.0.

Release files for praxium 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 praxium 0.1.1
File Size Uploaded
praxium-0.1.1.tar.gz 106.8 kB Details

Built distribution (wheel)

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

Total release size: 191.8 kB

Release files / praxium-0.1.1.tar.gz

Download URL praxium-0.1.1.tar.gz
Size 106.8 kB
Tags Source
SHA-256 checksum
How to use checksums
884781d1b0a92fb28abae50d68435289dde821102cf1103373f5389742290326
BLAKE2b-256 checksum
How to use checksums
61b6816b8c8032e0e9ae560cf549a73d3e87f505e53016b02763ab75ab155b19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 3, 2026.

Transparency log

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

Download URL praxium-0.1.1-py3-none-any.whl
Size 85.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0f2f5dab40905c86322c8578d6bb742d9c53470010456ae87180373a366eacd
BLAKE2b-256 checksum
How to use checksums
c371dfb225563b08b926b7be0be351dee062279ac20902cfd1d41b72aa46292e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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