Skip to main content

Univer Use

LangGraph-powered agent utilities and tools for Univer spreadsheets. This library provides a ready-to-use graph entrypoint and helper tools to build agents that operate against Univer via Univer-MCP.

Features

  • LangGraph graph entrypoint: univer_use/graph.py:build_graph
  • Spreadsheet action agent with MCP tools
  • Prompt templates packaged with the library

Install

You can install this package using either name (both are the same package):

Option 1: univer-use

  • pip: pip install univer-use
  • uv: uv add univer-use
  • Poetry: poetry add univer-use

Option 2: spreadsheet-use

  • pip: pip install spreadsheet-use
  • uv: uv add spreadsheet-use
  • Poetry: poetry add spreadsheet-use

Note: Both univer-use and spreadsheet-use provide identical functionality. Choose whichever name you prefer.

Requirements

  • Python 3.11+
  • Credentials via environment or .env (python-dotenv):
    • OPENROUTER_API_KEY – API key for your OpenRouter-compatible provider
    • OPENROUTER_ENDPOINT – Base URL for the provider endpoint
    • UNIVER_API_KEY – Univer API key (if required by your MCP setup)

Quickstart

First, Initialize Univer Instance (refer to Univer-MCP for more details). You can simply use Univer-MCP Playground.

Then, run the minimal example to compile and run the graph once:

import asyncio
# Both imports work the same way:
# from spreadsheet_use import build_graph
from univer_use import build_graph

async def main():
    graph = await build_graph()
    # Provide initial state. At minimum, include a conversation_id.
    messages = [
        {
            "role": "user",
            "content": "Build a modern salary calculator.",
        }
    ]
    state = {
        "messages": messages,
        "conversation_id": "default",
    }
    result = await graph.ainvoke(state)
    print(result)


if __name__ == "__main__":
    from dotenv import load_dotenv
    load_dotenv()
    asyncio.run(main())

For more details, see examples/sheet_edit.

More examples will be added soon.

This uses the graph at univer_use/graph.py:build_graph. Set env vars in .env or your shell before running. See examples/sheet_edit/.env for an example.

Contributing

Refer to CONTRIBUTING.md for more details.

Available Make Commands Run make help to see all available commands for development.

Package Architecture

  • univer-use: The main package containing all functionality
  • spreadsheet-use: A lightweight alias package that depends on univer-use

License

MIT. See LICENSE.

Release files for univer-use 0.1.2

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

Source distribution (sdist)

Source distribution for univer-use 0.1.2
File Size Uploaded
univer_use-0.1.2.tar.gz 142.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for univer-use 0.1.2
File Interpreter ABI Platform
univer_use-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 163.0 kB

Release files / univer_use-0.1.2.tar.gz

Download URL univer_use-0.1.2.tar.gz
Size 142.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4d382aecf70840e2769f6e1b24506e2dce4749adfc7a34930d8c1e1add2c97de
BLAKE2b-256 checksum
How to use checksums
643c8d5296c3e1258151e60c22f699fdcb0f2e4c7e9c53aff65dfe58161d9a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2025.

Transparency log

Release files / univer_use-0.1.2-py3-none-any.whl

Download URL univer_use-0.1.2-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9cc5c30c32fa3c466dbb9a04c941acf5b42a284afe4bbd9da541f333ac033e7
BLAKE2b-256 checksum
How to use checksums
fc4a0f3e83db22b4162c9b8e2d7d61fcb6ca0a6c3ef3395f07c21874328a8b70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2025.

Transparency log
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