Backend for AI agents
One Python file: the database, the orchestration, and the serving. The agent writes app.py. You review one diff.
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.
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 pxt
import pixeltable.functions as pxtf
from pixeltable.serving import FastAPIRouter
TableModel = pxt.model_base()
@pxt.udf
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)
title: pxt.String
body: pxt.String | None
title_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 local commands. Do not also run pxt service example, which would replace it.
Local first. Cloud is the same file.
Local needs no account. Replace myorg with your organization slug before the Cloud commands.
Local
No Cloud account. No card. The agent writes the file and applies it.
pip install 'pixeltable[serve]'
pxt init
pxt schema update app.py my_app
pxt service update app.py my_appCloud
Put this in pixeltable.toml. Replace myorg with the organization slug. If pxt init wrote pyproject.toml, use [[tool.pixeltable.database]] there instead. pxt login for an account you have. pxt new for one hosted database with no account; claim it within 72 hours. That is one Pixeltable database, not a catalog of other vendors. An API key is optional for the CLI and required for hosted HTTP. pxt service run is local only.
[[pixeltable.database]]
name = 'pxt://myorg:main'pxt db update pxt://myorg:main
pxt schema update app.py pxt://myorg:main
pxt service update app.py pxt://myorg:mainWhat is actually in the file
Cohesivity’s catalog is the right tool when the app is CRUD plus auth plus hosting.
- Media and computed columnsImages, video, audio, and documents are columns. A transform is an assignment. Insert runs it.
- Embedding indexThe index is a declaration on the column. You do not add a second vector database to keep in sync.
- HTTP from the same fileFastAPIRouter declares insert, update, and query routes. pxt service update starts them.
- Coding-agent installSkill, 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 runs pxt schema update and pxt 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 new is also a 72-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. EmbeddingIndex lives 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, then pxt schema update and pxt service update on the app.py above. A signed-in organization uses pxt login. pxt new creates one hosted database with no account; claim it within 72 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 run is local only.
Declare the file. Apply it. Insert a row.
pip install 'pixeltable[serve]'. Same file locally and on Cloud.