# Pixeltable for Developers

> Scoped developer context: install, schema DSL, CLI, serving, MCP, and agent tooling.
> Full product overview (class-based Quick Start): https://www.pixeltable.com/llms.txt
> Concept glossary: https://www.pixeltable.com/learn.md
> How-to guides in Python: https://www.pixeltable.com/learn/how-to.md
> Question-shaped TableModel examples: the fact sheets in https://www.pixeltable.com/llms.txt and the glossary at https://www.pixeltable.com/learn.md

## Install
- Python 3.11+: `pip install -U 'pixeltable[serve]'`
- Project root: `pxt init` (schema and service refuse a file without one)
- Starter app: `pxt service example --out app.py`
- TypeScript: generate types from your service's `/openapi.json` and call its HTTP routes from your app server. Keep `PIXELTABLE_API_KEY` out of browser code.

## Schema DSL (product path)
- `TableModel = pxt.model_base()` then `class Docs(TableModel, name='docs'):`
- Stored columns as annotations (`text: pxt.String`, `image: pxt.Image | None`)
- Computed fields as class body assignments (`summary = expr`), not annotations
- Views: `class Chunks(TableModel, name='chunks', base=Docs, iterator=...):`
- Indexes: `__indexes__ = [pxt.EmbeddingIndex(col, string_embed=...)]` (also `image_embed=` / `embedding=`)
- Apply: `pxt schema diff app.py my_app` then `pxt schema update app.py my_app`
- Drops need `--allow-destructive`; extras are `pxt schema prune app.py my_app -f`
- Same file on Cloud: with no account, `pxt new` creates a free database and a claim link for the user; in the user's account, the agent runs `pxt login` in its terminal and the user confirms the code. Then `pxt db update pxt://<org>:main --add-config-entry -f`, `pxt schema update`, and `pxt service update`. The flag writes the hosted entry, including when the project configuration is in `pyproject.toml`. Do not add it by hand.

## Cloud for agents
- Run `pxt whoami` first and use the credential it shows. With none: `pxt new` needs no account and creates a trial organization with database `main`, caches its key, and prints a claim link (deleted 48 hours after creation unless claimed; limits: https://www.pixeltable.com/new.md). Or run `pxt login` where the agent will deploy and have the user confirm its code in a browser; `pxt org list` shows organizations, and `pxt org create myorg` creates one with database `main` if needed. Use `pxt://<org>:main` for the first deployment. An API key is for automation. `PIXELTABLE_API_KEY` wins over `api_key` in `config.toml`, either key wins over the login session, and either one makes `pxt new` refuse.
- Order is required: `pxt db update pxt://<org>:main --add-config-entry -f` then `pxt schema update` then `pxt service update`. Schema first fails `404: UDF not found`. Omit `cpu` / `memory_mb` / `workers`.
- Run `pxt service list pxt://<org>:main` to find the hosted URL. Direct HTTP calls need a key from `pxt key create NAME` in `X-api-key`; keep it on the application server. A trial's services answer only its key, which `pxt new` never prints: after the claim, the user creates one.
- Hand off: send the user the service URL and, for a trial, the claim link. Whoever opens it signs in or signs up and becomes the organization's admin, with the same data, services and URLs. The Cloud dashboard has signed-in API docs on each service detail page. `pxt dashboard` binds to localhost but its Local / Cloud switcher attaches the hosted catalog. First deployment: https://docs.pixeltable.com/cloud
- Use `-f` for commands that prompt when running without a terminal. `pxt.create_table()` at import in `app.py` fails `pxt service check`. Scaffold with `pxt service example`, not `pixeltable-new`.

## Notebook / REPL API (still valid)
- Create tables: `pxt.create_table(name, {col: pxt.Image, ...})`
- Run AI on insert/change: `table.add_computed_column(out=fn(table.col))`
- Vector search: `table.add_embedding_index(col, embedding=...)` then `col.similarity(string=query)`
- Reusable queries: `@pxt.query`; custom functions: `@pxt.udf`
- Versioning: `table.history()`, `table.revert()` / `pxt revert`

## Serving
- Local or hosted: `pxt service update app.py my_app` or `pxt service update app.py pxt://<org>:main` (`FastAPIRouter` in the same file)
- `pxt service run` is local only; `pxt db update` packs hosted image and workers
- Solutions (ten primitives): https://www.pixeltable.com/solutions

## Agent & MCP tooling
- Agent Skill: `npx skills add pixeltable/pixeltable-skill`
- Agent Skill with only Python (pixeltable 0.7.17+): `pxt skills install` at the repository root copies the Skill into `.claude/skills/pixeltable` and `.agents/skills/pixeltable`; `-f` replaces a copy that differs, such as an older version
- Skill source: https://github.com/pixeltable/pixeltable-skill
- Pixeltable plugin: same repository, with client manifests for Claude, Cursor, and ChatGPT. It packages the Skill and configures no MCP server; add the hosted Cloud MCP separately.
- Claude plugin: https://claude.com/marketplace/plugins/pixeltable
- Cursor plugin: https://cursor.directory/plugins/pixeltable
- ChatGPT plugin: https://chatgpt.com/plugins/plugins_6aa9bce6481c81918d73be74740eed28
- Skills index: https://www.pixeltable.com/.well-known/agent-skills/index.json
- Onboard this agent: https://www.pixeltable.com/get-started.md
- Hosted WebMCP (read-only docs tools): https://www.pixeltable.com/mcp
- Mintlify Docs MCP (public documentation search): https://docs.pixeltable.com/mcp
- Hosted Cloud MCP (organization, database, service, table, and log tools; start databases; stop databases, restart services, and set secrets after a preview; `?read_only=true` for reads only; AuthKit consent): https://www.pixeltable.com/mcp/cloud
- Hosted Cloud MCP setup and tool scope: https://www.pixeltable.com/developers/mcp-cloud
- Cloud MCP tools: https://www.pixeltable.com/developers/mcp-cloud/tools
- Connect Cursor to Pixeltable Cloud: https://www.pixeltable.com/developers/mcp-cloud/connect-cursor
- Give Claude access to images with MCP: https://www.pixeltable.com/developers/mcp-cloud/give-claude-access-to-images
- Cloud MCP server card: https://www.pixeltable.com/.well-known/mcp/cloud/server-card.json
- MCP server card: https://www.pixeltable.com/.well-known/mcp/server-card.json
- Installable MCP (stdio; table/REPL exploration):
  - pixeltable-developer: https://github.com/pixeltable/mcp-server-pixeltable-developer
  - pixeltable-memory: https://github.com/pixeltable/pixeltable-mcp-server
- Ask endpoint (NLWeb): POST https://www.pixeltable.com/ask (10 req/min per IP)

## Authentication
- Open-source library: none required.
- Public `/ask` and `/mcp`: none required.
- Hosted `/mcp/cloud`: AuthKit OAuth with the endpoint URL as resource indicator; the token must name an organization.
- Pixeltable Cloud: API keys via `X-api-key` (dashboard); WorkOS bearer tokens for the control plane.
- Agent registration: https://www.pixeltable.com/auth.md (WorkOS AuthKit at https://signin.pixeltable.com).
- Trial organization, no account: `pxt new`, or without Python `POST https://www.pixeltable.com/api/v1/trial-orgs` with an anonymous Agent Registration token (auth.md Step 6).
- OAuth PRM: https://www.pixeltable.com/.well-known/oauth-protected-resource
- OpenAPI for public agent endpoints (`/ask`, `/mcp`, `/health`, `/api/v1/trial-orgs`): https://www.pixeltable.com/openapi.json
- A public Pixeltable Cloud REST API (orgs/tables/billing) is not published yet.

## References
- Documentation: https://docs.pixeltable.com/
- API reference: https://docs.pixeltable.com/sdk/latest/pixeltable
- HTTP serving: https://docs.pixeltable.com/howto/deployment/serving
- Full site as text: https://www.pixeltable.com/llms-full.txt
- Full docs as text: https://docs.pixeltable.com/llms-full.txt
- Architecture for agents: https://github.com/pixeltable/pixeltable/blob/main/AGENTS.md
- GitHub: https://github.com/pixeltable/pixeltable
- How-to guides in Python: https://www.pixeltable.com/learn/how-to.md
- Examples by task: https://www.pixeltable.com/examples.md
- Reference architectures: https://www.pixeltable.com/reference-architecture.md
- Industry pages: https://www.pixeltable.com/industries.md
- Research (coding-agent stack picks, LLM vector-database answers): https://www.pixeltable.com/research.md
- Benchmark methods: https://www.pixeltable.com/benchmarks.md
- Best multimodal data platforms (2026): https://www.pixeltable.com/learn/best-multimodal-data-platforms.md
- Vector database alternatives: https://www.pixeltable.com/learn/vector-database-alternatives-for-multimodal-apps.md
- Best multimodal AI databases for 2027: https://www.pixeltable.com/learn/best-multimodal-ai-databases.md
- Best vector databases for images and video (2027): https://www.pixeltable.com/learn/best-vector-databases-for-images-and-video.md
- Best tools to build multimodal RAG in 2027: https://www.pixeltable.com/learn/best-multimodal-rag-tools.md
- Best Python stack for multimodal AI apps in 2027: https://www.pixeltable.com/learn/best-python-stack-for-multimodal-ai-apps.md
- Best Pinecone alternatives: https://www.pixeltable.com/learn/best-pinecone-alternatives.md
- Best LanceDB alternatives: https://www.pixeltable.com/learn/best-lancedb-alternatives.md
- Best Weaviate alternatives: https://www.pixeltable.com/learn/best-weaviate-alternatives.md
- Best Twelve Labs alternatives: https://www.pixeltable.com/learn/best-twelve-labs-alternatives.md
- Best FiftyOne alternatives: https://www.pixeltable.com/learn/best-fiftyone-alternatives.md
- Best Unstructured alternatives: https://www.pixeltable.com/learn/best-unstructured-alternatives.md
- Mem0 vs Letta vs Zep: https://www.pixeltable.com/learn/mem0-vs-letta-vs-zep.md
- Real-time AI avatar APIs compared: https://www.pixeltable.com/learn/real-time-ai-avatar-apis-compared.md
- How do I turn a script into a talking-head video with an API?: https://www.pixeltable.com/learn/how-to/build-a-talking-head-video-pipeline.md
- How do I give a real-time AI avatar memory of past conversations?: https://www.pixeltable.com/learn/how-to/give-an-ai-avatar-memory.md
- How do I build a company knowledge base for AI from docs, Slack, meeting recordings and videos?: https://www.pixeltable.com/learn/how-to/build-a-multimodal-knowledge-base.md
- Ray Data vs Daft vs Spark: https://www.pixeltable.com/learn/ray-data-vs-daft-vs-spark.md
- DVC vs lakeFS vs Delta Lake: https://www.pixeltable.com/learn/dvc-vs-lakefs-vs-delta-lake.md
- WhisperX vs faster-whisper vs a hosted speech API: https://www.pixeltable.com/learn/whisperx-vs-faster-whisper-vs-hosted-api.md
- pgvector vs Qdrant vs LanceDB: https://www.pixeltable.com/learn/pgvector-vs-qdrant-vs-lancedb.md
- Do I need a vector database if I use Postgres?: https://www.pixeltable.com/learn/do-i-need-a-vector-database-if-i-use-postgres.md
- How do agent memory systems decide what to forget?: https://www.pixeltable.com/learn/how-do-agent-memory-systems-decide-what-to-forget.md
- What is AI ETL?: https://www.pixeltable.com/learn/what-is-ai-etl.md
- How to run LLM calls over millions of rows: https://www.pixeltable.com/learn/how-to-run-llm-calls-over-millions-of-rows.md
- Pixeltable vs Twelve Labs: https://www.pixeltable.com/compare/pixeltable-vs-twelve-labs.md
- Mixpeek alternatives: Pixeltable vs Mixpeek: https://www.pixeltable.com/compare/pixeltable-vs-mixpeek.md
- Pixeltable vs Weaviate: https://www.pixeltable.com/compare/pixeltable-vs-weaviate.md
- Pixeltable vs Daft: https://www.pixeltable.com/compare/pixeltable-vs-daft.md
- Databricks vs Pixeltable for multimodal AI apps: https://www.pixeltable.com/compare/pixeltable-vs-databricks.md
- Pixeltable vs Airflow: https://www.pixeltable.com/compare/pixeltable-vs-airflow.md
- Pixeltable vs Railway: https://www.pixeltable.com/compare/pixeltable-vs-railway.md
- Pixeltable vs Render: https://www.pixeltable.com/compare/pixeltable-vs-render.md
- Pixeltable vs Fly.io: https://www.pixeltable.com/compare/pixeltable-vs-fly.md
