Skip to main content

ARP LLM (arp-llm)

Shared helper for calling LLM providers across the ARP/JARVIS stack.

This package provides:

  • ChatModel.response(...) (chat/text + optional JSON Schema structured output)
  • Embedder.embed(...) (embeddings)
  • load_chat_model_from_env(...) / load_embedder_from_env(...) profile-based configuration

Install

pip install arp-llm

Quickstart (OpenAI default)

export ARP_LLM_API_KEY=...
export ARP_LLM_CHAT_MODEL=gpt-4.1-mini
# Optional (OpenAI is the default profile):
# export ARP_LLM_PROFILE=openai
import asyncio

from arp_llm import Message, load_chat_model_from_env

async def main() -> None:
    model = load_chat_model_from_env()
    resp = await model.response([Message.user("hello")])
    print(resp.text)

asyncio.run(main())

Dev mock (optional; no network)

export ARP_LLM_PROFILE=dev-mock
# Optional: provide deterministic fixtures
# export ARP_LLM_DEV_MOCK_FIXTURES_PATH=./fixtures.json

Configuration (OpenAI)

# ARP_LLM_PROFILE=openai is optional (default)
export ARP_LLM_API_KEY=...
export ARP_LLM_CHAT_MODEL=gpt-4.1-mini
# Optional overrides:
export ARP_LLM_BASE_URL=https://api.openai.com

API

  • ChatModel.response(messages, *, response_schema=None, temperature=None, timeout_seconds=None, metadata=None) -> Response
    • If response_schema is provided, Response.parsed will be a JSON-like dict.
  • Embedder.embed(texts, *, timeout_seconds=None, metadata=None) -> EmbeddingResponse

Direct construction (advanced)

The load_*_from_env*() helpers are optional. For multi-provider routing/fallback inside a single process, construct provider clients directly (and route per call), for example:

from arp_llm.providers.openai import OpenAIChatModel

model = OpenAIChatModel(model="gpt-4.1-mini", api_key="...", base_url="https://api.openai.com")

See https://github.com/AgentRuntimeProtocol/BusinessDocs/blob/main/Business_Docs/JARVIS/LLMProvider/HLD.md and https://github.com/AgentRuntimeProtocol/BusinessDocs/blob/main/Business_Docs/JARVIS/LLMProvider/LLD.md for the design intent.

Release files for arp-llm 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 arp-llm 0.1.1
File Size Uploaded
arp_llm-0.1.1.tar.gz 13.3 kB Details

Built distribution (wheel)

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

Total release size:24.9 kB

Release files / arp_llm-0.1.1.tar.gz

Download URL arp_llm-0.1.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c337872af07a4a2560c2b7f3eefaa4a4fe54806c1405b4abfcfc88c1a436676
BLAKE2b-256 checksum
How to use checksums
2369cf350eeebce88f327d3796ca10de8ff8db09d9c15263025549778f4d2a50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Dec 31, 2025.

Transparency log

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

Download URL arp_llm-0.1.1-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
000876e0a35901592748b45df6d4da42a80a760a815b2efdc6d69379a7e30cf0
BLAKE2b-256 checksum
How to use checksums
4b333ba8e31914f4a2d81c00034550b54c74a706f4ca0d86a76b109cc5ee6eb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Dec 31, 2025.

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