Releases: GlyphyAI/liteswarm
Releases · GlyphyAI/liteswarm
0.5.1
What's Changed
Improvements
- Added missing common types (LLM, ContextVariables, etc) to global namespace
Bug Fixes
- Resolved mypy type variance issues with generic types
Contributors
Thanks to:
Full Changelog: 0.5.0...0.5.1
0.5.0
What's Changed
Core Improvements
- Reworked core Swarm API to be fully stateless for better composability
- Added type-safe structured outputs with Pydantic model support
- Implemented new events for managing agent flow (activate, begin, complete, response)
- Added TypeVar type checking trick for Pydantic bound generics
- Introduced parse response method for handling partial/full agent responses
Developer Experience
- Added chat components built on top of Swarm and SwarmTeam
- Simplified field names and event model naming for consistency
- Improved type safety around response formats
- Added new examples showcasing chat and team chat functionality
- Enhanced documentation with stateless architecture examples
Breaking Changes
- Swarm is now fully stateless - state management moved to Chat components
- SwarmTeam redesigned to be stateless with streaming API support
- Event handling requires using new event types
- get_result renamed to get_return_value for ReturnableAsyncGenerator
Migration Notes
# Before - Stateful Swarm
swarm = Swarm()
swarm.add_message(Message(role="user", content="Hello"))
result = await swarm.execute(agent)
# After - Stateless Swarm with Chat
chat = LiteChat()
stream = chat.send_message("Hello", agent=agent)
result = await stream.get_return_value()
# Before - Stateful SwarmTeam
team = SwarmTeam(swarm=swarm, members=members, task_definitions=task_definitions)
session = await team.create_session()
result = await session.execute_plan(plan)
# After - Stateless SwarmTeam with Chat
team_chat = LiteTeamChat(swarm=swarm, members=members, task_definitions=task_definitions)
stream = team_chat.send_message("Create a web app")
result = await stream.get_return_value()
Removed
- Obsolete MessageStore, ContextManager, EventHandler components
- Redundant unwrap utils and ambiguous messages file
- Deprecated types and components
- Session management from chat components
Contributors
Thanks to:
Full Changelog: 0.4.0...0.5.0
0.4.0
What's Changed
Core Improvements
- Introduced ReturnableAsyncGenerator for unified event streaming API
- Added RAG strategy configuration type for context optimization control
- Added tool call result field for improved result handling
- Implemented serialization support for agent instructions and LLM tools
Developer Experience
- Refactored event streaming architecture with cleaner separation of concerns
- Embedded completion response into agent response model
- Simplified event types by removing redundant "Swarm" prefix
- Enhanced documentation with up-to-date streaming examples
- Updated event handler to use new streaming API
Breaking Changes
- Removed SwarmStream module in favor of ReturnableAsyncGenerator
- Removed redundant tool call event in favor of result-only events
- Event handling now requires handling event types instead of direct responses
- Streaming API now yields events instead of response chunks
Migration Notes
# Before
stream = swarm.stream(agent, prompt="Hello")
async for response in stream:
print(response.delta.content)
# After
stream = swarm.stream(agent, prompt="Hello")
async for event in stream:
if event.type == "agent_response_chunk":
print(event.chunk.completion.delta.content)
Contributors
Thanks to:
Full Changelog: 0.3.0...0.4.0
0.3.0
What's Changed
Core Improvements
- Added async interface to MessageStore for better I/O performance
- Introduced batch operations for message management (add_messages, remove_messages)
- Unified ContextManager interface with create/optimize/find methods
- Enhanced usage and cost tracking with proper accumulation
Developer Experience
- Renamed response types to better reflect streaming nature (AgentResponseChunk)
- Updated event types to match new response chunk naming convention
- Improved context management with centralized data access
- Enhanced documentation with updated examples and protocols
Bug Fixes
- Fixed usage statistics accumulation in streaming responses
Breaking Changes
- Renamed
AgentResponse
toAgentResponseChunk
- Renamed
CompletionResponse
toCompletionResponseChunk
- Updated event types to use new chunk naming
- MessageStore methods now require async/await
Contributors
Thanks to:
Full Changelog: 0.2.0...0.3.0
0.2.0
What's Changed
Core Improvements
- Added message management system with MessageStore, MessageIndex, and ContextManager
- Introduced event system with ConsoleEventHandler and SwarmEventHandler
- Added SwarmStream wrapper for improved response handling
- Enhanced error handling with retry mechanisms and backoff strategies
Developer Experience
- Added new REPL commands for optimization and search
- Improved type system with stricter checks
- Enhanced message and context management
- Updated examples to use new event system
Bug Fixes
- Fixed context update and retry mechanism issues
- Improved tool call pair filtering
- Enhanced response format handling
- Fixed variable initialization and error logging
Cleanup
- Removed legacy stream handler and summarizer
- Cleaned up unused types and context keys
Contributors
Thanks to:
Full Changelog: 0.1.1...0.2.0
0.1.1
What's Changed
- Add the py.typed file to make the package PEP 561 compliant, ensuring full support for type checkers like mypy
Contributors
Thanks to:
Full Changelog: 0.1.0...0.1.1
0.1.0
What's Changed
- Initial release of LiteSwarm framework
- Core agent system with LLM-agnostic design
- Experimental SwarmTeam for multi-agent orchestration
- Structured outputs with OpenAI compatibility
- Comprehensive examples and documentation
Contributors
Thanks to:
Full Changelog: https://github.com/GlyphyAI/liteswarm/commits/0.1.0