Univer Use: LangGraph-powered agent utilities and tools for Univer spreadsheets
Project description
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-useandspreadsheet-useprovide 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 providerOPENROUTER_ENDPOINT– Base URL for the provider endpointUNIVER_API_KEY– Univer API key (if required by your MCP setup)
Quickstart Minimal example to compile and run the graph once:
import asyncio
# Both imports work the same way:
# from univer_use import build_graph
from spreadsheet_use import build_graph
async def main():
graph = await build_graph()
# Provide initial state. At minimum, include a conversation_id.
state = {
"messages": [],
"conversation_id": "default",
}
result = await graph.ainvoke(state)
print(result)
asyncio.run(main())
Run Locally with LangGraph CLI
The repo includes a local dev config that uses the build_graph entrypoint:
langgraph dev --config examples/sheet_edit/langgraph.json --debug-port 5678 --allow-blocking
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.
Development
Setup
- Install dependencies:
uv sync
Adding Dependencies Simply use standard dependency management commands:
# Add a runtime dependency
uv add package-name
# Add a development dependency
uv add --dev package-name
Building & Testing
- Run tests:
uv run pytest -q - Build both packages:
make build-both
Available Make Commands
Run make help to see all available commands for development.
Package Architecture
univer-use: The main package containing all functionalityspreadsheet-use: A lightweight alias package that depends onuniver-use
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file univer_use-0.1.1a6.tar.gz.
File metadata
- Download URL: univer_use-0.1.1a6.tar.gz
- Upload date:
- Size: 141.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
766916f539a870593f69518bcb93875c1e64c25acec25ff16ffe58feac036d81
|
|
| MD5 |
e7de721c8e663b453ae178438db1dc15
|
|
| BLAKE2b-256 |
3a6308fc1670cdc6bc666c3b20f523d8dd74ebe27d0a38bd1a9b03d23b603f0a
|
Provenance
The following attestation bundles were made for univer_use-0.1.1a6.tar.gz:
Publisher:
release.yml on dream-num/univer-use
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
univer_use-0.1.1a6.tar.gz -
Subject digest:
766916f539a870593f69518bcb93875c1e64c25acec25ff16ffe58feac036d81 - Sigstore transparency entry: 566677020
- Sigstore integration time:
-
Permalink:
dream-num/univer-use@d5fc917de9fc40195a93a27dae6babb0e99a9b8a -
Branch / Tag:
refs/tags/v0.1.1a6 - Owner: https://github.com/dream-num
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d5fc917de9fc40195a93a27dae6babb0e99a9b8a -
Trigger Event:
push
-
Statement type:
File details
Details for the file univer_use-0.1.1a6-py3-none-any.whl.
File metadata
- Download URL: univer_use-0.1.1a6-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96f5633ca1334028b4bd99447ec79ed7ba009a68b456e3f75d8490e5d661bb09
|
|
| MD5 |
ef345043859968497b68130dec798c7c
|
|
| BLAKE2b-256 |
c5e4ce522fc1bc541f5408fa25f765e4f8d2e7bd2bdd9d8bbc7d5fd95f1ca26f
|
Provenance
The following attestation bundles were made for univer_use-0.1.1a6-py3-none-any.whl:
Publisher:
release.yml on dream-num/univer-use
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
univer_use-0.1.1a6-py3-none-any.whl -
Subject digest:
96f5633ca1334028b4bd99447ec79ed7ba009a68b456e3f75d8490e5d661bb09 - Sigstore transparency entry: 566677021
- Sigstore integration time:
-
Permalink:
dream-num/univer-use@d5fc917de9fc40195a93a27dae6babb0e99a9b8a -
Branch / Tag:
refs/tags/v0.1.1a6 - Owner: https://github.com/dream-num
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d5fc917de9fc40195a93a27dae6babb0e99a9b8a -
Trigger Event:
push
-
Statement type: