GuidesCassandra and Keyspaces
An AI agent for Cassandra that stays inside the partition.
Cassandra punishes the query a model would naturally write: a scan across every partition. DeepORG compiles the agent’s questions into CQL that respects your primary keys, and refuses the shapes Cassandra cannot serve well instead of running them slowly.
The short version
What you get on Cassandra.
- CQL-native queries. A read pins the full partition key and filters clustering columns in key order, so Cassandra serves it from the partitions you named.
- Writes by primary key. Insert, update and delete one table’s rows by their full primary key.
- Joins by partition key. A nested selection is fetched by the child table’s full partition key, in bounded batches. Subscriptions poll a partition-bound query and report what changed.
- Refusals that say why. A query Cassandra cannot serve fails with the reason, such as which partition-key column is not pinned, so the agent can correct it rather than guess.
Connect
Cassandra or Amazon Keyspaces.
curl -fsSL https://deeporg.io/install.sh | bash# config/dev.yml: Apache Cassandra
database:
type: cassandra
connection_string: cassandra://10.0.0.1,10.0.0.2
dbname: shop # the keyspace
user: ${CASSANDRA_USER}
password: ${CASSANDRA_PASSWORD}
consistency: LOCAL_QUORUM # the defaultAmazon Keyspaces needs TLS on port 9142 and service-specific credentials. Its certificate authority is already in the system trust store:
# config/dev.yml: Amazon Keyspaces
database:
type: cassandra
host: cassandra.us-east-1.amazonaws.com
port: 9142
dbname: shop
user: ${KEYSPACES_USER}
password: ${KEYSPACES_PASSWORD}
enable_tls: true
consistency: LOCAL_QUORUMdeeporg serveYour AI client
Add it to Claude Code or Codex.
claude mcp add deeporg -- deeporg mcp --path /absolute/path/to/config
codex mcp add deeporg -- deeporg mcp --path /absolute/path/to/configYour client’s model does the reasoning; DeepORG supplies the catalog, checks each query and runs it.
Limits
What Cassandra does not do, on purpose.
These are outside the query surface because Cassandra cannot serve them without a full scan:
- No aggregates. Sums, counts and group-by belong in a warehouse or an operational SQL database.
- No full scans. A read that does not pin the whole partition key is refused, not run across the cluster. A known-small table can opt in with
cassandra: { allow_filtering: true }. - No
or,notor pattern matching. A CQLWHEREis a conjunction of key conditions, so these are refused even on an opted-in table. - No full-text or geo search. Use a search index or a database that has one.
The test suite runs against Cassandra 5.
Go deeper
Related pages.
- Snowflake AI agent: the warehouse side of the pairing.
- Multiple databases: one query across several databases.
- Database support: every dialect side by side.