Metadata-Version: 2.5
Name: semora
Version: 0.1.0
Summary: Durable multi-agent runtime for Python.
Project-URL: Homepage, https://github.com/donggyun112/semora
Project-URL: Source, https://github.com/donggyun112/semora
Project-URL: Changelog, https://github.com/donggyun112/semora/blob/main/CHANGELOG.md
Author: donggyun112
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: langchain-core<2,>=1
Requires-Dist: loguru<1,>=0.7
Requires-Dist: semora-llm==0.1.0
Requires-Dist: semora-store==0.1.0
Provides-Extra: anthropic
Requires-Dist: langchain-anthropic<2,>=1; extra == 'anthropic'
Provides-Extra: fork
Requires-Dist: semora-fork==0.1.0; extra == 'fork'
Provides-Extra: google
Requires-Dist: langchain-google-genai<5,>=4; extra == 'google'
Provides-Extra: openai
Requires-Dist: langchain-openai<2,>=1; extra == 'openai'
Provides-Extra: openrouter
Requires-Dist: langchain-openai<2,>=1; extra == 'openrouter'
Provides-Extra: permissions
Requires-Dist: semora-permissions==0.1.0; extra == 'permissions'
Provides-Extra: postgres
Requires-Dist: semora-store-pg==0.1.0; extra == 'postgres'
Provides-Extra: ui
Requires-Dist: semora-ui==0.1.0; extra == 'ui'
Provides-Extra: xai
Requires-Dist: langchain-xai<2,>=1; extra == 'xai'
Description-Content-Type: text/markdown

# semora

Durable agent runtime for Python. This is the core: contracts, control points, tool
execution, the orchestrator, the plain `async while` planner, and `AgentRuntime`.

By default `AgentRuntime` drives the planner directly — no orchestrator, no ledger:

```python
from semora import Agent, AgentRuntime, ChatModel

model = ChatModel(model="gpt-4.1")
agent = Agent("reviewer", "Reviews repositories", model, tools, system_prompt)
outcome = await AgentRuntime().run("attempt-42", agent, "inspect this repository")
```

This path cannot suspend or recover a crashed round. Attach a ledger when those
guarantees are required:

```python
from semora import AgentRuntime, MemorySteps

runtime = AgentRuntime(store=MemorySteps())
outcome = await runtime.run("attempt-42", agent, "inspect this repository")
```

Policy lives on `Controls` / `ControlPlane` (`on_inputs`, `before_model`, `pre_tool_use`,
`after_tool_call`, `before_finish`, `on_resume`, `on_suspend`). `before_finish` can refuse
an ending and send the loop around again.

`semora.builtins.builtin_tools()` supplies `read`, `write`, `edit`, `grep`, `glob`, `Bash`,
and `web_fetch`. `web_search` is not included. `Bash` stays disabled until
`ExecToolOptions.allow_list` is set. File and process effects use the `WorkspaceProvider`
injected by `AgentRuntime` (`semora.workspace`).

Install extras beside it:

| | |
|---|---|
| `semora` | the runtime, with in-memory `MemorySteps` |
| `semora[openai]` | `langchain-openai` |
| `semora[anthropic]` | `langchain-anthropic` |
| `semora[google]` | `langchain-google-genai` |
| `semora[xai]` | `langchain-xai` |
| `semora[openrouter]` | OpenAI adapter for OpenRouter |
| `semora[postgres]` | Postgres ledger (`semora_store_pg`) |
| `semora[permissions]` | permission rule table (`semora_permissions`) |
| `semora[ui]` | local console (`semora_ui`) |

See the [repository README](../../README.md) for examples.
