Skip to content

lovia

lovia is a lightweight Python agent framework. Start with one Agent and a few lines of Python; add tools, streaming, persistence, a workspace, or a web UI only when you need them.

pip install lovia

Configure an endpoint in Quickstart: configure a model, then replace <model> below with a model name exposed by that endpoint.

from lovia import Agent

agent = Agent(
    name="assistant",
    instructions="Answer clearly and concretely.",
    model="<model>",
)

print(agent.run_sync("Why is the sky blue?").output)

Complete your first run → Open the Web UI →

Start from your goal

I want to… Start with Then explore
Run my first agent Quickstart Core concepts
Connect a model or gateway Configure a model Providers & models
Let the model call code Tools Built-in tools
Read files or run commands Workspace Tool approvals
Preserve conversations or resume work Sessions & checkpoints Context management
Compose multiple agents Multi-agent Plugins
Build a chat application Web UI Web server · HTTP API
Test agent behavior Testing Evals · Observability

lovia's tradeoffs

  • The core depends only on httpx, pydantic, and pyyaml; integrations are optional.
  • Agent holds configuration only; the run loop owns mutable state for each run.
  • Context compaction changes the model view, not this run's transcript; configured limits may still truncate oversized Tool output.
  • Skills, MCP, Todo, Memory, and custom capabilities share the plugin extension point.

Learn from examples

The examples are ordered by difficulty and run independently:

Version

This site follows main and may be newer than your installed package. Run python -c "import lovia; print(lovia.__version__)" to check your local version.

Read the architecture notes before changing framework internals.

中文文档:docs/zh