Skip to content

Conversation

@zhuangjie1125
Copy link
Contributor

@zhuangjie1125 zhuangjie1125 commented Jan 15, 2026

feat(adk/backend): implement Agentkit Sandbox and Local filesystem backend adapters

Introduces two new backend implementations for the adk/backend filesystem interface
to support flexible file operations in different execution environments: a remote
Agentkit Sandbox backend for secure isolated execution and a local backend for direct
filesystem access.

Agentkit Sandbox Backend

  • Implements filesystem.Backend interface to integrate with Volcengine's Agentkit Sandbox API
  • Provides secure remote code execution with request signing using HMAC-SHA256
  • Manages session lifecycle with automatic token refresh and expiration handling
  • Supports all core filesystem operations: LsInfo, Read, Write, Edit, GrepRaw, GlobInfo
  • Includes Python code templates for sandbox execution with proper error handling
  • Defines comprehensive API types for request/response structures

Local Backend (local)

  • Implements filesystem.Backend interface for direct local filesystem operations
  • Supports directory listing (LsInfo) with configurable depth and ignore patterns
  • Provides file reading (Read) with line-based pagination (offset/limit support)
  • Enables file writing (Write) with automatic directory creation
  • Implements content search (GrepRaw) with regex pattern matching
  • Supports glob pattern matching (GlobInfo) for file discovery
  • Includes robust input validation (absolute path enforcement, permission checks)

Testing & Documentation

  • Adds comprehensive unit tests for both backends (323 lines for agentkit, 700 lines for local)
  • Provides detailed README documentation with usage examples and API references
  • Includes example implementations demonstrating backend and middleware integration
  • Updates dependency management (go.mod/go.sum) with required packages

Technical Details

  • Total additions: 4,216 lines across 16 files
  • Both backends implement the same filesystem.Backend interface for consistency
  • Error handling follows Go conventions with wrapped errors for context
  • Middleware examples demonstrate authentication and logging patterns

@zhuangjie1125 zhuangjie1125 force-pushed the feat/adk_filesystem branch 10 times, most recently from bb495e0 to 67e24fb Compare January 19, 2026 06:27
@zhuangjie1125 zhuangjie1125 changed the title feat(adk/backend): implement arksandbox backend feat(adk/backend): implement both Ark Sandbox and Local filesystem backends Jan 19, 2026
@zhuangjie1125 zhuangjie1125 force-pushed the feat/adk_filesystem branch 4 times, most recently from 83ea7b9 to ff469d8 Compare January 20, 2026 09:19
@zhuangjie1125 zhuangjie1125 force-pushed the feat/adk_filesystem branch 9 times, most recently from 040bf38 to 71388a9 Compare January 29, 2026 08:43
@zhuangjie1125 zhuangjie1125 changed the title feat(adk/backend): implement both Ark Sandbox and Local filesystem backends feat(adk/backend): implement Agentkit Sandbox and Local filesystem backend adapters Jan 29, 2026
@zhuangjie1125 zhuangjie1125 force-pushed the feat/adk_filesystem branch 5 times, most recently from e1c09df to 852a0c6 Compare February 3, 2026 08:56
@zhuangjie1125 zhuangjie1125 force-pushed the feat/adk_filesystem branch 3 times, most recently from f60d7ef to 100cf07 Compare February 3, 2026 10:24
…ckend adapters

Introduces two new backend implementations for the adk/backend filesystem interface
to support flexible file operations in different execution environments: a remote
Agentkit Sandbox backend for secure isolated execution and a local backend for direct
filesystem access.

**Agentkit Sandbox Backend **
- Implements filesystem.Backend interface to integrate with Volcengine's Agentkit Sandbox API
- Provides secure remote code execution with request signing using HMAC-SHA256
- Manages session lifecycle with automatic token refresh and expiration handling
- Supports all core filesystem operations: LsInfo, Read, Write, Edit, GrepRaw, GlobInfo
- Includes Python code templates for sandbox execution with proper error handling
- Defines comprehensive API types for request/response structures

**Local Backend (local)**
- Implements filesystem.Backend interface for direct local filesystem operations
- Supports directory listing (LsInfo) with configurable depth and ignore patterns
- Provides file reading (Read) with line-based pagination (offset/limit support)
- Enables file writing (Write) with automatic directory creation
- Implements content search (GrepRaw) with regex pattern matching
- Supports glob pattern matching (GlobInfo) for file discovery
- Includes robust input validation (absolute path enforcement, permission checks)

**Testing & Documentation**
- Adds comprehensive unit tests for both backends (323 lines for agentkit, 700 lines for local)
- Provides detailed README documentation with usage examples and API references
- Includes example implementations demonstrating backend and middleware integration
- Updates dependency management (go.mod/go.sum) with required packages

**Technical Details**
- Total additions: 4,216 lines across 16 files
- Both backends implement the same filesystem.Backend interface for consistency
- Error handling follows Go conventions with wrapped errors for context
- Middleware examples demonstrate authentication and logging patterns
@zhuangjie1125 zhuangjie1125 merged commit 1f91f54 into main Feb 4, 2026
8 checks passed
@zhuangjie1125 zhuangjie1125 deleted the feat/adk_filesystem branch February 4, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants