Skip to content

Releases: trpc-group/trpc-agent-python

v1.1.11

26 Jun 08:50

Choose a tag to compare

Features

  • Model: Added SDK-managed model retry support for OpenAIModel, AnthropicModel, and LiteLLMModel, including ModelRetryConfig, ExponentialBackoffConfig, provider-aware retry decisions from headers / HTTP status / SDK exceptions, Retry-After and retry-after-ms handling, 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 plus close_shared_http_clients() so callers can choose per-request clients by default or opt in to connection reuse with bounded httpx.AsyncClient pooling. OpenAI and Anthropic model tests and documentation were updated to cover provider-owned client injection and cleanup behavior.
  • Tools: Added a Claude Code-style TodoWriteTool that lets agents maintain a structured todo list in branch-scoped session state, with validation for complete-list replacement, unique items, and at most one in_progress item. Added examples for normal todo usage and human-in-the-loop todo workflows.
  • Tools: Added TaskToolSet with task_create, task_update, task_get, and task_list tools, 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 LinkSkillStager and 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 CachedFsSkillRepository and use_cached_repository=True in create_default_skill_repository(), caching SKILL.md front 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/inputs layout 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_call parts, 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/inputs up front, avoiding races where code or skill commands attempt to copy input files before skill_load has 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

18 Jun 09:32

Choose a tag to compare

Bug Fixes

  • Model: fix error about pickle of OpenAIModel.

v1.1.9

18 Jun 08:36

Choose a tag to compare

Features

  • Model: Added http_client_factory support to OpenAIModel, allowing callers to inject a custom httpx.AsyncClient factory to control HTTP connection lifecycle and pool settings such as keepalive expiry (#83).

Bug Fixes

  • Telemetry: Switched agent_run and invocation spans back to start_as_current_span so child spans such as call_llm inherit the correct parent context, restoring complete trace attributes (including system instructions and tools) in Langfuse reporting.

v1.1.8

12 Jun 11:42

Choose a tag to compare

Features

  • Session: Reworked session history storage from Event.model_flags-based model visibility to an active/historical split, with Session.events holding the active model window and Session.historical_events optionally 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 from list_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_span with context attach/detach, and fixed member-agent input tracing to prefer override_messages over user_content.

v1.1.7

05 Jun 08:21

Choose a tag to compare

Bug Fixes

  • Runner: Added close_session_service_on_close and close_memory_service_on_close controls 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_client API, with fallback support for older MCP SDKs that only expose streamablehttp_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 SqlSessionService by consistently using database-side func.now() for update timestamps.

v1.1.6

03 Jun 07:47

Choose a tag to compare

Features

  • Skill: Added a recoverable Cube sandbox runtime for skills, including CubeClientConfig, a unified create_cube_sandbox_client entry point, optional auto_recover support in CubeSandboxClient, sandbox lifecycle helpers, and direct CubeWorkspaceRuntime creation 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 GraphAgent support in AgentTool, 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 SqlSessionService by consistently using database-side func.now() for update timestamps.

v1.1.5

19 May 12:39

Choose a tag to compare

1.1.5 (2026-05-19)

Features

  • Tools: Added StreamingProgressTool with matching ToolsProcessor plumbing so tools can surface intermediate progress as partial=True events while still emitting a single final function_response; included BaseTool streaming hooks, the llmagent_with_streaming_progress_tool example and verification script.

  • Eval: Added RemoteEvalService to drive evaluations against agents exposed over remote interfaces, refactored AgentEvaluator to 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 from OpenAIModel, 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 updated examples/llmagent_with_thinking to enable add_tools_to_prompt only for hy3-preview and display thinking / tool calls / final answer separately.

  • Utils: Added json_loads_repair and json_repair_string helpers (backed by json_repair) under trpc_agent_sdk.utils, with full unit test coverage.

  • Model/Tools: Adopted json_repair only on JSON-tolerant paths — JsonToolPrompt / XmlToolPrompt parse_function, non-streaming OpenAI tool-call args, AgentTool structured-output validation, skills tool result parsing — while keeping strict json.loads for 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_summarization from custom tool events, so tools like AgentTool(skip_summarization=True) and StreamingProgressTool(skip_summarization=True) end the leader loop without an extra summarization turn (previously masked by leader's disable_react_tool=True).

v1.1.4

13 May 07:29

Choose a tag to compare

Bug Fixes

  • Tools: Removed default mempalace_tool exports from trpc_agent_sdk.tools to avoid forcing MemPalace optional dependencies during base package import.

v1.1.3

13 May 02:19

Choose a tag to compare

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 MemPalaceMemoryService and mempalace_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 DynamicPickleType serialization, and stabilizing session timestamp updates.
  • Eval: Fixed judge-agent JSON output handling in the eval module.
  • CI: Added missing e2b-code-interpreter test dependency to prevent cube test collection failures.

1.1.2.post1

29 Apr 13:03

Choose a tag to compare

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.