Skip to main content

Motus

License Release Python Slack

Higher capability. Lower cost. Faster agents.
Self-managed or cloud deployment, agent serving in one command. Same code, any scale.

LithosAI · Cloud · Docs · Quickstart · Examples · Contributing · Slack

About

Motus is an open-source agent serving project that enables higher capability, lower cost, and faster agents. As building agents has never been easier, Motus takes a no-framework approach and provides the infrastructure needed for efficient agent serving. Deploy simply across self-managed and cloud environments at any scale.

Use with your coding agent

The fastest way to get started is to let your coding agent handle building, serving, and deploying with Motus.

Motus works out of the box with any coding agent (e.g., Claude Code, Codex, or Cursor). Install the plugin and CLI with one command:

curl -fsSL https://www.lithosai.com/motus/install.sh | sh

Then use it directly in your workflow:

/motus                          # activate Motus skills

build your agent                # start building your agent

/motus serve                    # serve locally

/motus deploy                   # deploy to the cloud

See plugins/motus/README.md for marketplace installs and more details.

Serve & deploy any agent

Install Motus to serve agents locally and deploy them to Motus Cloud. Motus supports agents built with:

  • Motus
  • OpenAI Agents SDK
  • Anthropic SDK
  • Google ADK
  • Plain Python

Install Motus in your project

Using uv:

uv add lithosai-motus

Or with pip:

pip install lithosai-motus

Serve locally and deploy to the cloud

# Serve locally
motus serve start myapp:agent --port 8000

# Chat with your local agent
motus serve chat http://localhost:8000 "Hello!"

# Deploy to Motus Cloud
motus deploy --name myapp myapp:agent

# Chat with your deployed agent
motus serve chat https://myapp.lithosai.com "Hello!"

Build with Motus

Motus is powered by a serving runtime that automatically converts Python code into parallel, resilient workflows. Everything is designed to be simple, intuitive, and customizable.

Build an agent

from motus.agent import ReActAgent
from motus.models import OpenAIChatClient
from motus.runtime import resolve
from motus.tools import tool

@tool  # define a simple tool
async def search(query: str) -> str:
    """Search the web for information."""
    return f"Results for: {query}"

# define a ReAct agent
agent = ReActAgent(client=OpenAIChatClient(), model_name="gpt-4o", tools=[search])
print(resolve(agent("Hello World!")))

Start simple, and explore the agents documentation for more advanced usage.

Build a workflow

Example: fetch an article, summarize it, extract hashtags in parallel, then publish:

from motus.runtime import resolve
from motus.runtime.agent_task import agent_task

@agent_task # wrap functions as tasks in your workflow
async def summarize(article): ... # just a normal function

@agent_task
async def extract(article): ... # extract hashtags

@agent_task(retries=3, timeout=10.0) # augment tasks with retries and timeouts
async def fetch(url): ...

@agent_task
async def publish(summary, hashtags): ... # publish on LinkedIn

# Your logic becomes your code directly:
article = fetch("https://www.lithosai.com")
summary = summarize(article)            # Motus infers the dependency graph from data flow.
hashtags = extract(article)             # Both depend on `article`, run in parallel.
post = publish(summary, hashtags)       # Waits for both upstream tasks.

print(resolve(post)) # get final result

No explicit DAGs, just Python. Motus leverages @agent_task decorators to turn Python functions into asynchronous tasks. Motus sits under your agents, providing scheduling, parallelism, caching, resilience, observability, and tracing. Learn more about the Motus runtime.

Examples

Run the included examples:

# Basic ReAct agent — interactive console chat
uv run python examples/agent.py

# Task graph demo — parallelism, dependency tracking, multi-return
uv run python examples/runtime/task_graph_demo.py

Learn more from our comprehensive examples.

Motus features

Start simple

Agents ReActAgent runs the reasoning loop, tool dispatch, and conversation state. Multi-turn memory, structured output via Pydantic, and input/output guardrails. All built in. A working agent in under 10 lines.
Tools Write a function, get a tool. Expose class methods with @tools, wrap an MCP server with get_mcp(), nest another agent with as_tool(), or run untrusted code in a Docker sandbox. Everything composes through the same tools=[...] interface. Built-in utilities: skills, bash, file ops, glob / grep, todo tracking.
Task-graph runtime @agent_task turns any function into a node in a dependency graph with automatic parallel execution, multi-return futures, non-blocking operators. Retries, timeouts, and backoff are declarative on the task and overridable per call site with .policy().
Observability & debugging Every LLM call, tool invocation, and task dependency traced automatically. Interactive HTML viewer, Jaeger export, or cloud dashboard. Enabled with one env var.
Multi-provider models Unified client for OpenAI, Anthropic, Gemini, and OpenRouter. Switch providers by changing one line, agent logic stays the same. Local models (Ollama, vLLM, SGLang) work through base_url.
Local serving motus serve exposes any agent as a session-based HTTP API locally. Test the full serving stack before deploying to the cloud.

Go deeper

Memory Provided memory solutions: basic (append-only), compact (auto-summarizes when token budget runs thin). Session save/restore built in.
Guardrails Input and output validation on both agents and individual tools. Declare the parameters you care about — return a dict to modify, raise to block. Structured output guardrails match fields on Pydantic models.
Multi-agent composition agent.as_tool() wraps any agent as a tool. The supervisor doesn't know whether it's calling a function or another agent — the interface is identical. fork() creates independent conversation branches.
MCP integration Connect any MCP-compatible server with get_mcp(). Local via stdio, remote via HTTP, or inside a Docker container. Filter and rename tools with prefix, blocklist, and guardrails.
Docker sandboxes Run untrusted code in isolated containers. Mount volumes, expose ports, execute shell and Python — attach to any agent as a tool provider.
Prompt caching Prompt caching via CachePolicy — STATIC (system + tools) or AUTO (+ conversation prefix). Reduce latency and cost on long conversations.
SDK compatibility Drop-in for OpenAI Agents SDK, Anthropic SDK, and Google ADK. Change the import, keep your code.
Human-in-the-loop Built-in support for interactive approval, clarification, and feedback during agent execution. Pause the agent, ask for human input, and resume. Works in both local serving and cloud deployment.

Contributing

See the Contributing Guide to get started, or come say hi on Slack. Let's build together!

License

Apache 2.0 — see LICENSE.

Metadata

Release files for lithosai-motus 0.4.3

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

Source distribution (sdist)

Source distribution for lithosai-motus 0.4.3
File Size Uploaded Provenance Actions
lithosai_motus-0.4.3.tar.gz 228.6 kB Without provenance Details for lithosai_motus-0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lithosai-motus 0.4.3
File Interpreter ABI Platform Actions
lithosai_motus-0.4.3-py3-none-any.whl Python 3 none any Details for lithosai_motus-0.4.3-py3-none-any.whl

Total release size: 502.9 kB

Release files / lithosai_motus-0.4.3.tar.gz

Download URL lithosai_motus-0.4.3.tar.gz
Size 228.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b1f50bf3ef750b45c6db96d056c4f44b30a2b90aad073e72860f19bb56b8b096
BLAKE2b-256 checksum
How to use checksums
b7d060e0bb55eb28345c0ccd3d67b5a4d6eab510ecf7b800b50fd16db773d109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lithosai_motus-0.4.3-py3-none-any.whl

Download URL lithosai_motus-0.4.3-py3-none-any.whl
Size 274.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f25da6b203ad494138fa441b326f5471c37c6affda9d4d790a42ae3d617e0ea3
BLAKE2b-256 checksum
How to use checksums
3b49fb27fd82cc5ccb7192a73f2c4a7909f5542ee4d18bd7adec5dbfe0134a33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lithosai-motus 0.4.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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