Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Ordin

Ordin 是模型中立、单进程生命周期的 Python Agent 编排库。平台先持久化 UserMessage,再把 ExecutionRequest 交给一个 Ordin 对象;根主控和开发者 Agent 都使用同一个公共 Agent 类型和同一个 AgentLifecycle。未设置 custom logic 时,它们共享默认的 Context/模型/Tool/Artifact 多轮循环。

根 Agent 可以通过受控 Tool 创建 Task DAG、选择已注册 Agent 与模型、并发执行子 Agent、等待首个或 全部结果,并在检查和取消旧执行后原子修订 Plan。Provider、Store、ObjectStore 和注册表由 Ordin 持有,不进入 Agent 定义。

安装

pip install ordin

最小示例

from ordin import Agent, Ordin
from ordin.common import Identity
from ordin.llm import LLMCallPipeline, LLMProfile
from ordin.observability import EventBroker
from ordin.testing import InMemoryObjectStore, InMemoryOrdinBackend

backend = InMemoryOrdinBackend()
events = EventBroker(backend)
model = LLMCallPipeline(
    provider=my_llm_provider,
    recorder=backend,
    event_sink=events,
).bind(LLMProfile(id="private-model"))

ordin = Ordin(
    root_agent=Agent[None](
        name="root",
        instructions="Answer directly or create bounded child Agents when useful.",
        model=model.id,
    ),
    models=(model,),
    backend=backend,
    object_store=InMemoryObjectStore(),
    events=events,
)

ordin.register(
    Agent[None](
        name="research",
        description="Produce bounded research evidence.",
        instructions="Complete only the current Task.",
        model=model.id,
    )
)

request = await backend.prepare_execution(
    "分析这个问题",
    identity=Identity(user_id="u-1"),
)
result = await ordin.execute(request, context=None)

完整离线示例见 examples/direct.py、 examples/mission.py 和 examples/custom_agent.py;运行中取消与原子修订见 examples/plan_revision.py。

文档

开发校验

uv sync
uv run python scripts/docs.py --check
uv run pytest tests/test_docs.py
uv run ruff format .
uv run ruff check .
uv run ty check
uv run pytest

Metadata

Release files for ordin 0.1.1.dev1635051000000009001

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

Source distribution (sdist)

Source distribution for ordin 0.1.1.dev1635051000000009001
File Size Uploaded Provenance Actions
ordin-0.1.1.dev1635051000000009001.tar.gz 283.5 kB With provenance Details for ordin-0.1.1.dev1635051000000009001.tar.gz

Built distribution (wheel)

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

Total release size: 423.4 kB

Release files / ordin-0.1.1.dev1635051000000009001.tar.gz

Download URL ordin-0.1.1.dev1635051000000009001.tar.gz
Size 283.5 kB
Tags Source
SHA-256 checksum
How to use checksums
41b659edb50b8b33b3b7a057c6e1eec8e9c0c3542c50ecf6d310f916bd21497d
BLAKE2b-256 checksum
How to use checksums
7a4b597aabf0249f46ae2793f0253d289137bcadf82b4b8555263e18c35900d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Nov 2, 2026.

Transparency log

Release files / ordin-0.1.1.dev1635051000000009001-py3-none-any.whl

Download URL ordin-0.1.1.dev1635051000000009001-py3-none-any.whl
Size 139.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10142b16313152aa6d6440242d211e3a91f30016ab9e78c47e7d63196183260a
BLAKE2b-256 checksum
How to use checksums
043e14952f2575d6b28a4142b4bd569212db19238eac7e0478a4215d56fd19ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Nov 2, 2026.

Transparency log

Security for ordin 0.1.1.dev1635051000000009001

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ordin-0.1.1.dev1635051000000009001.tar.gz

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 Nov 2, 2026.

Transparency log

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