Pixeltable Cloud is in Limited Beta. Email contact@pixeltable.com if you are interested.
The backend agents build with
Multimodal database, orchestration, and serving in one file
Quickstart | Documentation | CLI | Cloud | Discord
Install into your agent: Agent Skill · MCP server · Cursor plugin · ChatGPT plugin
Reading this as an agent? Start at get-started.md, then skill.md and llms-full.txt.
Pixeltable is the database, orchestration, and serving layers. Images, video, audio, and documents live in tables. A transform is a computed column. An index is a declaration, and so is an HTTP route. Insert a row and everything below it runs. Object storage, a vector database, an orchestrator, and the endpoint code that copies between them collapse into one application file. That file is what a coding agent can hold: it writes the whole application at once, and you review the change in one diff instead of across four systems.
pip install 'pixeltable[serve]'
pxt init
pxt service example --out app.py
pxt schema update app.py my_app
pxt service update app.py my_app
pxt schema update creates the catalog my_app and its tables; it does not start HTTP.
pxt service update starts HTTP; it does not create tables.
Generate TypeScript types from a service's OpenAPI schema and call it from a Next.js backend using the HTTP serving guide.
pxt service example writes this application file.
import pixeltable as pxt
import pixeltable.functions as pxtf
from pixeltable.serving import FastAPIRouter
TableModel = pxt.model_base()
@pxt.udf # a Python function the columns below can call
def excerpt(text: str, n: int = 12) -> str:
return text if len(text) <= n else f'{text[:n]}...'
class Docs(TableModel, name='docs'):
id = pxt.Column(value=pxtf.uuid.uuid7(), primary_key=True) # a generated key: provided automatically on insert
title: pxt.String
body: pxt.String | None
title_upper = pxtf.string.upper(title) # an assignment: computed on insert and on update
summary = excerpt(title) # a computed column over a udf this file defines
ingest = FastAPIRouter(name='ingest')
ingest.add_insert_route( # POST /docs inserts and returns the computed columns
Docs, path='/docs', inputs=[Docs.title, Docs.body], outputs=[Docs.id, Docs.title_upper, Docs.summary]
)
ingest.add_update_route( # POST /docs/update takes id plus the new values
Docs, path='/docs/update', inputs=[Docs.title], outputs=[Docs.id, Docs.title_upper]
)
ingest.add_compute_route(Docs, path='/titles', inputs=[Docs.title], outputs=[Docs.title_upper])
The same file holds pxt.Image, pxt.Video, pxt.Audio, or pxt.Document columns, and a
computed column over one of them is another assignment:
media pipelines,
RAG. The port is assigned, so read it
back rather than hardcoding it:
URL=$(pxt service list --json | jq -r '.[0].endpoint')
curl -X POST "$URL/docs" \
-H 'Content-Type: application/json' \
-d '{"title": "Hello", "body": "world"}'
# {"id":"...","title_upper":"HELLO","summary":"Hello"}
The same file runs on Pixeltable Cloud. Sign in with pxt login. If pxt org list shows no organization, pxt org create NAME makes one and provisions its database, main. Add this entry to the project file, with your organization's name in place of org:
[[pixeltable.database]]
name = 'pxt://org:main'
pxt db update pxt://org:main
pxt schema update app.py pxt://org:main
pxt service update app.py pxt://org:main
The Cloud guide covers the first deployment step by step, API keys, secrets, and what to run after a change.
Chat agent or video search
uvx pixeltable-new copies one app from the starter kit. The default copy is a chat app; pass agent as the last argument to pxt schema update. --video copies video search; pass videointel.
uvx pixeltable-new myapp
cd myapp
uv sync
pxt schema update app.py agent
pxt service update app.py agent
Inserting into the knowledge table needs no API key. The /ask route needs ANTHROPIC_API_KEY.
To mount the routes on an existing FastAPI app, app.include_router(...). HTTP serving. To skip endpoints, run pxt schema update, insert from Python, then export_sql. Self-hosting.
Coding agents
The links above install the skill and MCP. How the skill writes app.py: AI coding agents.
npx skills add pixeltable/pixeltable-skill
The skill writes a TableModel in app.py. If the agent writes create_table in application code, names the file schema.py, or writes the removed command pxt serve, the installed skill is stale: reinstall npx skills add pixeltable/pixeltable-skill.
Notebooks and tests still use pxt.create_table(). An app puts tables in app.py and creates them with pxt schema update.
License
Apache 2.0. Contributing · Discord
Metadata
Release files for pixeltable 0.7.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pixeltable-0.7.12-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pixeltable-0.7.12-py3-none-any.whl
| Download URL | pixeltable-0.7.12-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4edff55f3476825abc2ff1e43a8453d33c013463b5d580b26b70282071d7423
|
|
BLAKE2b-256 checksum How to use checksums |
a2fddfcfd1e7c7de29c1bb16383a821b47383da394d92f38a5ebf4cf7f315db9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}
|