v1.2.22026-11-26
Features
Cancel/Steering: Reworked cancellation into a shared control plane with single-process and fork-based multi-worker support, using Unix Socket signals across workers. Added a pluggable CancelManager via setcancel_manager(), unified Status results, steering checkpoints across LlmAgent, and corrected A2A/AG-UI cancellation handling. See docs/design/03-cancel-steering.md for the design and deployment guidance. (#377)
ClaudeAgent: Added steering support while a Claude turn is running. Steering is forwarded to the CLI around tool calls, and steering that arrives after the final model call continues the run as a new loop instead of being dropped. Added the claudeagentwithsteering example. (#378)
LangGraphAgent: Added steering support and the langgraphagentwithsteering example with documentation. (#379)
Bug Fixes
* Trace: Filtered framework-internal state keys from state-change telemetry so only user-visible state updates are reported. (#376)
* A2A: Fixed remote cancellation when the client cancels after the initial Task but before the first status or artifact event by reading the task ID from the initial Task.id field. (#380)
Docs
* Added the Cancel/Steering design document, Chinese and English cancel/steering guides, and runnable examples for LlmAgent, ClaudeAgent, LangGraphAgent, A2A, AG-UI, and multi-worker deployments.
Internal
* Added regression coverage for cancel managers, cleanup, runner cancellation, and steering, and expanded multi-worker benchmark coverage.
v1.2.12026-11-06
Features
* Memory: Added TencentDBMemoryService for the TencentDB Agent Memory V3 HTTP API, with incremental conversation writes, service/team/agent/user/session isolation, and concurrent L1 atomic, L2 scenario, and L3 core recall that falls back to L0 conversation search. Added local and Tencent Cloud configuration examples and regression coverage. (#347, #355)
* Memory: Added HyMemoryService for Hy-Memory Chat, Working, and Coding memory, including incremental event storage, tool-call trace conversion, cross-session recall, request-level routing and isolation, default or agentic search, optional dependency support, and a remote BGE-M3 embedder example. (#362)
* Tools: Added ToolSearchToolSet for on-demand tool discovery and loading, with keyword and semantic retrieval, Native and Dispatch invocation, Namespace routing, Session State, permission filtering, dynamic MCP refresh and declaration cleanup, configurable validation tolerance, embedding usage reporting, and pluggable vector storage. (#368)
Model: Added normalized finishreason and provider-native finishreasonraw fields to LlmResponse for OpenAI, Anthropic, and LiteLLM responses, and included them in telemetry traces. (#370)
Benchmark: Added the trpcagent_bench framework benchmark suite, using a mock OpenAI server to measure import, construction, single- and multi-turn Agent loops, sequential and parallel tool execution, concurrency, and memory without real model latency. (#366)
Bug Fixes
Agent: Fixed failed setmodel_response schema validation being mistaken for a final structured response; validation errors now return to the model so it can retry within the configured run limits. (#369)
* Skill: Fixed quoted strings in Skill shell commands being interpreted as executable command tokens and incorrectly rejected by the command safety check. (#349)
Skill: Preserved files produced by skillexec as artifacts and added a runnable Skill execution example covering stdin and generated output. (#356)
Skill: Restored SkillToolSet.toolfilter application when tools are retrieved so request-specific tool selection remains effective. (#357)
Skill: Applied repository-provided Skill environment variables consistently to both skillrun and skill_exec, while preserving explicit and non-empty host environment precedence. (#360)
* Skill: Removed unintended quotation marks and template indentation from Skill selection and listing guidance injected into system instructions. (#367)
Docs
* Added English and Chinese guides, configuration references, and runnable examples for TencentDB Agent Memory, Hy-Memory, Tool Search, framework benchmarking, and Skill execution.
Internal
* Expanded regression coverage for memory adapters and layered recall, Tool Search modes and dynamic MCP behavior, benchmark infrastructure, finish-reason normalization, Skill filtering and execution, and structured-output retries.
v1.2.02026-09-23
Features
* CodeAct: Added an optional LlmAgent execution mode that lets models orchestrate tools with Python code, retain large tool results locally by reference, and generate, approve, persist, and reuse user-defined function implementations. (#341)
* Tools: Added OpenAPIToolSet for converting OpenAPI 3.x operations into Agent tools, with schema conversion, operation filtering, asynchronous HTTP execution, authentication and static-header support, host allowlists, and explicit lifecycle management. (#343)
* Code Execution: Added TencentAGSClientConfig so Cube workspaces can connect to Tencent Cloud Agent Sandbox while preserving the provider-neutral Cube client and runtime. Configuration supports endpoint precedence, API key validation control, request timeouts, and sandbox creation metadata. (#340)
Bug Fixes
* Tools: Preserved the invocation ID when merging parallel function responses so merged responses are not incorrectly filtered in INVOCATION mode. (#342)
* Code Execution: Preserved binary files collected from workspaces without lossy UTF-8 replacement decoding; callers can now recover the original bytes from Base64-backed collected content. (#344)
* Storage: Enforced configured maximum key lengths consistently across file-storage operations, validated positive limits, switched session filenames to fixed-length SHA-256 paths, and added automatic migration for legacy plaintext filenames and historical directories. (#345)
* Examples: Fixed Advanced Memory examples to read their configuration from environment variables correctly. (#338)
Docs
* Added English and Chinese guides and runnable examples for CodeAct, OpenAPI tools, and Tencent Cloud Agent Sandbox configuration.
Internal
* Expanded regression coverage for CodeAct, OpenAPI conversion and HTTP behavior, Tencent AGS configuration, parallel tool-response merging, binary workspace collection, and file-storage migration.
v1.1.212026-09-15
Features
Memory: Split Advanced Memory into two independently configurable capabilities: Session Compact under trpcagentsdk.sessions.compact and long-term memory tools under trpcagentsdk.tools.advancedmemory. Session Compact now exposes common summarizer/manager abstractions, supports BEFOREMODEL and AFTERTURN triggers, and keeps the existing SessionSummarizer, SessionSummary, and SummarizerSessionManager exports as aliases for the default implementation. (#336)
Memory: Added a standalone AdvancedMemory integration and AdvancedMemoryToolSet with explicit savememory, readmemory, and listmemory_index tools, tenant/session-scoped storage resolution, bounded index injection, optional relevance-based preload, freshness metadata, and local, Redis, or SQL storage backends. (#336)
Memory: Reworked advanced context compaction as a Session Service capability, retaining staged tool-result budgeting, history snipping, micro-compaction, token tracking, LLM auto-compaction, and structured session-memory extraction without requiring a session-service wrapper. Compressed raw events can be retained through SessionServiceConfig.storehistorical_events, and summary anchors are preserved when limiting the model-facing history. (#336)
Model: Added OpenAIModel.responsemetadataextractor for allowlisted, JSON-serializable fields returned by OpenAI-compatible providers. Extracted values are exposed under providerresponse_metadata on the final LlmResponse and trace for Chat Completions and Responses API calls, including streaming responses. (#328)
Skill: Added SkillToolSetWithDynamicTools and made skill-declared tool discovery optional, allowing applications to omit skilllisttools / skillselecttools when dynamic tool selection is not needed. Clarified that skilllist_tools lists tools declared by one skill rather than every tool available to the Agent. (#323)
Bug Fixes
* Code Execution: Prevented executable-code parts and fenced code found in model thinking content from being treated as code to run; only visible model output is now eligible for automatic execution. (#327)
Storage: Fixed MySQL session timestamp comparisons losing microsecond precision by compiling database-generated timestamps as CURRENTTIMESTAMP(6), while preserving the native now() behavior for PostgreSQL and SQLite. (#322)
* Sessions: Removed session summaries from system instructions so compressed context has a single model-facing source in session history, avoiding duplicated summary tokens and inconsistent behavior after process restarts. (#336)
Docs
* Memory: Added runnable Advanced Memory examples for local, Redis, and SQL long-term-memory storage, plus an advanced session summarizer example and updated configuration guidance. (#336)
* Model: Added English and Chinese documentation and a runnable example for extracting provider-specific response metadata. (#328)
* Skill: Updated English and Chinese Skill documentation and examples for static versus dynamic skill tool exposure. (#323)
Internal
Memory: Removed the former trpcagentsdk.advancedmemory, AdvancedMemoryService, and AdvancedMemorySessionService layout in favor of the new Session Compact and standalone Advanced Memory APIs; applications importing those old paths should migrate to trpcagentsdk.sessions.compact and trpcagentsdk.tools.advanced_memory. (#336)
* Testing: Expanded coverage for Session Compact, summary retention across InMemory/Redis/SQL services, provider metadata extraction, thought-code execution safety, MySQL timestamp precision, and dynamic Skill tools.
v1.1.202026-09-01
Features
A2A: Added A2A 1.0 support through the new a2a-v1 optional extra and trpcagentsdk.server.a2av1 package, including agent services, remote agents, Agent Card discovery, artifact-first streaming, task cancellation, and compatibility bridging for legacy A2A 0.3 peers. Existing A2A 0.3 integrations remain supported without code changes.
Memory: Added the optional Advanced Memory subsystem for file-backed long-term and session memory, including AdvancedMemoryService, AdvancedMemorySessionService, transcript persistence, structured session-memory extraction, memory freshness metadata, and savememory, readmemory, and listmemory_index tools.
* Memory: Added a staged context-management pipeline with bounded long-term-memory injection, oversized tool-result spill and preview, history trimming, micro-compaction, LLM-driven auto-compaction, token-aware context budgets, relevant-memory preloading, and cross-event-loop session coordination.
Runner: Added automatic binding and session-service wrapping when Advanced Memory services are supplied, allowing the Advanced Memory context pipeline to integrate through the existing sessionservice and memory_service interfaces.
Bug Fixes
* Model: Fixed OpenAI 3.x with httpx 2.x raising stream-close errors after the SSE [DONE] marker in Chat Completions and Responses API streaming.
Docs
* A2A: Added English and Chinese A2A 1.0 documentation and runnable examples for basic agents, multi-turn tool use, remote cancellation, and agent transfer.
* Memory: Added an Advanced Memory example and comprehensive coverage for storage, transcripts, extraction, context budgeting, compaction, preload, and coordination behavior.
Internal
* Memory: Reorganized Advanced Memory implementation modules behind a smaller public API and strengthened configuration validation while preserving lazy exports from the memory, session, and tools packages.
v1.1.192026-08-21
Backports the fixes already released in 1.1.18 (LLM streaming interruption span fixes and CI extension package installation) to the r0.1 branch, and bumps the version number to align with main.
v1.1.182026-08-21
Bug Fixes
Telemetry: Fixed agentrun and runner spans misreporting success with empty output when LLM streaming output was interrupted mid-stream (network interruption, model business error, or a retry-swallowed failure on a later turn after a tool call).
* Error responses no longer clear the partial text already streamed; the span is now marked as failed and the accumulated output is preserved with an [INTERRUPTED] prefix.
* In multi-turn runs, the interrupted text is appended after already-collected turn content instead of being dropped.
The callllm span's llm_response attribute now also backfills the already-streamed content when the retry layer converts a raised exception into a terminal error response.
Internal
CI: Added extension package installation to pipelinetest/runallexamples.sh so the full set of examples can be run in CI.
v1.1.172026-08-19
Features
* Telemetry: Langfuse export now preserves user-defined span attributes. Fields prefixed with langfuse are passed through as-is; other custom attributes are collected into metadata so teams can observe custom instrumentation alongside built-in trace data.
Bug Fixes
* AG-UI: Fixed AGUI connections being closed too early when an AgentNode emitted an error Event. The server no longer sends RunErrorEvent immediately on the first error event; it waits until the final event carries an error after the agent run has finished. This allows agents such as GraphAgent to continue executing subsequent nodes instead of terminating the client connection prematurely.
* Telemetry: Fixed four classes of span status and output loss during agent interruption or failure:
Runner initialization failures now report error status through tracerunner() even when InvocationContext is not yet available (invocation_context is optional), while still writing the remaining runner business attributes.
LLM call failures converted by the retry layer into LlmResponse(errorcode=...) are no longer recorded as successful spans; trace reporting now checks llmresponse.errorcode.
* External cancellation via asyncio.CancelledError now marks the root invocation span as failed and preserves accumulated partial streamed text instead of leaving the span successful with missing output.
GeneratorExit during generator shutdown now backfills partial streamed text into agentaction, preventing already emitted content from being lost when the client disconnects or the stream is closed early.
Internal
* Build: Optimized installation speed for faster dependency setup and project bootstrap.
v1.1.162026-08-11
Features
* Model: Added OpenAI Responses API support in OpenAIModel, including streaming, tool calls, and related adapter integration, so agents can use the Responses API alongside existing chat-completions flows.
* Graph: Strengthened GraphAgent human-in-the-loop support and resume behavior, including clearer HITL event handling, checkpoint recovery, and AG-UI integration updates for interrupted graph runs.
* Agent: Added configurable run limits for LlmAgent through AgentRunLimits, allowing callers to cap total turns, LLM calls, and tool calls and fail fast when a budget is exceeded.
* Eval/Optimization: Added an evaluation-and-optimization closed loop, covering pipeline config validation, standardized evaluation, failure attribution, case diff analysis, gate/budget decisions, real optimizer write-back, atomic report publishing, audit indexing, and offline model / trace replay validation.
Examples: Added examples/optimization/evaloptimizeloop for the evaluation-optimization workflow and examples/llmagentwith_limit for demonstrating agent run limits.
Bug Fixes
* Tools: Fixed BashTool whitelist validation so every executable segment in standalone commands, pipelines, and compound shell syntax (;, &&, ||, newlines, background &) is checked. Heredoc bodies are treated as data, and unverifiable substitution syntax now fails closed.
* Code Execution: Deferred docker and python-magic imports to first use, preventing import-time hangs or crashes on Windows and other environments without Docker Desktop or libmagic installed.
* Telemetry: Fixed missing trace reporting when LLM calls are cancelled with GeneratorExit after a client disconnects during deployed service runs.
* Eval/Optimization: Hardened report publishing, credential redaction, telemetry completeness, and config snapshot handling so optimization artifacts do not leak secrets or publish partial state.
Docs
* Docs: Added English and Chinese documentation for OpenAI Responses API usage, GraphAgent HITL/resume behavior, and LlmAgent run-limit configuration.
v1.1.152026-08-03
Features
Tools: Added a Tool Script Safety Guard that scans Bash / Python scripts before execution and returns allow / deny / needshuman_review. It covers dangerous commands, sensitive path access, dependency installs, unknown network calls, and privilege escalation, and can be enabled on BashTool, local code executors, Skill, and MCP tool flows.
* Tools: Added configurable safety policies, custom rule registration, JSONL audit logs, and telemetry attributes so teams can tune what to block, what to review, and how to observe safety decisions.
* Testing: Added a Session / Memory / Summary multi-backend replay consistency framework. The same agent trajectories can be replayed on InMemory, SQLite, and optional Redis backends to compare events, state, memory, and summary results, with known SQLite summary drift reported instead of silently ignored.
* Examples: Added a Skill-based code review agent example, including sandbox execution, review report generation, and policy filters for reviewing diffs / repositories more safely.
* Examples: Added PostgreSQL storage support to the code review agent example, so review records can be persisted beyond the default SQLite backend.
* Examples: Added pytest configuration and failure fallback handling for evaluation examples, making evaluation runs more resilient when individual cases fail.
Bug Fixes
Tools: Fixed ToolSafetyFilter only scanning the first non-empty script-like argument. It now scans all recognized fields such as script / code / command / cmd / pythoncode / bashcode / codeblocks, including mixed-language requests, so a safe earlier field can no longer hide a later dangerous command.
Tools: For unknown-language segments, keep running Bash rules but only merge Python findings when AST parsing succeeds. This avoids PYPARSEERRORREVIEW false positives that could block safe Bash scripts under strict review mode.
* Model: Fixed Hunyuan hy3 conversations breaking the thinking chain when later turns omitted thinking content. Thinking text is now preserved when the model requires it for follow-up calls.
Model: Fixed tool calls being dropped when the model returned invalid JSON tool arguments. The SDK now tries jsonrepair first, and if repair fails it returns a parameter error to the agent instead of silently discarding the call.
* Telemetry: Fixed missing traces for model retries and model call failures. Retry attempts and failure details are now recorded on the corresponding spans.
Docs
* Docs: Added Tool Script Safety Guard design notes, policy examples, response schema examples, and a real-agent demo covering Tool / Skill / MCP / CodeExecutor allow-review-deny scenarios.
* Docs: Expanded replay consistency README and implementation notes, including positive consistency checks and negative injection detection cases.