Releases: trpc-group/trpc-agent-python
v1.1.11
Features
- Model: Added SDK-managed model retry support for
OpenAIModel,AnthropicModel, andLiteLLMModel, includingModelRetryConfig,ExponentialBackoffConfig, provider-aware retry decisions from headers / HTTP status / SDK exceptions,Retry-Afterandretry-after-mshandling, and full-jitter exponential backoff. Streaming retries are guarded so the SDK only replays a model call before any user-visible content has been emitted, avoiding duplicated partial text or tool calls. - Model: Refactored HTTP client lifecycle management around
http_client_provider_factory, adding explicit temporary and shared HTTP client providers plusclose_shared_http_clients()so callers can choose per-request clients by default or opt in to connection reuse with boundedhttpx.AsyncClientpooling. OpenAI and Anthropic model tests and documentation were updated to cover provider-owned client injection and cleanup behavior. - Tools: Added a Claude Code-style
TodoWriteToolthat lets agents maintain a structured todo list in branch-scoped session state, with validation for complete-list replacement, unique items, and at most onein_progressitem. Added examples for normal todo usage and human-in-the-loop todo workflows. - Tools: Added
TaskToolSetwithtask_create,task_update,task_get, andtask_listtools, providing persistent structured task boards with server-assigned task ids, status updates, dependency edges, and single-in-progress enforcement. Added task tool examples and unit coverage for task lifecycle behavior. - Skill: Added
LinkSkillStagerand renamed the file-system stager module from copy-oriented naming to file-oriented naming, allowing skills to be staged into workspaces through links while preserving the shared workspace directories required by code execution and skill artifacts. - Skill: Added cached filesystem skill repositories via
CachedFsSkillRepositoryanduse_cached_repository=Trueincreate_default_skill_repository(), cachingSKILL.mdfront matter and body by file signature to reduce repeated skill scanning and loading overhead while still invalidating entries when files change or are deleted. - Code Execution: Extended workspace staging and runtime metadata to support link-mode staging, explicit workspace stage options, TTY flags, and
work/inputslayout initialization so skill-provided files can be prepared before skill loading and code execution steps run. - Examples/Docs: Added runnable examples and documentation for model retry, todo tools, task tools, shared HTTP client configuration, skill link staging, cached skill repositories, and tool usage updates across English and Chinese docs.
Bug Fixes
- Model: Fixed loss of normal assistant text when a streaming OpenAI-compatible response contains both text and a tool call. The final non-partial response now keeps user-visible text while still converting parsed tool calls into structured
function_callparts, preventing text that appeared in the stream from being dropped from session history and later model context. - Model: Updated LiteLLM retry and error handling so normalized LiteLLM exception headers and status codes participate in the same retry decisions as OpenAI and Anthropic, and so failures after partial streaming output are surfaced as final errors instead of replayed.
- Skill: Ensured workspace layout creates
work/inputsup front, avoiding races where code or skill commands attempt to copy input files beforeskill_loadhas linked or initialized the input directory. - Telemetry: Updated model metrics reporting to align with the retry wrapper and renamed metric attributes so model calls report consistent retry-aware execution data.
v1.1.10
Bug Fixes
- Model: fix error about pickle of OpenAIModel.
v1.1.9
Features
- Model: Added
http_client_factorysupport toOpenAIModel, allowing callers to inject a customhttpx.AsyncClientfactory to control HTTP connection lifecycle and pool settings such as keepalive expiry (#83).
Bug Fixes
- Telemetry: Switched
agent_runandinvocationspans back tostart_as_current_spanso child spans such ascall_llminherit the correct parent context, restoring complete trace attributes (including system instructions and tools) in Langfuse reporting.
v1.1.8
Features
- Session: Reworked session history storage from
Event.model_flags-based model visibility to an active/historical split, withSession.eventsholding the active model window andSession.historical_eventsoptionally retaining events moved out by max-event filtering, TTL, or summarization. - Session: Added
SessionServiceConfig.store_historical_events, updated Redis, SQL, and InMemory persistence semantics for active/historical events, and kept list APIs lightweight by omitting both active and historical events fromlist_sessions(). - Session: Optimized summarization by keeping
[summary_event, recent_events...]as the new active window and checking only the leading summary anchor instead of repeatedly scanning the event list. - Model: Added configuration support for OpenAI/Anthropic APIs and LiteLLM prompt cache.
Bug Fixes
- Telemetry: Propagated span context correctly in async generators by using
start_spanwith context attach/detach, and fixed member-agent input tracing to preferoverride_messagesoveruser_content.
v1.1.7
Bug Fixes
- Runner: Added
close_session_service_on_closeandclose_memory_service_on_closecontrols so short-lived runners can skip closing externally managed session and memory services, such as shared Redis-backed services. - MCP: Updated Streamable HTTP session creation to prefer the non-deprecated
streamable_http_clientAPI, with fallback support for older MCP SDKs that only exposestreamablehttp_client. - MCP: Moved Streamable HTTP headers and timeout configuration onto an owned
httpx.AsyncClient, avoiding deprecated transport arguments while keeping the HTTP client lifecycle tied to the MCP session context. - Storage: Fixed frequent sqlite warnings in
SqlSessionServiceby consistently using database-sidefunc.now()for update timestamps.
v1.1.6
Features
- Skill: Added a recoverable Cube sandbox runtime for skills, including
CubeClientConfig, a unifiedcreate_cube_sandbox_cliententry point, optionalauto_recoversupport inCubeSandboxClient, sandbox lifecycle helpers, and directCubeWorkspaceRuntimecreation from the client. - Skill: Unified skill load/run/exec/stager paths around repository-level workspace runtime resolution via
repository.get_workspace_runtime(ctx), so tools under the same skill repository share one workspace runtime context. - MCP: Added MCP tool caching to avoid repeated network access.
- Tools: Added
GraphAgentsupport inAgentTool, allowing wrapped graph agents to return results from tool context state. - Examples/Eval: Restored evaluation examples that were previously removed during open-source cleanup.
- Optimizer: Added support for the prompt self-optimization
AgentOptimizer.
Bug Fixes
- Storage: Fixed frequent sqlite warnings in
SqlSessionServiceby consistently using database-sidefunc.now()for update timestamps.
v1.1.5
1.1.5 (2026-05-19)
Features
-
Tools: Added
StreamingProgressToolwith matchingToolsProcessorplumbing so tools can surface intermediate progress aspartial=Trueevents while still emitting a single finalfunction_response; includedBaseToolstreaming hooks, thellmagent_with_streaming_progress_toolexample and verification script. -
Eval: Added
RemoteEvalServiceto drive evaluations against agents exposed over remote interfaces, refactoredAgentEvaluatorto support remote agent calls, and expanded English/Chinese evaluation docs. -
Model: Landed the OpenAI-compatible adapter layer (
models/openai_adapter/{_base,_deepseek,_hunyuan}.py) that isolates provider-specific behavior fromOpenAIModel, including DeepSeek v4 thinking /response_format/reasoning_content/ token usage handling and hy3-preview ToolPrompt text parsing with streaming filter. -
Examples: Added
examples/mempalace_mcp(MemPalace via MCP) and updatedexamples/llmagent_with_thinkingto enableadd_tools_to_promptonly for hy3-preview and display thinking / tool calls / final answer separately. -
Utils: Added
json_loads_repairandjson_repair_stringhelpers (backed byjson_repair) undertrpc_agent_sdk.utils, with full unit test coverage. -
Model/Tools: Adopted
json_repaironly on JSON-tolerant paths —JsonToolPrompt/XmlToolPromptparse_function, non-streaming OpenAI tool-call args,AgentToolstructured-output validation, skills tool result parsing — while keeping strictjson.loadsfor the streaming tool-call accumulator (to preserve "wait for next chunk" semantics) and Hunyuan plain-text<arg_value>parsing (to avoid silently coercing plain text into empty strings). -
Model: Fixed ToolPrompt streaming parsing so multiple tool calls in a single response are all preserved instead of only the last one being kept.
Bug Fixes
- Teams: TeamAgent now honors
actions.skip_summarizationfrom custom tool events, so tools likeAgentTool(skip_summarization=True)andStreamingProgressTool(skip_summarization=True)end the leader loop without an extra summarization turn (previously masked by leader'sdisable_react_tool=True).
v1.1.4
Bug Fixes
- Tools: Removed default
mempalace_toolexports fromtrpc_agent_sdk.toolsto avoid forcing MemPalace optional dependencies during base package import.
v1.1.3
Features
- Model: Added an OpenAI-compatible adapter layer to isolate provider-specific behaviors, including DeepSeek v4 reasoning/format handling and hy3-preview tool-prompt parsing support.
- Memory: Added MemPalace integration with
MemPalaceMemoryServiceandmempalace_tool, plus related examples and documentation. - Code Execution: Added Cube/E2B sandbox executor and workspace runtime with optional dependency support and end-to-end example coverage.
- Eval: Added support for evaluating the same metric across different LLMs.
Bug Fixes
- Model: Fixed ToolPrompt streaming parsing so multiple tool calls in one response are preserved instead of only the last call.
- Storage: Improved SQL storage compatibility by filtering empty content parts, fixing MySQL
DynamicPickleTypeserialization, and stabilizing session timestamp updates. - Eval: Fixed judge-agent JSON output handling in the eval module.
- CI: Added missing
e2b-code-interpretertest dependency to prevent cube test collection failures.
1.1.2.post1
Features
- Session: Updated session summarization to retain full conversation history while marking summarized events as model-invisible.
- Session: Added backend-threaded summarization execution to avoid blocking front-end conversation turns.
- Skill: Added multi-user support for skill operations.
Bug Fixes
- Code Execution: Fixed the conflict between code execution and tool invocation where tool data could be lost after code execution.
- MCP: Added support for parsing and returning multiple MCP tool results in a single response.