lovia
A lightweight, elegant, provider-neutral Agent framework for Python.

About
lovia is an Agent framework for Python that keeps the core small while letting you add capabilities only when your app needs them. It is built around one Agent, typed Tools, and a clear run loop, with optional support for streaming, persistence, context management, plugins, a Workspace, a Web UI, and HTTP APIs. The project is provider-neutral, so you can connect the model or gateway you want instead of locking into a single stack. The docs also show runnable examples, production features like retries and budgets, and a path from quickstart to serving and testing.
What is lovia
lovia is an Agent framework for Python that emphasizes a small core and optional extensions. The site describes it as lightweight, elegant, and provider-neutral, which means the framework is designed to stay minimal at the start and expand only when the application needs more than a basic Agent. In practice, lovia centers on a single Agent abstraction, typed Tools, and a run loop that makes model turns, tool calls, retries, and failures easier to follow.
The project documentation is organized as a learning path, so you can start with the first runnable example and move outward to more advanced agent features. It also includes English and Chinese documentation, plus architecture notes for people who want to understand the internals of the Agent framework rather than just use it.
Key features
lovia focuses on practical agent-building pieces that can be mixed in gradually. The documentation highlights these parts of the Agent framework:
- One explicit run path: model turns, tool calls, retries, and failures all follow a clear loop.
- Typed events and transcript tracking: the canonical Transcript shows what happened, which is useful for debugging agent runs.
- Provider-neutral design: the core stays independent from a specific model provider or gateway.
- Optional capabilities: streaming, persistence, context management, plugins, Workspace, and Web UI are available when needed.
- Built-in production controls: retries, budgets and limits, cancellation and steering, sessions and checkpoints, and guardrails are documented.
- Serving options: the app can be served through a Web UI, Web server, or HTTP API.
- Testing and evaluation tools: the docs include Testing, Evals, and Observability for checking agent behavior.
- Runnable examples: small scripts cover hello-world usage, Tool calls, streaming, structured output, and session history.
The framework also mentions extension areas such as Skills, MCP, Todo, and Memory, all using the same plugin seam instead of separate integration systems.
How to use it
lovia is meant to be approached step by step as an Agent framework.
- Install it with
pip install lovia. - Import
Agentfromlovia. - Create an Agent with a name, instructions, and a model placeholder or connected model.
- Call
run_sync()with a prompt to get a result. - Add typed Tools when the Agent needs actions beyond text generation.
- Turn on streaming, sessions, checkpoints, plugins, or context management only after the first version works.
- Use the example scripts in the repository to learn each feature in isolation.
The docs point to a quickstart, provider setup, built-in tools, structured output, and Web UI examples, so a typical workflow is to build a basic Agent first and then layer in more of the framework as the product grows.
Who it is for
lovia is a good fit for Python developers who want an Agent framework without a heavy default stack. It is especially relevant if you want to:
- build a first Agent with typed Tools instead of wiring many integrations by hand;
- keep model providers optional and switchable;
- add persistence, memory, or context management later;
- expose an agent through a Web UI, Web server, or HTTP API;
- test, evaluate, and observe agent behavior before shipping;
- study framework internals such as the RunLoop, Transcript invariants, and architecture layout.
It also makes sense for contributors who want a codebase with documented internals and a visible module map. The repository examples are intentionally small, so they can be copied, modified, and used as a feature-by-feature learning path for the Agent framework.
What to know before you use it
lovia is not a hosted chatbot or a no-code agent builder; it is an open-source Python library you run and wire into your own application. You should expect to configure your own model provider, because the site does not name a bundled default service or claim that setup is fully automatic.
A few limits and cautions are worth noting:
- The documentation site follows the current main branch, so it may move ahead of an installed release.
- The examples are written as a learning path, not as a finished application template.
- The framework includes production features like retries and guardrails, but it does not guarantee correct answers from a model.
- The architecture notes are useful if you need to understand compaction, persistence, or transcript behavior, but they are not a substitute for application-specific testing.
- For provider-specific behavior, rate limits, or account details, you should still check the official model or gateway documentation.
If you are evaluating an Agent framework for Python, lovia gives you a compact starting point and a clear path to add capabilities over time. It is strongest when you want an Agent framework that stays small at the core, then grows into a fuller agent stack only where your product needs it. lovia is best used as a Python Agent framework for building, serving, and testing agents with your own provider setup.
FAQ
What is Lovia?
Lovia is an open-source AI agent framework for Python. It provides a lightweight core to build AI agents with typed tools, and add-ons like streaming, persistence, and a Web UI. It's provider-neutral, meaning you can use any model provider.
Is lovia free to use?
Yes, lovia is open source. The site footer shows an MIT License, and the project is distributed as a Python library rather than a paid hosted service.
How do I start using Lovia?
Install Lovia via pip: `pip install lovia`. Then create an agent with `Agent(name, instructions, model)` and call `run_sync()`. The documentation includes a quickstart guide and runnable examples.
What platform does lovia run on?
lovia runs in Python. The docs show installation with `pip install lovia`, and the project also documents serving paths like Web UI, Web server, and HTTP API.
Is Lovia free?
Yes, Lovia is completely free and open-source under the MIT License. There are no usage limits or paid tiers for the framework itself; you only pay for the underlying model APIs you choose.
Does lovia include a built-in AI model?
No, lovia is provider-neutral and does not present itself as a bundled model host. You connect your own model or gateway through the framework.
What makes Lovia different from other agent frameworks?
Lovia focuses on a minimal, transparent core and a unified plugin model. Unlike many frameworks, it does not force heavy dependencies or rewrite conversation history—instead, it compacts context while keeping the full transcript intact for debugging and audit.
What can I build with this agent framework?
You can build agents with typed tools, streaming output, structured output, sessions, persistence, and optional UI or API serving. The examples cover each of those pieces separately.
Can I add a chat interface to my Lovia agent?
Yes, Lovia provides an optional Web UI and an HTTP API. You can quickly serve an agent as a chat application or integrate it into your own frontend.
Is lovia better for beginners or contributors?
It works for both, but it is especially useful for developers who want to learn an Agent framework through small runnable examples or who want to inspect the architecture and internals.