Catalog PyPI
Back to packageRELEASE DETAILS

0.41.0

PyPI

actant

Temporal-native runtime for persistent agents with durable inboxes, governed tools, and replay

agentsllmorchestrationtemporalworkflow
Published19 Oct 2026
Direct dependencies19
Transitive dependenciesNot calculated

README

Version 0.41.0 documentation

Actant

Actant is a durable Python agent runtime built on Temporal. Define agents and tools normally; Actant handles parallel tools, human approval, deferred work, subagents, suspension, and crash-safe continuation.

Actant is pre-1.0. Public APIs may change.

https://github.com/user-attachments/assets/021014df-4af6-47fe-8da9-cd6221008604

Why Actant

Agent tools become a distributed-systems problem when calls run in parallel, wait for people, or outlive a worker. Actant handles that orchestration:

  • allowed tools execute concurrently;
  • deferred tools pause without holding a worker;
  • the next model turn waits for the complete tool group;
  • approvals and nested-agent waits surface through the same API;
  • Temporal recovers execution after process or worker failure;
  • projection stores keep state easy for APIs and UIs to read.
flowchart TB
    Turn["One agent turn emits A, B, and C"]
    A["A: execute → completed"]
    B["B: wait ··· human approves → completed"]
    C["C: execute → completed"]
    Barrier["Durable tool-group barrier"]
    Next["Next agent turn"]

    Turn --> A & B & C
    A --> Barrier
    B --> Barrier
    C --> Barrier
    Barrier --> Next

Read Why Actant? for the detailed guarantees and framework comparison.

Install

pip install actant
pip install "actant[openai]"     # optional provider
pip install "actant[anthropic]"  # optional provider
pip install "actant[gemini]"     # optional provider

Start a local Temporal development server:

actant server start

The server stays attached so its logs and lifecycle remain visible. Pass --detach only when you intentionally want it to run in the background.

Quickstart

This complete example hosts a worker, submits a message, and reads the persisted reply:

import asyncio
from contextlib import suppress
from uuid import uuid4

from temporalio.client import Client
from actant import AgentDefinition
from actant.llm.providers.fake import FakeLLM, FakeResponse
from actant.runtime import AgentRuntime
from actant.runtime.stores import InMemoryRuntimeStores
from actant.tools import ToolRegistry

agent = AgentDefinition(
    id="assistant",
    name="Assistant",
    persona="You are useful.",
    llm=FakeLLM([FakeResponse(text="Hello from Actant.", text_chunks=["Hello ", "from Actant."])]),
    tools=ToolRegistry([]),
)


async def resolve_agent(agent_id: str, thread_id: str) -> AgentDefinition:
    if agent_id != agent.id:
        raise KeyError(agent_id)
    return agent


async def main() -> None:
    client = await Client.connect("localhost:7233")
    runtime = AgentRuntime(
        client=client, stores=InMemoryRuntimeStores(), resolve_agent=resolve_agent
    )
    polling = asyncio.create_task(runtime.run_worker())
    try:
        thread = runtime.thread(agent.id, uuid4())
        workflow_id = await thread.send("hello")
        await client.get_workflow_handle(workflow_id).result()
        print((await thread.messages())[-1].content)
    finally:
        polling.cancel()
        with suppress(asyncio.CancelledError):
            await polling


asyncio.run(main())
# Hello from Actant.

thread.send() durably submits work and returns immediately. thread.events() provides typed live deltas and lifecycle events; thread.messages() provides the persisted reload path. Custom hooks and listeners remain available for advanced worker-side callbacks.

The runtime has three write-side entry points:

thread = runtime.thread(agent.id, uuid4())
await thread.send("Start")
await thread.resolve(tool_call_id, approved=True)
await thread.cancel()

The equivalent runtime-level methods remain available when an application already carries agent_id and thread_id separately. A thread handle also exposes state(), messages(), waiting_tools(), and typed live events().

Use OpenAIProvider, AnthropicProvider, GeminiProvider, or QwenProvider in place of FakeLLM. Actant never chooses a model ID for you.

Tools and approvals

Annotated functions become tools directly:

from actant import tool


@tool
async def weather(city: str) -> dict[str, str]:
    """Get the current weather for a city."""
    return {"city": city, "forecast": "sunny"}


@tool(approval="Publish {title}?")
async def publish(title: str) -> dict[str, str]:
    """Publish an update."""
    return {"published": title}

Register them with ToolRegistry([weather, publish]). Actant derives the JSON schema from annotations. Approval tools enter the same durable AWAIT_HUMAN state as advanced deferred tools and execute only after thread.resolve(..., approved=True).

Demo

The included FastAPI + React viewer demonstrates streaming, approvals, multiple-choice questions, mixed parallel tools, and nested subagents without an API key:

just demo-sync
just demo

Open http://localhost:5173.

Documentation

Development

just sync
just test
just lint
just typecheck
just package

The justfile is repository-only. Installed users receive the actant CLI; run actant server --help for local Temporal commands.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 26

Native requirements
19 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.0runtime
sqlalchemy
Environment
{
  "extras": "asyncio",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
sqlalchemy[asyncio]>=2.0runtime
temporalio
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
temporalio>=1.8runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"anthropic\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.40; extra == "anthropic"runtime
alembic
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
alembic>=1.16; extra == "dev"runtime
asyncpg
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
asyncpg>=0.30; extra == "dev"runtime
awscrt
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
awscrt>=0.27; extra == "dev"runtime
boto3
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
boto3>=1.35; extra == "dev"runtime
pillow
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pillow>=10.1; extra == "dev"runtime
pre-commit
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pre-commit>=4.0; extra == "dev"runtime
psycopg2-binary
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
psycopg2-binary>=2.9; extra == "dev"runtime
pyright
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pyright>=1.1; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.24; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.0; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.8; extra == "dev"runtime
google-genai
Environment
{
  "extras": "",
  "marker": "extra == \"gemini\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
google-genai>=1.0; extra == "gemini"runtime
pillow
Environment
{
  "extras": "",
  "marker": "extra == \"images\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pillow>=10.1; extra == "images"runtime
modal
Environment
{
  "extras": "",
  "marker": "extra == \"modal\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
modal<2,>=1.5.5; extra == "modal"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"openai\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.60; extra == "openai"runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"providers\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.40; extra == "providers"runtime
google-genai
Environment
{
  "extras": "",
  "marker": "extra == \"providers\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
google-genai>=1.0; extra == "providers"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"providers\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.60; extra == "providers"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"qwen\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.60; extra == "qwen"runtime
awscrt
Environment
{
  "extras": "",
  "marker": "extra == \"s3\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
awscrt>=0.27; extra == "s3"runtime
boto3
Environment
{
  "extras": "",
  "marker": "extra == \"s3\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
boto3>=1.35; extra == "s3"runtime

Distribution files

2 collected
actant-0.41.0-py3-none-any.whl

bdist_wheel · 204.54 KB · Python py3

Source file
actant-0.41.0.tar.gz

sdist · 328.48 KB · Python source

Source file

Repository

PENDING
johnathanchiu/actant

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:29 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:c77714f1e3c451d960ceac3123f6ce07443c8ca723d5b2f8a28b48ecdeee6b9c

Other collected versions

View all collected versions →