Upgrade from 1.0 to 1.1
In shortWhat a 10xgraph 1.0 and 10xgraph-api 1.0 user must know before moving to 1.1: behavior changes first, then deprecations with replacements, then new features.
- 22 min read
- 5 sections
- Updated
- v1.0.0
- Markdown
1.1 keeps the 1.0 public API (see Stability). Nothing you call is
removed in this release: things are deprecated, and they keep working until 2.0. One unfinished
batch feature, the 10xgraph revoke command and the tracing setup_* helpers are the only
exceptions, listed under Removed. Some behavior does change without a
code change on your side. Read the behavior changes first.
This page covers 10xgraph 1.0, 10xgraph-api 1.0 and 10xgraph-client 1.0. The 1.1 entries
below come from the changelogs of the three packages, which still list them as unreleased. The
client has one change: invoke() returns thread_id and run_id (see the API section).
Install 1.1
pip install -U 10xgraph 10xgraph-api10xgraph-api 1.1 requires 10xgraph 1.1. Both now require injectq >=0.7.0,<0.8.
Behavior changes
These work differently after the upgrade, with no code change. Check each one against your agent.
Core
-
State copies share
Messageobjects. The state saved at a checkpoint, theold_stateof anon_state_updatehook, each parallel tool call’s state and the statesInMemoryCheckpointerreturns own their lists and fields, but share theMessageobjects. Editing a message in place now also changes it in those copies. Replace the message instead:msg.model_copy(update=...). Appending tostate.contextor changing another field in place still never reaches a saved state. -
Cross-process stop needs the cache methods. A stop from another process is now read with
aput_cache_valueandaget_cache_value. Every built-in checkpointer has them. A custom checkpointer without them gets no cross-process stop, and a stop flag written only into the cached state is no longer read. The helperreload_stateis removed. -
Tool results are fenced. The text of every tool result (local, MCP and client tools) reaches the model inside a
<tool_output_xxxxxxxx>fence, plus one system prompt line that says the content is data. This also applies to results saved before 1.1. Stored messages, API responses, events and traces keep the plain output. The prompt cache from 1.0 misses once. Keep the 1.0 behavior withToolNode(fence_results=False). -
HAS_*flags mean installed.HAS_OPENAI,HAS_GOOGLE_GENAI,HAS_QDRANT,HAS_GOOGLE,HAS_MCPandHAS_FASTMCPnow check that the package is installed, not that it imports.from tenxgraph.core.graph import StateGraphno longer imports the provider SDKs. The module attributesgenaiand the converters’ChatCompletionare gone: patchgoogle.genaiandopenai.types.chat.ChatCompletionin tests. -
Ids.
DefaultIDGeneratorreturns a uuid4 string. An id you pass wins. Otherwise theBaseIDGeneratorbound in the container makes the id, and with none bound it is a uuid4 string.- A message id is no longer the provider’s response id. That id is in
metadata["response_id"]. - All deltas and the final message of one streamed response share one id.
PgCheckpointertakes its id column type from the generator (string by default, bigint forBigIntIDGeneratorand Snowflake).compile()and the first run raise aValueErrorwhen the generator and the checkpointer id type do not match. Setup refuses existingthreadsormessagestables whose id column type differs from the generator’s.- With a text
id_type, thread and message ids must be strings. Withintorbigintthey must be integers. A mismatch raisesValueErrorbefore any SQL.
-
One engine loop.
ainvokeandastreamrun one graph loop, and function, agent and tool nodes run through one node runner and one tool runner. The internal handler modulesinvoke_handler,invoke_node_handlerandstream_node_handlerare gone. Visible effects:- Resuming after a client tool under
ainvokereturns and saves the client’s tool result. Command(state=S)from a node makesSthe new state in both modes.- A node that returns an unsupported value fails with
NODE_001underastreamtoo. - An
on_errorcallback recovers a node only when it returns aMessage. - A node may return a
dictas a partial state update. ReturningNonemeans no change.
- Resuming after a client tool under
-
Tracing publishers write only their own keys.
OtelPublisherwrites the OTEL GenAIgen_ai.*keys and thetenxgraph.*keys (thread id, run id, user id, node, tool, usage), span names, status and errors. It no longer writes OpenInference,langsmith.*orlogfire.msgkeys.PhoenixPublisheradds the OpenInference keys (session.idis the thread id,user.id, and ametadataJSON withthread_idandrun_id).LangsmithPublisheraddslangsmith.*andLogfirePublisheraddslogfire.msg. All three takeuser_id_mode. To add the keys of another backend, subclassOtelPublisherand overridespan_attributes(role, phase, name, event, attrs). If you sent a plainOtelPublisherto Phoenix, switch toPhoenixPublisher. -
Several tracing publishers.
StateGraph(publisher=[...])andCompositePublisherstill work, but every tracing publisher creates its own span, so each span is built once per backend. For several tracing backends at once, use the APIobservabilityblock. A list orCompositePublisheris how you combine one tracing publisher with event publishers (Redis, Kafka, RabbitMQ, console). -
Fewer events, routed by publisher kind. Event consumers see a different stream, and no setting restores the old one. Each event has a tag.
allevents go to event publishers (Kafka, Redis, RabbitMQ, custom) and to tracing publishers (OTEL, Phoenix, LangSmith, Logfire).observabilityevents (node start, LLM calls, node errors) go to tracing publishers only.ConsolePublishergets every event. The domain name is inmetadata["event_name"]. A 3-node run (model, tool, model) sends event publishers 7 events instead of 48:run.started,node.completedthree times,tool.started,tool.completedandrun.completed.-
State only on run-end events.
data["state"]is onrun.completed,run.failed,run.interruptedandrun.stopped, still bounded bystate_snapshot_limit.run.startedcarries no state and no run config (metadata["config"]andmetadata["response_granularity"]are removed). -
Run-level events have an empty
node_name. The node is inmetadata["current_node"](data["interrupted_node"]for a stop).run.interruptedkeeps the interrupted node. -
Old to new.
Before Now GRAPH START run.startedGRAPH END run.completed(not sent for a paused or stopped run)GRAPH ERROR (sent more than once) run.failed, onceNODE END (twice per node) node.completed, once per node, with the node’s new messages andnext_nodeTOOL START / END / ERROR tool.started,tool.completed,tool.failedGRAPH INTERRUPTED, graph_interruptlifecycle eventrun.interrupted(interrupt before or after,interrupt(), client tools),run.stopped(stop or cancel)Crash recovery run.recovered(dead_run_id, no state)Validation rejection input.rejectedPROGRESS, GRAPH UPDATE, graph_start,graph_end,graph_error,state_update,checkpointRemoved -
Tracing. The OTEL graph span ends on every run-end event and carries
tenxgraph.graph.run_status(completed,failed,interrupted,stopped,input_rejected). An interrupted or stopped run no longer leaves it open. Thegraph.lifecycle.*,graph.checkpointandnode.state_updatespan events are gone. -
Realtime. A
LiveAgentsession sendsrun.startedandrun.completed(orrun.failedorrun.stopped) instead ofgraph_startandgraph_end. -
Tool events. END and ERROR carry
data["status"]("success"or"error") anddata["duration_ms"].ToolResultEventhas the same two fields. Each tool call sends one start and one end (or error) event, not about five. A call cancelled bytool_timeout, a stop or a shutdown now sends its ERROR event too. An MCP result withisErrorset is an error result. -
Tool event
node_nameis the graph node. The tool name, as the model called it, is indata["function_name"]. Read the tool name from there. -
Payloads are built only when a publisher is bound, and only for a tag that a bound publisher takes.
-
LLM end events are built from the converted reply. Google’s finish reason is the enum name (
STOP), and OpenAI’s isUNKNOWNwhen the provider sends none.
See Events and observability and Use publishers for the event list and fields.
-
-
Publishers batch events, always.
RabbitMQPublisher,KafkaPublisherandRedisPublisherput each event in a bounded queue, and one worker per publisher sends a batch everybatch_sizeevents (default 100) orflush_interval_ms(default 20), in order.queue_size(default 2048) bounds the queue andpublish_timeoutbounds one batch. A full queue drops the event, counts it in thetenxgraph.publish.droppedmetric and warns at most every 10 seconds.CompiledGraph.aclose(), syncinvokeandstream, and the publisher’sclose()flush the queue.publisher.publish(event)still sends one event at once. The Kafka message key is now the thread id, so one thread’s events keep their order. All three encode an event withmodel_dump_json(): the payload parses to the same value, but the bytes differ (compact separators, UTF-8 instead of\uXXXXescapes). See Use publishers and the publishers reference. -
A run saves the next node. The durable save after each step names the node that runs next. It named the node that had just finished, so a crash after that save with the Redis cache lost resumed at the finished node and ran it, and its tool calls, twice. In
astream, the state in the chunk after each step names the next node too. -
astopwrites only the stop key. It no longer copies the stop request into the cached state. A run reads the stop key. -
Closing
astreamearly saves the thread. If the consumer breaks out while a node or tool runs, the thread is saved as interrupted, like a cancel, not leftrunning. -
Other fixes you may notice.
- A node named
startorendis no longer renamed when a run resumes from a storedcurrent_node. Nodebefore_invokeandafter_invokecallbacks no longer fire for__start__and__end__. compile()withoutcallback_managergives each graph its ownCallbackManager, not one shared default.- The tool result of a handoff tool in a hand-built
StateGraphstreams as atoolchunk underastream, asainvokealready returned it. - A tool that raises a
BaseExceptionthat is not anExceptiongets a failed tool result underastreamtoo. - Gemini: non-streaming calls report tokens, response id and model. Large media uploads use the
Agent’s own client (
base_url,api_key, Vertex settings,http_client). - Claude: Haiku 4.5, Sonnet 4.5, Opus 4.5 and older models no longer get a 400 on the default
reasoning config.
temperature,top_pandtop_kare removed for Bedrock cross-region ids and Vertex ids with an@datesuffix when the model rejects them. - MCP: tool schemas from a fastmcp 4 server load, and
tools_tagsreads tags undermeta["fastmcp"]. - Realtime tool calls honour
tool_timeout, record tool metrics, and run in their own task. - Assistant messages from the OpenAI and Google converters are stamped with local time, so
PgCheckpointerno longer lists a reply before its question. - The in-memory checkpointer keeps the first of two
aput_tool_resultcalls for one tool call, and compares message ids as text.
- A node named
-
Data classes are pydantic models.
RetryConfig,MCPAuthContext,WorkerConfig,SwarmMemberConfig,MediaFetchPolicy,CallbackContext,GraphLifecycleContext,TaskMetadata,TokenUsage,ReporterOutput,NodeResponseandTempCacheEntrykeep their names, fields and defaults.CallbackContextandMCPAuthContexttake keyword arguments only. Assigning to a frozen one raisespydantic.ValidationError. Usemodel_dumpandmodel_copyinstead ofdataclasses.asdictanddataclasses.replace. -
call_llmuses the same client code asAgent. Unknown keyword arguments are dropped with a warning, not aTypeError. A Claude model withuse_vertex_ai=Truecalls Vertex. -
Checkpointers follow one contract.
InMemoryCheckpointerandSqliteCheckpointercreate the thread record on the first write.aclear_cache_valuereturnsTrueorFalse.aget_messageraisesMessageNotFoundError(anIndexErrorand aValueError).aput_messages(metadata=...)is merged into each message’s metadata everywhere.- Message and thread search match message text and
thread_nameonly, and%,_and\match literally. aput_threadraisesValueErrorwhenthread_info.thread_iddiffers fromconfig["thread_id"].PgCheckpointerreturns the caller’s threadmetadataas put. The run id is only onThreadInfo.run_id.- Every checkpointer refuses text with the NUL character or a lone surrogate with
ValueError. aclean_threadalso removes the stop request and active-run marker.
-
Stores follow one contract.
PgVectorStorewrites with an identity need a value for every tenant column the reach picks.astore(memory_id=...)with another user’s memory id raisesValueError(“not found”).QdrantStoreresultmetadatais your metadata pluscategory,memory_typeandmemory_key. Readcontent,user_id,thread_idandtimestampfrom the result fields.QdrantStore.agetraises when Qdrant fails.aget_allreturns newest first and honoursfilters.QdrantStoreandInMemoryStorerefuse afilterskey that isuser_idor a tenant column.qa.testing.InMemoryStorefollows the real stores: tests that stored memories without auser_idmust now pass one.
-
Requires injectq 0.7 in core (
>=0.7.0,<0.8).StateGraph.compile()builds the container’s resolvers, so a binding that cannot be resolved fails at compile, not in a run.TestContextrestores the previous container on exit. -
Upload names.
sanitize_filenameremoves control, zero-width and bidirectional characters and path parts. An empty or..name becomesunnamed, and leading dots are removed. -
Memory fields can collide with yours.
originandexpires_atare now fields of every memory.PgVectorStoreandQdrantStoresetup refuses anextra_columnsortenant_columnsentry with either name, so rename the column first. Callermetadatakeys namedoriginorexpires_atare dropped on new writes on every built-in store. OnPgVectorStore,filters={"origin": ...}now matches the column, not a metadata key. OnQdrantStore, an existing point whose metadata heldorigin(for example"user") now reads that value as its provenance; an unrecognized value reads as unknown. Rename such keys before you upgrade. -
PgVectorStoreschema version 3.asetup()adds two nullable columns and a partial index on its own. During a rolling deploy, 1.0 processes keep working but do not hide expired rows and do not writeorigin. See Schema version 3. -
A cross-provider fallback with
http_clientraisesValueError. An Agent withhttp_clientrefuses a(model, provider)fallback on another provider when it is built. That fallback was handed the primary’s client, built for another SDK and host, so it failed at call time or, with Google, left without mTLS. A fallback on the same provider reuses the client. Give a fallback on another provider its own client with amodel_registryentry and name it infallback_models. -
SummaryContextManager.trim_contextis async. It was a sync method wrappingasyncio.run; it is nowasync def, so call it withawait.atrim_contextstill works but is deprecated (see Deprecations).MessageContextManager.trim_contextstays sync.
API
- Privacy controls for logs, Sentry and traces.
- New env
LOG_REDACT_SECRETS(defaulttrue). The log formatter and the Sentry hooks redact tokens, JWTs, passwords, API keys, signed URL signatures and DSN passwords, also inside tracebacks.falsekeeps them for local debugging and logs one WARNING in production. Sentry now gets the same redaction as stdout. observability.user_id_mode(raw,hash,mask) now also applies to the JSON loguser_id, the auth WARNING lines and Sentryuser_id. The audit log and the event publishers keep the raw id. An unknown mode refuses to boot.- At
observability.level: spans, errors on spans carry only the exception type. - Message text (thread names, invalid tool arguments, supervisor replies, provider response
bodies) is logged only at
LOG_LEVEL=DEBUG. The INFO line for a named thread now has the id only. - Core
SecretRedactionFilterandmask_secretsalso mask DSN passwords and traceback text. - See What the framework redacts, and what is yours.
- New env
"id_generator": "uuid"maps toDefaultIDGenerator, so it stays valid and does not warn. uuid is the default, so10xgraph initProduction no longer writesid_generator.- Ids follow the id generator. New thread ids and run ids come from the generator bound in
the shared container. An id from a path, body, WebSocket frame or AG-UI message is converted to
the generator’s type:
intfor Snowflake and the other integer generators (422 on a non-numeric value),strotherwise. - A resent message is not stored twice. Invoke, stream and the WebSocket keep the client’s
message_idinmetadata["client_message_id"](the stored id is still the server’s). A user message whose id the thread already stores is a retry: if it is the latest user message and its run did not finish (failed,409 state_conflict, cancelled, stopped, crashed), the run continues from where it stopped without saving it again; if the run completed or the message is older, the request gets409MESSAGE_ALREADY_PROCESSED; a thread paused for input gets409(resume it instead). - AG-UI message ids are server ids.
POST /v1/ag-uino longer keeps the client’s message ids. The client’s id is stored inmetadata["client_message_id"], and a retry that resends it is not stored twice. - The
checkpointerkey is removed from10xgraph.json. The server never applied it. A config that sets it now refuses to start. Pass the checkpointer tograph.compile(checkpointer=...)in the agent module. - One container. The server and the worker refuse to start when the graph was built with a
different InjectQ container than the server’s. Pass the same container to
StateGraph(container=...)and toinjectq, or set neither. - Config values. Every
"module:attr"value is checked by one rule when the config is read."graph.react:"and"a:b:c"fail at once with one message, and"mod:obj.attr"works for every key. - Node names.
current_node"start"and"end"give 422unknown node. Use"__start__"and"__end__". - Public data classes are pydantic models.
AgUiConfig,MediaConfig,RateLimitConfig,TokenRevocationConfig,CacheStoreConfig,WebSocketConfig,RunsConfig,SlotResultandRateLimitDecisionkeep names, paths, fields and defaults, and now validate on construction.RateLimitDecisiontakes keywords only. - Errors and uploads.
- On invoke, an unknown model name answers 422 before the thread check.
- On invoke, a recognised database or provider error answers 422, 503 with
Retry-After, or 429, not a generic 500. - Every transport gives the same error message for the same error.
- Provider
rawpayloads andinternal_datakeys other thanerrorare removed from messages and state. - Inline media in a run is checked like an upload: quota, file signature and size limits. A refused run answers 422 on invoke and stream.
- An upload with an empty or
..name is stored asunnamed(it wasfile).
- Tracing keys on the server. With several backends enabled in the
observabilityblock (phoenix,langsmith,logfire,otlp), the server creates one span and writes the keys of every enabled backend on it.otlpalone writes the basic attributes only. The legacyOTEL_ENABLEDpath uses a plainOtelPublisher, so it no longer writes OpenInference,langsmith.*orlogfire.msgkeys. For Phoenix, use thephoenixblock ofobservability. - Invoke returns the ids.
POST /v1/graph/invokereturnsthread_idandrun_idat the top level ofdata, with the same names every stream event carries.data.meta(is_new_thread,thread_id) is unchanged. The client’sinvoke()result hasthread_id(falling back tometa.thread_idon a server older than 1.1) andrun_id. Readthread_idinstead ofmeta.thread_id. - Requires injectq
>=0.7.0,<0.8, now a direct dependency. A container workaround and thecurrent_container()helper are removed. - Trace export outages log once. When a trace backend is down (Phoenix, LangSmith, plain OTLP
over HTTP, or the legacy
OTEL_ENABLEDgRPC exporter), thetenxgraph.trace_exportlogger writes one WARNING when exports start failing and one INFO when they recover, not a line per batch. - Uploads and logs. File names and signatures are checked by core’s
sanitize_filenameandvalidate_magic_bytes, so the API and core apply one rule. Log lines escape U+2028 and U+2029. - Worker shutdown. The worker closes the same resources as the API server, in the same order (graph, lease manager, cache store, auth, telemetry).
- WebSocket container. A WebSocket connection no longer replaces an app’s own InjectQ container
with the global one, so an app on its own container keeps it on
/v1/graph/wsand/v1/graph/live. - CLI. Every command finds
10xgraph.json(oragentflow.json) in the current or nearest parent folder.10xgraph evalloads the agent as the server does.10xgraph configvalidates with the server’s rules. 10xgraph build --k8simages run one Uvicorn process. TheCMDis nowpython -m tenxgraph_api.src.app.serveinstead of Gunicorn. Regenerate the Dockerfile to pick it up. Existing images keep working.WEB_CONCURRENCYno longer applies to that image; scale with replicas. See Kubernetes.
Jobs
Changes to the worker and the scheduler. See Run background tasks with a worker for each.
-
worker.retriesmeans retries."retries": 3now gives 3 retries (4 runs). Before, it gave 2, and"retries": 1never retried. Cancelled, refused, bad-argument and over-delivered runs are never retried. See Retries. -
The scheduler runs nothing at start. An
everyschedule first runs one interval after the scheduler starts, so a daily job no longer reruns at each deploy.10xgraph scheduleralso passes--send-timeout 30and refuses thememorybroker. See What runs at start. -
One scheduler, enforced by a Redis lease. A second scheduler waits as a standby and takes over when the first stops. There are at most 100 schedules per user (429 above that).
-
Schedules are strict and UTC only. Cron must have 5 fields with every value in range,
everymust be 10 seconds to one year, and a bad schedule answers 422 on create and on PATCH. Cron is always UTC, anatwith an offset is converted to UTC, and anatwithout one is UTC. Other time zones are not supported. See Time zones. -
A call that does not fit the task is 422. An unknown, missing or repeated argument answers 422 on
POST /v1/tasks/{name}(run and schedule). Before, it answered 202 and the worker failed with aTypeError. -
A result that cannot be saved is a failure. A return value that is not JSON-serialisable, or a result backend that is down, ends the task as
failurewith anerror. Before, it showedsuccesswithresult: null. The final status is written after the result is saved. -
REDIS_KEY_PREFIXnow applies to jobs keys. The stream, results, schedules and the scheduler lease get the prefix. If you set one, drain the queue and move your schedules before you deploy. Without a prefix nothing changes. See Key names. -
The worker waits like the build image.
10xgraph workerpasses--wait-tasks-timeout 600and--shutdown-timeout 60. The generated worker’s kill grace is 720 seconds (was 660). -
The Redis worker takes one message at a time, survives a Redis restart, and fails a message delivered more than
worker.broker.options.max_deliveriestimes (default 5).xread_countandunacknowledged_batch_sizeother than 1 refuse to start. -
New fields and routes.
GET /v1/tasks/{schedule_id}addsstatus(scheduledorsent) andruns(the last 20 run ids, readable and cancellable). PATCH of a sent one-time schedule answers 409. -
The worker writes the audit log, and
authorizeon/v1/tasksgets the task name as the resource. -
auth.method: jwtneeds a key at boot. With neitherJWT_SECRET_KEYnorJWT_SECRET_KEYSset, the server and the worker refuse to start. Before, they started and every request answered 500. -
A warning for memory state with a remote broker. The API and the worker log it at boot when
cache_store.typeorworker.result_backend.typeismemoryand the broker is not. -
Logging levels follow one rule; INFO is quieter. Per-node, per-tool, per-load and per-request lines moved from INFO to DEBUG. INFO now carries
Graph run startedandGraph run ended(status, steps, last node, duration), setup lines, the APIStarted:summary, shutdown and limit refusals. API run lines sayInvoke run endedorStream run endedwith status and duration at DEBUG, replacing “Graph execution completed successfully”. If you grep INFO logs for node, tool or request lines, setLOG_LEVEL=DEBUG(API) or raise the logger (for examplelogging.getLogger("tenxgraph.graph").setLevel(logging.DEBUG)). See Logs.
Deprecations
Each one still works and emits a DeprecationWarning. All are removed in 2.0.
| Deprecated | Use instead |
|---|---|
UUIDGenerator (now a subclass of DefaultIDGenerator) |
DefaultIDGenerator |
AsyncIDGenerator |
Subclass BaseIDGenerator with your own async def generate() |
BaseContextManager.atrim_context |
Call trim_context. A custom manager now implements only trim_context, sync or async |
id_type argument of PgCheckpointer |
Drop it. The id type follows the id generator |
safe_calculator |
Write your own @tool or use an MCP server |
fetch_url, create_fetch_url |
Write your own @tool or use an MCP server |
google_web_search, create_google_web_search |
Write your own @tool or use an MCP server |
vertex_ai_search, create_vertex_ai_search |
Write your own @tool or use an MCP server |
file_read, file_write, file_search, create_file_tools |
Write your own @tool or use an MCP server |
tenxgraph.storage.media.temp_cache (TemporaryMediaCache, TempCacheEntry) |
Nothing. No code writes this cache |
MultimodalConfig.image_handling, document_handling, supported_doc_types |
Remove them. No code reads them |
VADConfig.start_sensitivity, end_sensitivity, prefix_padding_ms, silence_duration_ms |
Remove them. No code reads them |
EvalConfig.mock_mode, UserSimulatorConfig.thinking_enabled |
Remove them. No code reads them |
Setting a config field above to a non-default value warns. The ImageHandling and
DocumentHandling enums stay. create_handoff_tool, is_handoff_tool,
make_agent_memory_tool and make_user_memory_tool are not deprecated.
Removed
setup_phoenix, setup_langsmith, setup_logfire, setup_otlp, setup_observability and
setup_tracing are removed without a deprecation period. Pass the publisher when you create the
graph instead: StateGraph(publisher=PhoenixPublisher(...)), or LangsmithPublisher,
LogfirePublisher or OtelPublisher. On the API server, use the observability block in
10xgraph.json.
AnthropicBatch, OpenAIBatch and BatchResult (tenxgraph.core.llm) are removed without a
deprecation period. They were standalone wrappers that no part of the graph runtime used, and
batch support will not continue. Call the provider SDK’s batch API instead:
client.messages.batches for Anthropic, client.batches for OpenAI.
10xgraph revoke is removed without a deprecation period. Revocation runs in the server, and the CLI
is not in the server’s Docker image, so the command could not reach its cache store. Token revocation
itself is unchanged. Call revoke_user or revoke_token (importable from tenxgraph_api) with the
cache store (InjectQ.get_instance().get(BaseCacheStore)) from your own code.
New features
Core
ToolDenied. Raise it from abefore_invokecallback (forInvocationType.TOOLorInvocationType.MCP) or from the tool. The tool does not run, and the model gets"Denied by policy: <tool>. <reason>". The tool event status isdenied.ToolGuard. A ready-made policy for local and MCP tools: an allow list of name patterns, required permissions per tool checked onconfig["user"], an optional argument check, andstrict=True. Client tools run in the frontend and are not covered.- Per-tool human approval.
ToolGuard(approval={"refund"})pauses the run withinterrupt()before the tool runs. Resume withTrueor{"approved": True}. It needs a checkpointer. - Tool result fencing (see behavior changes), with
ToolNode(fence_results=False)to turn it off. QdrantStore(tenant_columns=...)isolates memories by tenant, likePgVectorStore, so reachtenantnow works on Qdrant. Points written before a column was declared stay invisible to reachownandtenantuntil you backfill them.base_urlonOpenAIEmbeddingandGoogleEmbeddingfor a custom endpoint.- Gemini
http_client.Agent(provider="google", http_client=...)sends Gemini requests through your own async httpx client, on the Gemini Developer API and on Vertex AI, so a client certificate (mTLS) or a proxy works as for OpenAI and Anthropic. It must be anhttpx.AsyncClientwith google-genai 1.x and 2.x; 3.x also takes anhttpx2.AsyncClient. See Use mutual TLS. Agent(provider="google", api_key=...)is honoured. The Google client ignored it and read onlyGEMINI_API_KEYandGOOGLE_API_KEY.MessageNotFoundErrorfromtenxgraph.core.exceptions.BaseCheckpointer.declared_id_typeis what a checkpointer declares for the id type check.- Partial state updates. A node can return a
dictorCommand(update={...}): each key sets a state field, and"messages"appends. - Tool event fields
statusandduration_ms(see behavior changes). - Publish timers.
tenxgraph.publish.duration(one event send, or one batch for the Kafka, Redis and RabbitMQ publishers, with apublisherattribute),tenxgraph.publish.batches,tenxgraph.publish.eventsandpg_checkpointer.save_state_cache.duration. - Memory origin and expiry. Every memory has an
origin(user,agent,tool,system, or unknown) and an optionalexpires_at.MemoryConfig(ttl=...)expires what the model remembers;MemoryConfig(origins=list(TRUSTED_ORIGINS))turns on trusted-only retrieval, which also hides the model’s own memories. Both are off by default. Expired memories are hidden from every read, andadelete_expired()removes them. See Memory origin and expiry.
API
runs.max_recursion_limitin10xgraph.json(positive integer, default 100, editable in10xgraph config). A request’srecursion_limitabove it gets 422 naming the key. The schema no longer caps it at 100.- Tool permissions in roles and tokens. A
toolsresource takes a tool name as its action:tools:refundortools:*. A name is 1 to 128 ofA-Z a-z 0-9 _ - .. They work inauth.rolesand in apermissions_claim, and tokenscopeorscopesnarrow them.*also grantstools:*. With auth on and no roles, no tool permission is granted, so a tool behind aToolGuardrule is denied until a role or claim grants it. - Tool calls in the audit log. With
audit.enabled, each server tool call records atoolevent with actiontool:calland resultsuccess,failedordenied. AToolGuardapproval resume recordstool:approve.AuditEventgainsthread_id,run_idandtool_call_id. Tool arguments and results are never recorded. - Live tool audit uses the result event’s
statusand needs a core that sets it. - Memory provenance in the store endpoints. The server sets
origin: "user"on every memory it stores. Create and update takeexpires_at, search and list takeorigins, and responses carryoriginandexpires_at. memory_cleanupin10xgraph.json(off by default) makes10xgraph schedulerdelete expired memories on a schedule. It needs aworkerkey and a store that supports expiry. See memory_cleanup.
Performance
The changelog states these measurements:
- Importing
StateGraphtakes about 0.36 s instead of 2.0 s. - A 3-node run on a 1,000-message thread takes 18 ms instead of 374 ms with
InMemoryCheckpointer(Postgres with Redis: 234 ms instead of 352 ms). The state is no longer deep-copied at each step. - Stop checks on that run cost 0.15 ms instead of 130 ms with
InMemoryCheckpointer(Postgres with Redis: 1.7 ms instead of 49 ms), and the state is read from the cache once instead of 9 times. - With
PgCheckpointer, the run start writes its run marker and reads the saved state together (3 round trips instead of 5 for a new thread). A stop from another process is read once per step, not before and after every node. A save on an existing thread, the history prune and the messages use fewer statements. - A run writes the state cache once less per node when
durable_checkpoint_every_stepis on (the default). Paths that end the run before the per-step save (client tools, stop, interrupt, error, cancel) save on their own. - Checking a model for NUL or lone-surrogate text is about 2.5 times faster.
- A thread resume in the API reads the thread state once before the run. A stream resume read it up to four times.
- A pool that
PgCheckpointerorPgVectorStorebuilds from a DSN no longer runs asyncpg’s reset query when a connection returns to the pool (one round trip saved per release). To get it back, passpool_config={"reset": None}. See Performance tuning. 10xgraph-apinow depends onuvloopandhttptools, which Uvicorn uses by default. uvloop is skipped on Windows, Cygwin and PyPy. To opt out, setTENXGRAPH_LOOP=asyncioand/orTENXGRAPH_HTTP=h11. See Performance tuning.