Repository navigation
Releases
Releases · trpc-group/trpc-agent-python
v1.2.1
Features
- Memory: Added
TencentDBMemoryServicefor 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
HyMemoryServicefor 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
ToolSearchToolSetfor 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
finish_reasonand provider-nativefinish_reason_rawfields toLlmResponsefor OpenAI, Anthropic, and LiteLLM responses, and included them in telemetry traces. (#370) - Benchmark: Added the
trpc_agent_benchframework 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
set_model_responseschema 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
skill_execas artifacts and added a runnable Skill execution example covering stdin and generated output. (#356) - Skill: Restored
SkillToolSet.tool_filterapplication when tools are retrieved so request-specific tool selection remains effective. (#357) - Skill: Applied repository-provided Skill environment variables consistently to both
skill_runandskill_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.0
Features
- CodeAct: Added an optional
LlmAgentexecution 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
OpenAPIToolSetfor 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
TencentAGSClientConfigso 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
INVOCATIONmode. (#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.21
Features
- Memory: Split Advanced Memory into two independently configurable capabilities: Session Compact under
trpc_agent_sdk.sessions.compactand long-term memory tools undertrpc_agent_sdk.tools.advanced_memory. Session Compact now exposes common summarizer/manager abstractions, supportsBEFORE_MODELandAFTER_TURNtriggers, and keeps the existingSessionSummarizer,SessionSummary, andSummarizerSessionManagerexports as aliases for the default implementation. (#336) - Memory: Added a standalone
AdvancedMemoryintegration andAdvancedMemoryToolSetwith explicitsave_memory,read_memory, andlist_memory_indextools, 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.store_historical_events, and summary anchors are preserved when limiting the model-facing history. (#336) - Model: Added
OpenAIModel.response_metadata_extractorfor allowlisted, JSON-serializable fields returned by OpenAI-compatible providers. Extracted values are exposed underprovider_response_metadataon the finalLlmResponseand trace for Chat Completions and Responses API calls, including streaming responses. (#328) - Skill: Added
SkillToolSetWithDynamicToolsand made skill-declared tool discovery optional, allowing applications to omitskill_list_tools/skill_select_toolswhen dynamic tool selection is not needed. Clarified thatskill_list_toolslists 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
CURRENT_TIMESTAMP(6), while preserving the nativenow()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
trpc_agent_sdk.advanced_memory,AdvancedMemoryService, andAdvancedMemorySessionServicelayout in favor of the new Session Compact and standalone Advanced Memory APIs; applications importing those old paths should migrate totrpc_agent_sdk.sessions.compactandtrpc_agent_sdk.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.20
Features
- A2A: Added A2A 1.0 support through the new
a2a-v1optional extra andtrpc_agent_sdk.server.a2a_v1package, 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, andsave_memory,read_memory, andlist_memory_indextools. - 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
session_serviceandmemory_serviceinterfaces.
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.19
v1.1.18
1.1.18 (2026-08-21)
Bug Fixes
- Telemetry: Fixed
agent_runand 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
call_llmspan'sllm_responseattribute now also backfills the already-streamed content when the retry layer converts a raised exception into a terminal error response.
- 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
Internal
- CI: Added extension package installation to
pipeline_test/run_all_examples.shso the full set of examples can be run in CI.
v1.1.17
Features
- Telemetry: Langfuse export now preserves user-defined span attributes. Fields prefixed with
langfuseare 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
AgentNodeemitted an errorEvent. The server no longer sendsRunErrorEventimmediately on the first error event; it waits until the final event carries an error after the agent run has finished. This allows agents such asGraphAgentto 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
trace_runner()even whenInvocationContextis not yet available (invocation_contextis optional), while still writing the remaining runner business attributes. - LLM call failures converted by the retry layer into
LlmResponse(error_code=...)are no longer recorded as successful spans; trace reporting now checksllm_response.error_code. - External cancellation via
asyncio.CancelledErrornow marks the root invocation span as failed and preserves accumulated partial streamed text instead of leaving the span successful with missing output. GeneratorExitduring generator shutdown now backfills partial streamed text intoagent_action, preventing already emitted content from being lost when the client disconnects or the stream is closed early.
- Runner initialization failures now report error status through
Internal
- Build: Optimized installation speed for faster dependency setup and project bootstrap.
v1.1.16
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
GraphAgenthuman-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
LlmAgentthroughAgentRunLimits, 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/eval_optimize_loopfor the evaluation-optimization workflow andexamples/llmagent_with_limitfor demonstrating agent run limits.
Bug Fixes
- Tools: Fixed
BashToolwhitelist 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
dockerandpython-magicimports 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
GeneratorExitafter 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
LlmAgentrun-limit configuration.
v1.1.15
Features
- Tools: Added a Tool Script Safety Guard that scans Bash / Python scripts before execution and returns
allow/deny/needs_human_review. It covers dangerous commands, sensitive path access, dependency installs, unknown network calls, and privilege escalation, and can be enabled onBashTool, 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
ToolSafetyFilteronly scanning the first non-empty script-like argument. It now scans all recognized fields such asscript/code/command/cmd/python_code/bash_code/code_blocks, 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
PY_PARSE_ERROR_REVIEWfalse 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
json_repairfirst, 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.
v1.1.14
Features
- Telemetry: Added support for reporting model thinking text inside a dedicated
<trace_think>block, making it easier to distinguish reasoning content from normal response text while keeping the existing trace format compatible. - Sessions: Added Redis Cluster-backed session and memory services, allowing deployments that use Redis Cluster to persist conversation sessions and long-term memory through the same service interfaces as existing storage backends.
- Storage: Formatted Redis Cluster session and memory service code to keep the new implementation consistent with the repository style.
- Examples/Docs: Added a script for running with
uvon macOS and updated the related installation docs and README instructions, making the macOS setup path easier to follow.