Build LLM workflows like normal Python while keeping a full audit trail by default.
See the code[!WARNING] This project is currently "archived/maintained"; the main work was implemented in bub v0.4.x.
Build LLM workflows like normal Python while keeping a full audit trail by default.
Visit https://getrepublic.org for concepts, guides, and API reference.
Republic is a tape-first LLM client: messages, tool calls, tool results, errors, and usage are all recorded as structured data. You can make the workflow explicit first, then decide where intelligence should be added.
pip install republic
from __future__ import annotations
import os
from republic import LLM
api_key = os.getenv("LLM_API_KEY")
if not api_key:
raise RuntimeError("Set LLM_API_KEY before running this example.")
llm = LLM(model="openrouter:openrouter/free", api_key=api_key)
result = llm.chat("Describe Republic in one sentence.", max_tokens=48)
print(result)
Republic supports:
api_keyapi_key={"openai": "...", "anthropic": "..."}api_key_resolverKeep the README short and move auth setup into the docs:
make check
make test
See CONTRIBUTING.md for local setup, testing, and release guidance.
This project is derived from lightning-ai/litai and inspired by pydantic/pydantic-ai; we hope you like them too.
Python
99.6%
Build LLM workflows like normal Python while keeping a full audit trail by default.
See the code[!WARNING] This project is currently "archived/maintained"; the main work was implemented in bub v0.4.x.
Build LLM workflows like normal Python while keeping a full audit trail by default.
Visit https://getrepublic.org for concepts, guides, and API reference.
Republic is a tape-first LLM client: messages, tool calls, tool results, errors, and usage are all recorded as structured data. You can make the workflow explicit first, then decide where intelligence should be added.
pip install republic
from __future__ import annotations
import os
from republic import LLM
api_key = os.getenv("LLM_API_KEY")
if not api_key:
raise RuntimeError("Set LLM_API_KEY before running this example.")
llm = LLM(model="openrouter:openrouter/free", api_key=api_key)
result = llm.chat("Describe Republic in one sentence.", max_tokens=48)
print(result)
Republic supports:
api_keyapi_key={"openai": "...", "anthropic": "..."}api_key_resolverKeep the README short and move auth setup into the docs:
make check
make test
See CONTRIBUTING.md for local setup, testing, and release guidance.
This project is derived from lightning-ai/litai and inspired by pydantic/pydantic-ai; we hope you like them too.
Python
99.6%