Backend for AI agents
A backend for AI agents is one Python file: tables, computed columns, and HTTP routes. The agent writes app.py, insert runs the models, you review one diff.
Install: pip install 'pixeltable[serve]'
The wall is the stitch
Cohesivity removes signups. Pixeltable removes the four systems the signup was for.
A coding agent can write the app until the app needs a database, a bucket, a vector index, an orchestrator, and the endpoint that copies between them. Each of those is a product. Cohesivity holds the provider accounts and provisions them over one HTTP API, then you claim the project. That is their page. Pixeltable collapses the stitch: object storage, a vector database, an orchestrator, and the endpoint code that copies between them become one application file. That file is what a coding agent can hold.
What the agent writes
Stored columns are annotations. Computed work is an assignment. HTTP is the same file.
import pixeltable as pxtimport pixeltable.functions as pxtffrom pixeltable.serving import FastAPIRouterTableModel = pxt.model_base()@pxt.udfdef 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)title: pxt.Stringbody: pxt.String | Nonetitle_upper = pxtf.string.upper(title)summary = excerpt(title)ingest = FastAPIRouter(name='ingest')ingest.add_insert_route(Docs,path='/docs',inputs=[Docs.title, Docs.body],outputs=[Docs.id, Docs.title_upper, Docs.summary],)ingest.add_update_route(Docs,path='/docs/update',inputs=[Docs.title],outputs=[Docs.id, Docs.title_upper],)
pxt schema update creates the tables. It does not start HTTP. pxt service update starts HTTP. It does not create tables. Write this file, then run the commands below. Do not also run pxt service example, which would replace it.
Local first. Cloud is the same file.
Local needs no account. An agent’s shell has no TTY to confirm in, so each update carries -f.
Local
No Cloud account. No card. The agent writes the file and applies it.
pip install 'pixeltable[serve]'pxt initpxt schema update app.py my_app -fpxt service update app.py my_app -f
Cloud
Add the database to pixeltable.toml, then apply the same file to it.
[[pixeltable.database]]name = 'pxt://myorg:main'
pxt db update pxt://myorg:main -fpxt schema update app.py pxt://myorg:main -fpxt service update app.py pxt://myorg:main -f
- Replace
myorgwith your organization slug. Ifpxt initwrotepyproject.toml, use[[tool.pixeltable.database]]there instead. pxt loginsigns in to an account you have.pxt newmakes one hosted database with no account; claim it within 48 hours.- Run the database first: a schema applied before it fails with
404: UDF not found. - An API key is optional for the CLI and required for hosted HTTP.
pxt service runis local only.
What is actually in the file
Cohesivity’s catalog is the right tool when the app is CRUD plus auth plus hosting.
Media and computed columns
summary = excerpt(title)Images, video, audio, and documents are columns. A transform is an assignment. Insert runs it.
Embedding index
__indexes__ = [pxt.EmbeddingIndex(title, string_embed=embed)]The index is a declaration on the column. You do not add a second vector database to keep in sync.
HTTP from the same file
ingest.add_insert_route(Docs, path='/docs')FastAPIRouterdeclares insert, update, and query routes.pxt service updatestarts them.Coding-agent install
npx skills add pixeltable/pixeltable-skillSkill, MCP, and per-agent setup for Cursor, Claude Code, Codex, and the rest. The agent writes
app.py.
Where it lines up
One page per tool, including where the other one wins.
Backend for AI agents, answered
- What is a backend for AI agents?
- A backend for AI agents is one Python file: tables, computed columns, and HTTP routes. Pixeltable is that file. The agent writes it; insert runs the models; you review one diff. Cohesivity provisions other vendors (Postgres, Redis, auth, hosting) behind one API. Use that when the app is CRUD. Use Pixeltable when the app is media, models, and retrieval.
- Can a coding agent build that backend without a dashboard?
- Yes, locally. The agent writes
app.py, then runspxt schema updateandpxt service update. No Cloud account and no dashboard. You publish the same file later if you want Pixeltable Cloud. - How is this different from Cohesivity?
- Cohesivity is one HTTP API that provisions other vendors: Postgres, Redis, object storage, hosting, social login, an inbox, and a browser. A new project is ephemeral for 72 hours, then you claim it. Pixeltable is the multimodal schema: media, models, indexes, and the route in one file.
pxt newis a 48-hour claim, and it is one Pixeltable database, not that catalog. - Do I still need Postgres, Redis, and a vector database?
- Not as the default for a multimodal app.
EmbeddingIndexlives on the column. Keep Postgres, Redis, auth, and a host when the app is CRUD plus a website. That is Cohesivity’s catalog, or the database you already run. - Do I have to sign up before the agent starts?
- No for a local file:
pip install,pxt init, thenpxt schema updateandpxt service updateon theapp.pyabove. A signed-in organization usespxt login.pxt newcreates one hosted database with no account; claim it within 48 hours. That database is still Pixeltable, not Cohesivity’s catalog. An API key is optional for the CLI and required for hosted HTTP.pxt service runis local only.