Skip to content

Conversation

@aurabindo
Copy link
Contributor

max_iterations is hardcoded to 10, and this is very limiting for complex tasks. Make it a configurable option

ferasawadi and others added 30 commits September 28, 2025 01:45
feat: Core SDK skeleton now mirrors the Python reference:
feat: add Summarization and Human-in-Loop middlewares
…759144873521

Add Claude Code GitHub Workflow
feat: add automated crates.io publishing workflow
…759144873521

Add claude GitHub actions 1759144873521
feat: update README with crates.io installation instructions
feat: Unified agents-sdk with feature flags
- Fix import ordering in agents-sdk/src/lib.rs
- Fix formatting in unified-sdk-test example
- Ensure all code passes cargo fmt --check

Fixes CI formatting checks for release deployment.
hotfix: fix cargo fmt formatting issues for v0.0.2 release
The CI was failing because the version update script didn't handle the
agents-sdk dependency format properly:

Before: version = "0.0.1", path = "../agents-core"
After:  version = "0.0.2", path = "../agents-core"

Added sed command to handle this format in addition to the existing patterns.

Fixes: agents-sdk dependency version mismatch during crates.io publishing
…script

🚨 hotfix: fix version update script for agents-sdk dependencies
hotfix: fix version update script for agents-sdk dependencies
The CI was failing because the version update script modifies Cargo.toml files
but doesn't commit them, leaving a dirty working directory.

Adding --allow-dirty flag to all cargo publish commands allows publishing
with the dynamically updated versions.

This is safe because the version updates are intentional and temporary
for the release process.
🚨 URGENT: Add --allow-dirty flag to cargo publish
- Add .github/FUNDING.yml with PayPal and alternative platform support
- Add sponsorship section to README.md with badges for Ko-fi, PayPal, and Buy Me a Coffee
- Configure PayPal.me/yafacs as primary funding option

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…tions

Add sponsorship options for project funding
- Replace MIT license with Apache License 2.0 (2025 copyright)
- Update README license badge to reflect Apache 2.0
- Clean up sponsorship section: keep only PayPal option
- Remove Buy Me a Coffee and Ko-fi references from FUNDING.yml
- Provides better patent protection for AI/ML project

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…che-2025

Update license to Apache 2.0 and clean up sponsorship options
## Major Changes

### 1. New Tool System (agents-core/src/tools.rs)
- ✅ Introduced unified `Tool` trait with schema support
- ✅ `ToolSchema` with JSON Schema parameter definitions
- ✅ `ToolContext` pattern for state access
- ✅ `ToolResult` with state update support
- ✅ `ToolRegistry` for centralized tool management
- ✅ Removed legacy `ToolHandle` trait completely

### 2. Tool Builder Utilities (agents-toolkit/src/builder.rs)
- ✅ `ToolBuilder` for ergonomic tool creation
- ✅ `tool()` and `tool_sync()` helper functions
- ✅ Automatic wrapping of closures into Tool implementations

### 3. Built-in Tools Refactored
- ✅ Filesystem tools (ls, read_file, write_file, edit_file)
- ✅ Todo management tool (write_todos)
- ✅ All tools now have proper JSON Schema definitions
- ✅ Tools use ToolContext for state access

### 4. LLM Provider Integration
- ✅ Added `tools` field to `LlmRequest`
- ✅ Anthropic provider serializes tools to their format
- ✅ Tool schemas automatically passed to LLMs

### 5. Sub-Agent System Redesign
- ✅ `SubAgentConfig` now represents full AI agents
- ✅ Each sub-agent has: model, tools, instructions, memory
- ✅ Required fields: name, description, instructions
- ✅ Optional fields: model, tools, builtin_tools, prompt_caching
- ✅ Clean builder API: `.with_tools(vec![...])` instead of multiple calls

### 6. API Cleanup
- ✅ Single `with_tool()` / `with_tools()` methods
- ✅ Removed confusing ToolHandle/ToolHandleAdapter wrappers
- ✅ Removed duplicate builder methods
- ✅ Middleware returns `Vec<ToolBox>` directly

## Breaking Changes
- `ToolHandle` trait removed - use `Tool` trait
- `create_tool()` / `create_sync_tool()` removed - use `tool()` / `tool_sync()`
- Tool invocation now uses `execute(args, ctx)` instead of `invoke(invocation)`
- `SubAgentConfig` structure changed - now has proper agent fields

## Migration Guide
```rust
// OLD
let tool = create_tool("name", "desc", |args| async { ... });
builder.with_tool_handle(tool);

// NEW
let tool = tool("name", "desc", param_schema, |args, ctx| async {
    Ok(ToolResult::text(&ctx, result))
});
builder.with_tool(tool);
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…and Vite, including chat components and SSE handling
Refactor: Unified tool system with schema support and proper sub-agents
ferasalawadi and others added 23 commits October 6, 2025 03:55
- Enable tokio-native-tls-comp feature in agents-persistence
- Fixes connection to rediss:// URLs in production AWS environments
- Bump version to 0.0.15
- All tests passing, clippy clean
…polling

- Replace 6 × 30s sleep (180s total) with smart crate availability checks
- Poll crates.io every 3s, exit early when crate is available
- Expected time reduction: from 3 minutes to 30-60 seconds
- Improves CI/CD efficiency without breaking dependency order
…(v0.0.16)

- Add EventBroadcaster trait and EventDispatcher for multi-channel broadcasting
- Implement 10+ event types covering full agent lifecycle
- Add non-blocking async event emission with <20µs overhead
- Integrate events into DeepAgent runtime and middleware
- Add comprehensive documentation in docs/EVENT_SYSTEM.md
- Add migration guide from agent_progress_subscriber
- Add working example in examples/event-system-demo
- Update README with event system quick start guide
- Deprecate agent_progress_subscriber module
- Bump version to 0.0.16 across all crates
- Support multiple .with_event_broadcaster() calls in builder
- EventDispatcher uses RwLock for interior mutability
- DeepAgent.add_broadcaster() allows dynamic broadcaster addition
- Clean API: .with_event_broadcaster().with_event_broadcaster()
- Bump version to 0.0.17
- Add add_broadcasters() method to DeepAgent
- Accepts Vec<Arc<dyn EventBroadcaster>>
- Useful for adding multiple broadcasters at once (WhatsApp, SSE, DynamoDB)
- Bump version to 0.0.18
Features:
- Add comprehensive PII sanitization system (enabled by default)
- Automatic redaction of sensitive fields (passwords, tokens, API keys, etc.)
- PII pattern detection (emails, phones, credit cards)
- Message truncation to 100 characters for event previews
- Configurable via .with_pii_sanitization(bool) in agent builder
- Sub-agents inherit parent's sanitization settings

Security Module:
- New agents-core/src/security.rs with sanitization utilities
- truncate_string() - Safe string truncation
- sanitize_json() - Recursive JSON field redaction
- redact_pii() - Pattern-based PII removal
- safe_preview() - Combined truncation + PII redaction
- sanitize_tool_payload() - Complete tool payload sanitization

Documentation:
- New docs/SECURITY.md - Complete security guide
- Updated docs/EVENT_SYSTEM.md - Security section
- Updated README.md - Security & PII Protection section
- New example: pii-sanitization-demo

Example:
- Full working demo with agents, sub-agents, and tools
- Demonstrates sanitized vs unsanitized output
- Manual sanitization utilities showcase
- Real OpenAI API integration with .env support

Testing:
- 15 new unit tests for security module
- All existing tests passing (73 total)
- Integration with event system verified
- Sub-agent inheritance tested

Breaking Changes: None
All changes are backward compatible with default security enabled.
…nitoring

- Add TokenTrackingMiddleware for monitoring LLM usage and costs
- Add TokenUsage events to the event system
- Add TokenTrackingConfig with flexible configuration options
- Add TokenCosts with predefined pricing for OpenAI, Anthropic, and Gemini
- Add builder methods: with_token_tracking() and with_token_tracking_config()
- Add comprehensive documentation and examples
- Update README with token tracking features
- Bump version to 0.0.22
- Restructure README for better developer experience
- Add comprehensive quick start guide with working examples
- Document all core features with practical code samples
- Include architecture overview and workspace layout
- Add performance notes and development guidelines
- Remove outdated examples and focus on working implementations
- Improve navigation and readability for developers
…del()

- Deprecate with_openai_chat(), with_anthropic_messages(), and with_gemini_chat()
- Add clear deprecation warnings with migration examples
- Update README and examples to use with_model() pattern
- Simplify API surface to reduce confusion
- Maintain backward compatibility with deprecation warnings

BREAKING CHANGE: Provider-specific methods are now deprecated (still functional)
Migration: Use with_model() with provider model constructors instead
…l() only

- Remove with_openai_chat(), with_anthropic_messages(), with_gemini_chat()
- Update all examples to use with_model() with explicit model construction
- Add default planner fallback using get_default_model()
- Simplify API surface to reduce confusion
- Maintain backward compatibility with default model behavior

BREAKING CHANGE: Provider-specific convenience methods removed
Migration: Use with_model() with provider model constructors (e.g., OpenAiChatModel::new())
- Update agents-core, agents-runtime, agents-sdk, agents-toolkit, agents-aws, agents-persistence to v0.0.23
- Update README.md version references
- Update Cargo.lock with latest dependencies
- Prepare for v0.0.23 release
This enhancement adds real-time token-by-token event broadcasting to the agents-sdk,
enabling broadcasters to receive streaming tokens as they are generated by the LLM.

Changes:

1. New AgentEvent::StreamingToken variant
   - StreamingTokenEvent struct with agent name and token delta
   - Metadata includes thread_id, correlation_id, and timestamp

2. EventBroadcaster trait enhancement
   - Added supports_streaming() method (defaults to false)
   - Broadcasters opt-in to receive streaming token events
   - Backward compatible: existing broadcasters work unchanged

3. EventDispatcher filtering
   - Automatically filters StreamingToken events for non-streaming broadcasters
   - Zero overhead for existing broadcasters that don't need streaming

4. Runtime streaming support
   - handle_message_stream() now emits events to broadcasters
   - Emits StreamingToken for each token delta
   - Emits AgentCompleted on stream completion

5. New example: streaming-events-demo
   - Demonstrates real-time token broadcasting
   - Shows opt-in streaming with StreamingBroadcaster
   - Includes non-streaming ConsoleBroadcaster for comparison

6. Documentation updates
   - Updated README with v0.0.24 features
   - Added CHANGELOG entry with detailed changes
   - Updated version numbers across all crates

Benefits:
- Real-time SSE (Server-Sent Events) for web applications
- WebSocket token-level updates
- Live chat interfaces with streaming responses
- Progress indicators with token granularity
- Backward compatible with existing broadcasters

Performance:
- Streaming event overhead: <10µs per token
- Zero impact on non-streaming broadcasters
- Efficient filtering at dispatcher level

All tests pass. Clippy and fmt clean.
- Fixed critical bug where agent conversation context was not maintained across messages
- Agent runtime now properly initializes internal state with loaded state from checkpointer
- Previously, the loaded_state parameter in handle_message_internal was ignored
- This ensures conversation history and context are preserved across sessions
- Resolves issue where agents would 'forget' previous conversation context after server restarts
- Added state persistence test example
- Updated all crate versions to 0.0.25
Certain corporate environments require custom headers being set in
addition to the standard bearer/API_KEY headers. Add support for
specifying them via custom_headers

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
Add 2 tests each for the providers Anthropic, Gemini & OpenAI to
test adding custom header config.

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
Add an example that shows how to use custom headers with Anthropic
provider. README.md show example output.

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
Add custom header suppport for LLM providers
max_iterations is hardcoded to 10, and this is very limiting for complex
tasks. Make it a configurable option

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
number of iterations must be at least 1. Use NonZeroUsize for this.

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants