Upgrade from 0.x to 1.0
In shortMigration guide from 10xgraph 0.10, 10xgraph-api 0.9 and 10xgraph-client 0.6 to 1.0, with every breaking change grouped by package and what to do about it.
- 30 min read
- 11 sections
- Updated
- v1.0.0
- Markdown
1.0 is the release where the public API becomes stable: it does not break before 2.0 (see Stability). The core
(10xgraph) and the API server (10xgraph-api) contain breaking changes, most of them
secure-by-default behaviour that now refuses what used to be allowed. The TypeScript client
(10xgraph-client) has one breaking change (Node.js 20 or later) and a few behaviour changes. Work through the sections for the packages you run before
upgrading a deployment.
This page covers 0.10.x (core), 0.9.x (API) and 0.6.x (client). If you are on 0.8 or earlier, read Upgrade to 0.9 first.
Install 1.0
pip install -U 10xgraph 10xgraph-api
npm install 10xgraph-client10xgraph-api 1.0 requires 10xgraph 1.0.
Versioning from 1.0
major.minoris identical across10xgraph,10xgraph-apiand10xgraph-client.10xgraph1.1.x works with10xgraph-api1.1.x and10xgraph-client1.1.x.- Patch numbers are independent. A patch is only a bug or security fix.
- A new feature means all three packages release the next
X.Y.0together. - A public API is removed only in a major release, after at least one minor of deprecation.
Auth, roles and reach
These changes replace the authorization notes in the sections below. Read them if you set authorization in 10xgraph.json, wrote an AuthorizationBackend, or put an authz block in config. The full guide is Authentication and authorization.
- The top-level
authorizationkey is removed, and so areAuthorizationBackend, its built-in backends and thegraph_introspectionsetting. A config that still has theauthorizationkey refuses to start, with a pointer toauth.roles. Roles, claims and tenant settings now live in theauthobject."auth": "jwt"alone still works: every caller gets the default permission set and reachown. - One class. Subclass
BaseAuth.authenticatereturns the claims; the optionalauthorize(identity, permission, resource=None)defaults to the built-in role-based check and takes no request, so background jobs can call it. - The
config["authz"]block is replaced byconfig["user"], anIdentity(user_id,tenant,roles,permissions,reach,claims) or a dict that validates into one. Direct SDK callers keep passing a dict. Replacehas_scope(config, ...)withcan(config, ...)andget_authz(config)withget_identity(config), both fromtenxgraph.core.authz. - Isolation scopes are replaced by reach:
own,tenantorall. Reach is required on every role and is never a fallback. It widens reads, lists and deletes only; runs and writes to state and messages always stay on the caller’s own threads, admins included. - Permission names changed.
checkpointer:read,checkpointer:writeandcheckpointer:deleteare nowthreads:read,threads:writeandthreads:delete.checkpointer:importandPOST /v1/threads/{thread_id}/messagesare gone.graph_introspectionis now plaingraph:read. New:tasks:trigger,tasks:read,tasks:cancelandadmin:read,admin:write. Wildcards areresource:*and*. Tokenscopeandscopesclaims only narrow what a caller holds. - A thread, message, memory, file or run that the caller’s reach does not cover answers 404, not 403. The ownership resolver, its cache and its tombstones are removed; every storage query is scoped instead. A 403 now means the caller lacks the permission. Update tests and clients that expect 403 for another user’s thread, or for an id the server did not issue.
- Reserved column names:
user_id,kind,tenant,roles,permissions,reachandclaimscannot be tenant or extra column names. - New:
GET /v1/mereturnsuser_id,tenant,roles,permissionsandreachfor the caller.
Postgres memory, tenant columns and safer scopes
Read them if you use stores, PgCheckpointer or RAGAgent. The isolation scope and AuthorizationBackend notes in this section are replaced by Auth, roles and reach.
-
Mem0Storeand themem0extra are removed, with no stub. Move toPgVectorStore(pip install "10xgraph[pgvector]") orQdrantStore. Memories saved in Mem0 are not migrated; re-store the ones you need. See How to use PgVectorStore. -
BaseStore.asearchandsearchdefaultretrieval_strategyanddistance_metrictoNone, meaning the store’s configured value. A custom store must acceptNonefor both.QdrantStore.asearchraisesValueErrorfor a strategy other thanSIMILARITYand for a distance metric different from the store’s; both used to be ignored. -
An unknown or missing reach raises
ValueErrorin every storage call, and a tenant reach on a backend without tenant columns raises too. Nothing widens silently. See Auth, roles and reach. -
PgCheckpointerschema version 6 adds only the tenant and extra columns you declare tothreads. With nothing declared it changes nothing. See Database migration. -
New and optional:
tenant_columns,extra_columnsandrow_level_securityonPgCheckpointerandPgVectorStore;GET /v1/threads?filters=;BaseCheckpointer.aget_thread_scope();compile(allow_tenant_mismatch=True). With tenant columns declared,compile()refuses a checkpointer and store whose tenant columns differ whenMODE=production(GRAPH_TENANT_001). Threads and memories written before a tenant column existed holdNULLthere and are hidden from scopes that pick it until you backfill them. -
RAGAgentforwards onlyconfig["user"]to the store, pinned to the knowledge base’s owner with reachown, so a caller with a wider reach cannot widen a knowledge-base search. -
Search defaults on the REST API:
POST /v1/store/searchretrieval_strategyanddistance_metricdefault tonull, so the store’s own settings apply (they were forced tosimilarity/cosine). -
Setup on live tables:
PgCheckpointerandPgVectorStoretakeddl_lock_timeout(default 10 seconds). Setup skips DDL already in place, builds indexes on tables in useCONCURRENTLY, and raisesSetupLockTimeoutErrorinstead of hanging behind an open transaction. See Multi-tenant data. -
Row-level security needs a full rollout. With
row_level_security=True(FORCE), old pods that set no settings see zero rows. Enable it with all pods on the new version, not pod by pod. -
Zero vectors with
COSINE: a write raisesValueError; a zero query vector searches byTEXTunderon_embedding_error="fallback". -
Custom auth paths:
"auth": {"method": "custom", "path": ...}acceptsauth_app:Cls,auth_app.py:Cls,pkg.mod:Clsandpkg/mod.py:Cls.
Deprecations and planned removals
PgVectorStore.adrop_legacy_key_index()and the legacy key index handling are transitional and deprecated. Setup keeps the pre-tenant<table>_key_uqindex next to the new<table>_kuq_<hash>index when you add tenant columns, and a keyed write that hits it raisesValueError. Both will be removed in 2.0; after that, setup replaces the old index directly. Until then, run the rollout in Multi-tenant data.- The
agentflowimport alias,agentflowCLI command andAgentFlow*client aliases are removed in 2.0.
Shared state: the cache store
The API’s shared state (run locks and caps, idempotency, token revocation
and rate limiting) now lives behind one class, BaseCacheStore, configured by one cache_store
object in 10xgraph.json: type (memory, redis or custom), url, path, rate_limit and
token_revocation. The old extension points are removed with no aliases. A top-level redis,
rate_limit or token_revocation key, or a removed value, stops the server at load with an
error that says where the setting goes.
| Old | New |
|---|---|
ConcurrencyLimiter (and its Redis and memory variants) |
BaseCacheStore; the run lock, run caps, WebSocket caps and idempotency use its timed slots. Nothing to configure. |
TokenRevocationBackend (with its in-memory and Redis variants) and build_token_revocation |
BaseCacheStore. Revocations are kept in the cache store. |
BaseRateLimitBackend, MemoryRateLimitBackend, RedisRateLimitBackend |
BaseCacheStore. Rate limiting takes timed slots from the cache store. |
Top-level rate_limit |
cache_store.rate_limit |
Top-level token_revocation, or "token_revocation": "redis", "memory" or "module:attr" |
cache_store.token_revocation: true, or {"enabled": true, "token_lifetime": <seconds>, "user_ttl": <seconds>}. user_ttl defaults to 30 days; null keeps entries forever. |
rate_limit.backend (memory, redis, custom) |
cache_store.type (memory, redis, custom). With custom, set cache_store.path. |
rate_limit.redis (url, prefix) and top-level "redis": "${REDIS_URL}" |
cache_store.type redis and, optionally, cache_store.url. Empty url reads REDIS_URL. |
Top-level "cache_store": "module:attr" |
"cache_store": {"type": "custom", "path": "module:attr"} |
REDIS_URL alone selecting Redis |
Set "cache_store": {"type": "redis"}. REDIS_URL alone no longer selects it. |
Other changes:
BaseCheckpointer.aping()is now abstract (core). A custom checkpointer must implementasync def aping(self) -> None: return when its backends are reachable and usable, raise when they are not. Keep it read-only and cheap, because the server calls it on/health/readyand at startup. An in-process checkpointer just returns. A checkpointer without it raisesTypeErrorwhen created.InMemoryCheckpointer,SqliteCheckpointerandPgCheckpointerimplement it.PgCheckpointer.aping()never creates the schema.- Choosing the cache store. Only
cache_store.typepicks it:memory(the default),redisorcustom. The server logs one INFO line at boot that names the store and the config key it came from. Valkey, Dragonfly and KeyDB work through the Redis URL. - The startup check and
/health/readyonly callaping(). The cache store stops the boot, and fails readiness, only when a fail-closed feature uses it:cache_store.token_revocationis on, orcache_store.rate_limitis on withfail_openset tofalse. Otherwise an unreachable cache store logs one WARNING and the server starts. A leftoverREDIS_URLno longer blocks boot for a setup that needs no Redis. The/health/readykeys arecheckpointer,storeandcache; the keyredisis gone. Update probes or monitors that read it. - Failure behaviour. Run locks, caps and idempotency fail open. Token
revocation fails closed (503). Rate limiting follows
cache_store.rate_limit.fail_open(defaulttrue;falseanswers 503RATE_LIMIT_UNAVAILABLEwithRetry-After: 5). - Rate-limit counters reset once. The Redis keys moved to the
10xgraph:ratelimit2namespace. Other Redis key layouts are unchanged, so a rolling deploy shares locks between old and new pods. - An in-memory cache store with token revocation warns. In production, or with
WEB_CONCURRENCYabove 1, the server warns that revocations only reach this process. 10xgraph revokebuilds the configured cache store the same way as the server (the--redis-urloverride stays) and refuses with a clear error when it isInMemoryCacheStore.10xgraph initasks only the agent name, setup and AI provider. Full writes"auth": "jwt","id_generator": "uuid"and"cache_store": {"type": "redis", "rate_limit": {...}, "token_revocation": true}(nourl: Redis readsREDIS_URL). Quick Start writes nocache_store. The flags--auth,--cache-store,--rate-limit,--token-revocationand--websocketoverride parts of it.- New keys.
id_generator(uuid,hex,short,int,bigint,timestamp,snowflakeormodule:attr) andthread_name_generator(random,first_message,noneormodule:attr). Withthread_name_generatorunset, new threads are saved without a name; setrandomorfirst_messageto name them. See the configuration reference.
Migration steps:
- Move
rate_limitandtoken_revocationinsidecache_store, replacetoken_revocationstrings withtrueor an object, and deleterate_limit.backendandrate_limit.redis. - Replace the top-level
rediskey with"cache_store": {"type": "redis"}(addurlto use a different Redis thanREDIS_URL) if you ran with more than one worker. - Implement
aping()on any custom checkpointer. Port a custom rate-limit or revocation backend toBaseCacheStore; see Bring your own backend. - Update monitors that read
checks.redisfrom/health/readyto readchecks.cache.
Core (10xgraph)
OpenAI
Agentuses the OpenAI Responses API by default.api_styledefaults to"responses"(it was"chat"). Whenbase_urlis set and you do not passapi_style, it stays"chat". Passapi_style="chat"to keep the old behaviour.output_schemanow goes throughresponses.parseon the Responses style, and on Chat Completionsreasoning_effortis sent only if you setreasoning_configyourself. With abase_urlandapi_style="responses", a server that rejects the Responses API is probed once and the Agent then stays on Chat Completions.- Default reasoning is each provider’s lowest effort.
reasoning_configleft unset or set toTrueused to mean{"effort": "medium"}(Googlethinking_budget=8192). It now resolves per request to OpenAI"minimal", Anthropic"low"and Google"low"(thinking_budget=512); the values are inDEFAULT_REASONING_EFFORT_BY_PROVIDER. Pass{"effort": "medium"}to keep the old depth.NoneorFalsestill turns reasoning off. - Claude reasoning is readable by default. With
reasoning_configunset orTrue, Anthropic requests sendthinking={"type": "adaptive", "display": "summarized"}, because current Claude models otherwise return thinking blocks with an empty summary. An explicitreasoning_configdict sendsdisplayonly when it has adisplaykey, and athinkingpassed to the Agent is used as given. - OpenAI Responses asks for a reasoning summary and retries models without reasoning. With
reasoning on and no
summaryset, the request sendssummary: "auto". If the reasoning came from the default and the model answers 400 naming the reasoning parameter (for examplegpt-4o), the call is retried once without it. An explicitreasoning_configdict is never dropped. With a custombase_url, only 404, 405 and 501 switch the Agent to Chat Completions; other errors are raised. - The
openaiextra isopenai>=1.93.1,<4. openai 3.x uses httpx2, so anhttp_clientpassed throughllm_kwargsmust be anhttpx2.AsyncClientthere.
Removed APIs
- The graph-level memory API is gone (
MemoryIntegration,create_memory_preload_node,get_memory_system_prompt,memory_tool). PassAgent(memory=MemoryConfig(...)). fetch_and_cacheis gone fromtenxgraph.storage.media.temp_cache. Download throughfetch_media_urlwith aMediaFetchPolicy.- The old example folders and the
a2a_sdkexample are removed. Use the reorganisedexamples/folders.
Stores and memory
Who is affected: anyone using QdrantStore, Agent(memory=...) or RAGAgent.
- A missing or empty
user_idnow raisesValueErroron store operations. Pass a concreteuser_id, orsystem_user_id(name)for shared data. Re-index records written with an empty owner. - Memory types are strict. An unknown
memory_typeis an error instead of silentlyepisodic: the model-facing memory tools return an error before any write or search, andUserMemoryConfig/AgentMemoryConfigraise aValidationError. - Memory search no longer filters by the scope’s
memory_typeandcategoryunless the model passes them, so memories saved under another type or category are found. Preload mode follows the same rule, and with user memory on it gives the modelrememberandforget, so such an Agent needs aToolNode. RAGAgentsearches assystem_user_id("knowledge_base")unlessstore_configsetsuser_id.store_config_builderoutput must includeuser_id.- Agent memory is owned by
system_user_id(agent_id)(orapp_id), not the current user.Agent(memory=...)raisesValueErrorif agent memory is on with neither id. Memories written under a user by the old behaviour are not found, so re-store them. - A
collectionin the run config no longer overrides the memory scope’s collection. SetcollectiononUserMemoryConfigorAgentMemoryConfig. PRELOADmemories are no longer a system message. They arrive as a fenced block in the latest user message of each request and are never saved tostate.context.Agent._build_memory_promptsis replaced byAgent._build_memory_block. Update prompts or tests that look for[Long-term Memory Context].RAGAgentputs retrieved documents in a request-only block and no longer rewritesstate.context.execution_meta.internal_data["rag_docs"]and_RAG_DOCS_KEYare gone. A custom agent passed toRAGAgentmust accept the keyword-onlyrequest_blocksargument onexecute, orRAGAgentraisesTypeError.- Skill and memory text is no longer run through
str.format. Only your ownsystem_promptis interpolated, and a bad placeholder is logged instead of failing the run. extra_messagestext is now formatted likesystem_prompt.{field}placeholders are filled from state on every request, and{{/}}give literal braces. Existing extra messages that contain{{,}}or{identifier}text change. A missing field now leaves only that placeholder as written, and the other fields are still filled (a system prompt used to stay entirely unfilled). Remove any reliance on{placeholder}expansion inside skill or memory text.BaseStore.aping()is now abstract (new in 1.0). A custom store must implementasync def aping(self) -> None: return when its backend is reachable, raise when it is not. Keep it read-only and cheap, because10xgraph-apicalls it on/health/readyand at startup. An in-process store just returns. A store without it raisesTypeErrorwhen created.QdrantStore,PgVectorStoreandInMemoryStoreimplement it already.aforget_memoryappliesmemory_type,categoryandfiltersinQdrantStoreandPgVectorStore. Theqdrantextra needsqdrant-client>=1.10.0and a Qdrant server 1.10 or newer.GoogleEmbeddingsends Gemini task types.RETRIEVAL_DOCUMENTwhen storing andRETRIEVAL_QUERYwhen searching (BaseEmbedding.aembed_query, used byQdrantStore.asearch). Setdocument_task_typeandquery_task_typeto change them, orNoneto send none. Vectors stored earlier stay searchable.
Tools and handoffs
-
Tool arguments use lax coercion.
"5"for anintbecomes5, and a number for astrbecomes a string. A value that cannot convert goes back to the model as a failed tool result and the tool does not run. Unknown extra keys are ignored. -
pass_user_info_to_mcpsends the user dict as request metadata (meta), not as ausertool argument. An MCP server that read auserargument must readctx.request_context.meta. A warning is logged if the client’scall_toolhas nometaparameter. -
New
ToolNodeoptions, off by default:max_result_chars,mcp_includeandmcp_exclude.ToolNodewarns when a different callable replaces a tool of the same name, and accepts a generator of tools. -
Factory tools bind their targets at creation:
create_vertex_ai_search(datastore, model),create_google_web_search(model)andcreate_fetch_url(allowed_hosts). The allow-list is checked on every redirect hop. The module-levelfile_read,file_writeandfile_searchstill work but warn; they are removed in 2.0, so usecreate_file_tools. -
File tools: overwrite is atomic and create is exclusive. The deny list adds
.git-credentials,*.tfstate,*.tfstate.*and*.tfvars. Error text no longer leaks paths. -
PromptInjectionValidatoris less noisy and leaks less: persona patterns are upper-case only, emoji and CJK no longer trip the special-character rule, hex digests are not flagged, and keywords match whole words. Error details carrypattern_indexinstead of the regex or a sample of the input. The Full setup validator no longer blocksbypass,override,disable,tokenorfree, and its max length is 10000. -
Client-visible error text shows only the exception type for exceptions that are not 10xGraph’s own (stream
ERRORchunkreasonandstate.error). Logs keep the full text.err.contextkeeps the real values. -
@toolhas nonameargument. A tool’s name is its function name, which is whatToolNoderoutes on.@tool(name=...)and@tool("name")fail, so rename the function instead.get_tool_metadata()has nonamekey.@toolworks on bound methods. -
The
mcpextra needs fastmcp 4.1.7 and mcp 2.3 or later (was fastmcp 2.11.3 and mcp 1.30).ToolNodeitself still runs on fastmcp 3.x; onlymcp_auth=refuses it. -
A
ToolNodelists its MCP server’s tools once. The list is cached for the life of the node (mcp_cache_tools=True), which saves a connect and list call per model call. Tools you add to the server later, and tools you remove, are not seen until you callawait tool_node.refresh_mcp_tools(). If your server changes its tools while the process runs, build the node withmcp_cache_tools=Falseto list on every model call. A failed listing is never cached. -
More
ToolNodeoptions for MCP, all optional:mcp_prefix,mcp_max_result_chars,mcp_max_description_chars,mcp_cache_toolsandmcp_connect_timeout. The connect timeout defaults to 30 seconds, so an MCP server that takes longer than that to accept a connection fails the call. Passmcp_connect_timeout=Noneto wait without a limit. See Tools. -
Handoffs need a registered handoff tool. A
transfer_to_<X>call only jumps if a tool made withcreate_handoff_toolis on thatToolNode. ACommand.gototo an unknown node raisesGraphError(GRAPH_007).SwarmAgentnow enforcescan_handoff_to. -
Tools hidden by
tools_tagscan no longer be called. Add the tag or the tool if the call was intended. -
An MCP tool with the same name as a local or remote tool raises
ValueError. Rename one of them. -
Parallel tool calls are capped at 10 per turn. Set
max_parallel_tool_callsin the run config, orTENXGRAPH_MAX_PARALLEL_TOOL_CALLS, to change it. -
Unexpected tool errors no longer reach the model verbatim. The model sees
Tool '<name>' failed with an internal error (reference <ref>)and the full error is logged. To show a message to the model, return it as a string. A raisedValueErroris no longer shown. -
A tool call with invalid JSON arguments is answered with a tool error instead of running with empty arguments.
-
Tool metrics label unknown tools as
"unknown"instead of the model-invented name. -
File tools refuse secret files (
.env, keys,.ssh,.aws,.gitand similar) for any root, andfile_searchstays inside the root. Change the list withcreate_file_tools(root, deny=..., use_default_deny=False). Prefercreate_file_tools(root=...)to the run-config root, which is deprecated and will be removed in 2.0. -
fetch_urlno longer follows redirects to internal addresses or usesHTTP_PROXYandHTTPS_PROXY. Fetches that relied on a proxy or an internal redirect now fail.
Publishers and multi-agent
- Tracing sends message content and state by default. The OTEL, Phoenix, Logfire and
LangSmith publishers default to
ObservabilityLevel.FULL(wasSTANDARD). Setlevel=ObservabilityLevel.STANDARD(or"level": "standard") orSPANSto keep content out of the trace backend. - Span names follow the OTEL GenAI conventions, one trace per run. The run is
invoke_agent 10xgraph(wastenxgraph.graph), an LLM callchat {model}(wastenxgraph.llm), a tool callexecute_tool {tool}(wastenxgraph.tool), and a node span carries the node’s name (wastenxgraph.node). Update dashboards and filters that match the old names. - Background work is best-effort. Sync
invoke()andstream()wait up toshutdown_timeout(30 s) for pending events, memory writes and thread naming.ainvoke()andastream()do not wait: callawait graph.aclose()before exit. At most 1000 background tasks can be pending; beyond that new ones are dropped (WARNING at most every 5 s, counterbackground_task_manager.tasks_dropped). Delivery is at-most-once with no retry. - Sync calls inside a running event loop raise
RuntimeError.invoke(),stream(),stop()and sync checkpointer methods such asget_state()name the async method to use. Async id factories (AsyncIDGenerator) now work. - A run refused while the graph is closing sends a terminal error chunk with
data.code = "SERVICE_UNAVAILABLE"andretry_after_seconds, and nodonechunk. A WebSocket then closes with 1012. - Queued events are snapshots, so consumers see the real
STARTandPROGRESSevents. LLM failures publish anERRORevent. Kafka and Redis publishers retry after a failed first start. The optionalpublish_timeoutconfig key bounds one send and has no default. - A streaming LLM span ends when the stream ends. The
LLM_CALLENDevent is published after the last chunk, withinput_tokens,output_tokens,cache_read_tokens,cache_creation_tokens,reasoning_tokens,finish_reasonandresponse_model. A stream that fails publishesERRORinstead. The duration and token counts that tracing backends show for streaming calls now cover the whole stream, so dashboards and alerts built on those numbers will change. See LLM span events. - Large
data["state"]is replaced by a summary in published events. When the state is longer thanstate_snapshot_limitJSON characters (publisher config, default 65536), consumers get{"truncated": true, "bytes", "fields", "context_count", "context", ...}instead of the full state. A consumer that reads message text fromdata["state"]needs a higher limit, or0orNoneto turn the summary off. See Large state snapshots. RabbitMQPublisherhonorspublish_timeout, andconnection_timeout(default 10 s) now also bounds opening the channel and declaring the exchange. If a broker accepts the connection but stalls there, that publish fails after 10 seconds, the connection is closed, and the next publish starts clean.- Swarm member names match case-insensitively, and names that differ only in case raise
ValueError. SupervisorFINISHmatches only as a whole word. A RAG reranker error falls back to the retriever’s order.
Runs and resume
- Multi-agent loop limits are per turn.
max_rounds,max_iterationsandmax_attemptsreset on each new turn instead of being a lifetime budget per thread. - Resume is checked. A
resume_interrupt_idthat is not the pending interrupt’s raisesInterruptMismatchError, and a value that fails the interrupt’sresponse_schemaraisesResumeValidationError. Aresumesent to a thread that is not paused raisesNothingToResumeError(INTERRUPT_003), and a plain new message sent to a thread paused atinterrupt()raisesInterruptPendingError(INTERRUPT_004). The API answers 409 for both. - There are no default node or tool timeouts.
node_timeoutandtool_timeoutare off until you set them, and a value you set applies to both invoke and stream. Streaming runs also use the tool ledger now. - A failing eval judge is an error, not a 0.5 score. The LLM judge and
SimulationGoalsCriterionnow report an error with the real exception message when every sample fails. Reports that relied on the 0.5 placeholder will show errors until the judge model and key are fixed.aclose()stats also includecleanup_tasks. - Realtime tool calls are deduplicated per thread. A call replayed after a reconnect, or repeated by a new session on the same thread, returns the recorded result and does not run the tool again. The key is the thread id, a hash of the tool name and arguments, and the provider call id. This needs a checkpointer on the session.
GeminiLiveClientalso takesconnect_timeout(default 30 s), so a connect that hangs fails after 30 seconds. See Tool call deduplication. - New opt-in LLM limits, all off by default:
stream_idle_timeout(per agent,set_default_stream_idle_timeout()orTENXGRAPH_LLM_STREAM_IDLE_TIMEOUT; a stalled stream raisesLLMStreamIdleTimeoutError) and the cross-process cap onRetryConfig(distributed_max_concurrent_callsand related fields; it fails open with a WARNING when Redis is down). See Errors and limits. LiveAgent.arun()raisesRuntimeErrorwhen the same instance already runs a session.arealtime()runs each connection on its own copy (LiveAgent.new_session()). If you callarun()yourself, give each concurrent session its ownnew_session().- A stop request is saved as
StopRequestStatus.STOPPED. Code that checksexecution_meta.stop_current_executionforSTOP_REQUESTEDafter a stop must also acceptSTOPPED. - A cancelled or crashed run leaves a usable thread. A new message after a cut-off run starts
a new turn.
await graph.aclose(grace, stop_timeout, timeout)ends active runs in phases, and new runs raiseGraphClosedError. Nothing installs signal handlers unless you callinstall_shutdown_signals(graph). See Graceful shutdown. - A stream
after_invokecallback cannot redact output that was already streamed. What it returns is used for the saved result only. PromptInjectionValidatorbehaves differently. Non-strict mode scans only the firstmax_lengthcharacters, strict mode raises on bad base64, and text in other languages is no longer rejected.
Media and storage
- Client-supplied media URLs are fetched under a
MediaFetchPolicy: onlyhttpandhttpsto public hosts, 20 MB, 10 s, andimage/*andapplication/pdfby default. Audio and video links on Google graphs stop downloading until you allow those content types withcompile(media_policy=MediaFetchPolicy(...)). The private_convert_to_google_formatno longer downloads. - Anthropic thinking blocks are stored first in the message and replayed unchanged.
ReasoningBlockgainssignatureandredacted_data. Code that readsmessage.contentand assumed thinking could follow text now sees it first. Messages saved before 1.0 carry no signature and are not replayed to Anthropic. Other providers never receive these blocks. Message.reasoningis removed. Read theReasoningBlocks (type: "reasoning") fromcontentinstead. Converters order blocks reasoning, text, media, tool calls, in the non-stream response, in each streaming delta and in the final streamed message. A delta carries only the new piece of reasoning as a block; the final message carries the full block.PgCheckpointerschema version 5 drops the unusedreasoningcolumn of themessagestable automatically at startup. A rolling deploy that mixes old and new versions on one database is not supported across this upgrade; follow Database migration.- Cloud media stores keep a per-owner index.
GET /v1/files, per-user quotas and release on thread delete now work on S3 and GCS, but only for files stored with 1.0 or later and with an owner. A customBaseMediaStoreinheritsmodify_metadata(not atomic) andlist_keys_for_owner(built onlist_keys). A media folder shared by workers now holds a.meta.lockfile. CloudMediaStoreraisesValueErrorfor storage keys that are not 32 lowercase hex characters. Objects stored under other keys by custom code are no longer reachable through the store.- Local media and the SQLite checkpointer create owner-only files (
0o700folders,0o600files). Other OS users or services that read them lose access. Widen the mode yourself if that is intended.
Checkpointers
alist_messagesandalist_threadsraiseValueErrorfor a negativelimitoroffset, and an explicitlimitis lowered toMAX_LIST_LIMIT(1000).- Checkpointers apply the owner rule to state-cache writes, and the in-memory checkpointer returns copies of state, so mutating a loaded state no longer changes the store until you save it.
PgCheckpointerschema version 4. See Database migration.- The checkpointer’s Redis pool is capped at 50 connections and a caller past the cap waits up
to 5 s for a free one, instead of opening a new connection. Raise
max_connectionsortimeoutthroughredis_pool_configif a busy worker needs more. PgCheckpointerskips Redis for a cool-down after a connection failure. The new kwargredis_breaker_cooldown(seconds, default5.0,0disables) makes it use its Postgres fallback at once instead of waiting for the connect timeout on every Redis call. Checkpointers also gainaput_cache_value_if_absent; a custom checkpointer inherits a get-then-put fallback.- A thread stored at a node the graph no longer has fails with
StoredNodeMissingError(GRAPH_NODE_MISSING_001, API 409), naming the node and the thread. After renaming a node, addcompile(node_aliases={"old": "new"}). Stored state written by a newer version raisesStateFormatVersionError(STATE_FORMAT_001, API 500), so roll forward instead of back.
API server (10xgraph-api)
Threads and clients
runs.thread_idsdefaults to"server"(was"client"). REST and WebSocket clients that invent a thread id for a new thread now get 404 on/v1/graph/invoke,/v1/graph/stream,/v1/graph/wsand the checkpointer write routes. Omit the id on the first request and use themeta.thread_idthe server returns from then on ("new"over/v1/graph/ws), or set"runs": {"thread_ids": "client"}in10xgraph.json.- AG-UI and
/v1/graph/livefollowruns.thread_idstoo. Under the default"server", an AG-UIthreadIdthe server never issued gets 404, and a livethread_idit never issued gets an error event with codeTHREAD_NOT_FOUNDand close 1008. A blank or"new"id, or none, makes the server create the thread: AG-UI returns the id inRUN_STARTED, and live sends{"type": "session_started", "thread_id": "..."}as its first server event. Frontends that make their own ids (CopilotKit does by default) must set"runs": {"thread_ids": "client"}. The TypeScript client reads the live id intosession.threadId, which isstring | nulluntilsession_startedarrives. - Writes during a run return 409.
PUTandDELETE /v1/threads/{thread_id}/state,POST /v1/threads/{thread_id}/messages,DELETEof a thread message or a thread, andPOST /v1/graph/fixare refused at once while a run holds the thread. Retry after the run ends or stop it first. - Client dicts and lists have size caps: 1000 keys per object, 10000 items per list and
200000 values in all, beside the 64-level depth cap. A larger body gets 422. The thread id
rule now also covers the WebSocket
config.thread_id, the live init frame and the AG-UIthreadId. - Upload bodies are parsed after authentication, and an upload with no
filepart answers 422. - New opt-in settings, nothing to do unless you want them:
Idempotency-Keyon invoke, stream and AG-UI (idempotency_keyin the WebSocket run frame,IDEMPOTENCY_TTL_SECONDS),JWT_SECRET_KEYSfor key rotation andJWT_MAX_TOKEN_AGE_SECONDS. - Requests over the size limits get 422: 500 messages, 100 blocks per message, 1,000,000 characters of text. On AG-UI the limits apply to the trailing turn, with a 10,000-message cap on history.
- Assistant and system messages, and
context_summaryandexecution_meta, are rejected with 422 on the client routes. POST /v1/threads/{thread_id}/messagesis removed in 1.0. Send normal messages through invoke or stream, and use the newPUT .../messages/{message_id}for feedback.
Production startup and timeouts
- Production deployments with the default or wildcard
ALLOWED_HOSTorORIGINSrefuse to start. Set explicit values, orSTRICT_PRODUCTION_CHECKS=false. A public, token-less API that runs in production withORIGINS=*andCORS_ALLOW_CREDENTIALS=falsealso needs the opt-out. - An unknown
MODErefuses to start, including in10xgraph dev. Use one ofproduction,prod,development,dev,local(case-insensitive). Values such asstagingortestfail at startup. IS_DEBUGis removed. Debug mode followsMODE: on in development, off in production. A leftoverIS_DEBUGin the environment is ignored with a warning.- Production runs longer than 300 s are cancelled (invoke 504, stream and AG-UI error).
This is the API’s
runs.timeout, which still defaults to 300 s in production and to no limit in development. Raise it, or set it tonull. Only the core tool and node timeouts (tool_timeout,node_timeout) lost their defaults.
Startup check and rate limiter outages
- The server refuses to start while a configured backend is unreachable. At boot it pings
the checkpointer’s Postgres and Redis, the API’s Redis, the rate limiter’s own Redis and the
store, retrying for
STARTUP_CHECK_TIMEOUT_SECONDS(30), in development and production. A wrong connection string now fails the deploy. SetSTARTUP_CHECKS=falseto skip it. See the production checklist. - A rate limiter outage with
fail_open: falseanswers503RATE_LIMIT_UNAVAILABLE(withRetry-After: 5) instead of429 RATE_LIMIT_EXCEEDED. Clients that retry on 429 should retry on 503 too. See Rate limiting.
Auth and authorization
Authorization backends are replaced; see Auth, roles and reach.
- JWTs with an invalid
user_idor scope claim are refused with 401.user_idmust be a non-empty string or an integer. Null, empty, boolean, float, list and dict are rejected. Ascopeorscopesclaim that is not a string or a list of strings is rejected, so fix the issuer. A stringscopesis now split on spaces instead of matched by substring. JWT_ALGORITHMmust be on an allowlist (HS256,HS384,HS512,RS256,RS384,RS512,ES256,ES384,ES512,PS256,PS384,PS512,EdDSA).none, an empty value or any other value stops startup. Startup also stops if PyJWT is missing with"auth": "jwt", and theauthvalue must be exactly"jwt".- With
cache_store.token_revocationon, every token needs ajticlaim. A token without a usablejti(a non-empty string or an integer) answers 401INVALID_TOKEN(“Invalid token, jti missing”), also from a customBaseAuthclass. Issue tokens with ajti, or turn revocation off. BaseAuth.authenticateisasync def. A custom auth class must define it asasync def authenticate; the server awaits it.- A revoked token answers 401 with code
REVOKED_TOKEN. - A token that carries an
audclaim is refused whileJWT_AUDIENCEis unset (401INVALID_TOKEN). SetJWT_AUDIENCEto the value your tokens carry. A missing tenant claim or a__system__user id also answersINVALID_TOKEN. graph:setupis gone from the permission list. The setup endpoint no longer exists.- Graph validation errors use the code
VALIDATION_ERROR. The duplicateAGENTFLOW_VALIDATION_ERRORis gone; match onVALIDATION_ERROR. - A run that hits its recursion limit answers 422 (
GRAPH_RECURSION_LIMIT), not 500. POST /v1/graph/streamis labelledapplication/x-ndjson, nottext/event-stream. The body was always newline-delimited JSON, so a client that parsed it as NDJSON is unaffected; one that selected on the content type must change.10xgraph buildrefuses--docker-composetogether with--k8s. The combined image had no start command. Run it once for each target.- Uploads are checked against default limits: images over 50,000,000 pixels and PDFs over 10 MB or 500 pages answer 413 (
MEDIA_MAX_IMAGE_PIXELS,MEDIA_MAX_PDF_MB,MEDIA_MAX_PDF_PAGES). Per-user quotas (MEDIA_MAX_FILES_PER_USER,MEDIA_MAX_USER_STORAGE_MB) are off by default. - The generated Gunicorn command uses
TenxGraphUvicornWorker(tenxgraph_api.src.app.uvicorn_worker.TenxGraphUvicornWorker). Regenerate Docker and Kubernetes files with10xgraph build, or point your own command at it. Keep the Gunicorn--graceful-timeoutabove the sum of the threeSHUTDOWN_*_SECONDSsettings (50 s by default) and the pod grace period above that. - Nested
initial_state,configandresumedeeper than 64 levels get 422 (VALIDATION_ERROR). The limit is theMAX_NESTING_DEPTHsetting (64 by default, 1 to 900). - Keys in the request state (
initial_state) get 422 unless the server lists them inruns.state_keys. The same holds forPUT /v1/threads/{id}/stateand AG-UIstate. See Configuration. - The built-in thread name generator class is now
RandomThreadNameGenerator, replacingAIThreadNameGeneratorandDefaultThreadNameGenerator. Withthread_name_generatorunset, threads stay unnamed; any value other thannone,random,first_messageormodule:attris a config error. - Data the database cannot store answers 422
INVALID_REQUEST_DATA, not a 5xx error. This covers a NUL character, a lone surrogate and a number out of range. /health/readyanswers 503 while the server shuts down (status: draining), and while the database schema version is below what the code expects.- Thread, message and memory ids must match
^[A-Za-z0-9._:@-]{1,128}$, in the path and in the body (thread_id,config.thread_id). Anything else gets 422VALIDATION_ERROR. This breaks clients that make their own thread ids with spaces, slashes or more than 128 characters. - Shutdown is configured with
SHUTDOWN_GRACE_SECONDS(10),SHUTDOWN_STOP_SECONDS(10) andSHUTDOWN_TIMEOUT_SECONDS(30). The lifespan callsgraph.aclose()once with them; the old separate 30 second background drain is gone. A run started during shutdown gets 503SERVICE_UNAVAILABLEwithRetry-After: 5. - Thread delete can answer
success: falsewithdata.cleanup_failedwhen file or trace cleanup fails, and also releases files linked to the thread by their metadata (local and memory stores). - State-changing thread routes answer 409 while a run holds the thread (PUT and DELETE state, POST and DELETE messages, DELETE thread, POST
/v1/graph/fix). - New WARNING logs:
compile()with no checkpointer, the first run of a graph with nouser_id, and in production or withWEB_CONCURRENCYabove 1 an in-memory or SQLite checkpointer or no Redis.
Alerting
Handled client errors log one WARNING line instead of an ERROR with a traceback, and Sentry no longer sends request bodies. Alerts that matched ERROR for 4xx responses must match WARNING instead.
TypeScript client (10xgraph-client)
Node.js 18 is no longer supported: engines is node >= 20.0.0. Nothing else in the client API changes signature. Also check the server default
above: with 10xgraph-api 1.0, a client that invents a thread id for a new conversation gets
HTTP 404 on invoke(), stream() and wsStream().
- Omit
thread_idfromconfigon the first request of a conversation. - Reuse the id the server returns on every later request:
result.meta.thread_idforinvoke(),chunk.thread_idorchunk.metadata.thread_idforstream().wsStream()tracks the id for its own resume requests, but you keep it for your next call. - Operators who want the old behaviour set
"runs": {"thread_ids": "client"}in10xgraph.json.
Behaviour you may notice, none of it a signature change:
stream()andwsStream()now throw (StreamError,WebSocketError) when a stream is cut or the server closes the socket mid-run. Before, they ended as if the run had succeeded.- The
timeoutoption is an idle timeout onstream()andwsStream(): it limits how long the client waits on the network, not how long the whole run takes. - Timeout and network failures are
RequestTimeoutErrorandNetworkError, not plainError. Code that matched on message text should check the class. listMemoriestakesoffsetand returnshas_moreandnext_offset. It needs10xgraph-api1.0.
The client-side tool loop on invoke() and stream() used to lose a server-assigned thread id
on the requests that send tool results. That is fixed: the client reuses the returned id, a
thread_id you pass is never replaced, and your config object is not modified.
addThreadMessages is deprecated, and the route it calls is removed from 10xgraph-api. Use
updateThreadMessageFeedback to attach feedback to a message.
Database migration
PgCheckpointer is at schema version 6. The last step (version 6) only adds the tenant and extra columns you declare to threads. Schema version 4 changes the messages primary key to
(thread_id, message_id) and builds its index under an ACCESS EXCLUSIVE lock. aget_message and adelete_message now require thread_id in the
config, and aget_tool_result is scoped to the thread owner. The migration runs automatically
on first setup. Old and new code cannot run against the same database at the same time: once v4 has run, every message insert from a 0.10.x pod fails. Back up first:
pg_dump "$DATABASE_URL" --format=custom > 10xgraph-pre-1.0.dumpDo not roll the upgrade pod by pod. The migration runs under a Postgres advisory lock, so two new pods starting together do not collide, but a 0.10.x pod running beside a new one breaks. 10xgraph-api calls the checkpointer’s asetup() at boot, so starting a new pod runs the migration. Use this procedure:
- Stop all old (0.10.x / 0.9.x) pods.
- Start one new pod. It runs the migration at boot.
/health/readyanswers 503 while the schema version is below what the code expects, so wait until it is ready. - Start the remaining new pods.
If you do not run the API server, call await checkpointer.asetup() once instead of step 2.
The migration is not reversible. A rollback to 0.10.x needs a restore of the database from the dump taken before the migration. See backup and restore.
Dependency minimums
The extras raise these floors. A fresh install resolves them; an existing environment must be upgraded.
10xgraph:imagesneedsPillow>=13.0.0,mcpneedsmcp>=1.30.0,otelandlangsmithneedopentelemetry-api>=1.45.1andopentelemetry-sdk>=1.45.1.10xgraph-api:python-multipart>=0.0.31,starlette>=1.3.1,PyJWT>=2.15.0(thejwtextra), andopentelemetry-apiandopentelemetry-sdk>=1.45.1(theotelextra).
Verification checklist
After upgrading, before sending production traffic:
10xgraph versionreports 1.0.0 for core and the CLI.- The server starts with
MODE=productionand explicitALLOWED_HOSTandORIGINS. - A new conversation without a
thread_idsucceeds, and a client-invented id for a new thread gets 404 (unless you setruns.thread_idsto"client"). - An existing thread can still be read by its owner and is not visible to anyone else.
- Memory and store calls pass a concrete
user_idorsystem_user_id(...), and noValueErrorappears in the logs. - Handoffs, hidden tools and MCP tools behave as before. Look for
GRAPH_007and name-clashValueErrors on startup. - Alerts on 4xx responses match WARNING lines, not ERROR.