SwiftAgents  by christopherkarani

Autonomous AI agent framework for Swift

Created 1 month ago
262 stars

Top 97.2% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

SwiftAgents is a native Swift framework designed for building autonomous AI agents across Apple platforms and Linux servers. It provides developers with a comprehensive toolkit for agent reasoning, memory management, tool integration, and multi-agent orchestration, aiming to simplify and standardize AI agent development within the Swift ecosystem.

How It Works

The framework leverages Swift 6.2's advanced concurrency features to ensure safe and performant agent execution. It supports core agent patterns such as ReAct, PlanAndExecute, and ToolCalling. Developers can define type-safe tools using the @Tool macro and integrate various memory systems, including conversation, summary, and vector-based storage. Multi-agent orchestration is facilitated through a supervisor agent capable of intelligent routing to specialized agents, powered by LLM-based strategies.

Quick Start & Requirements

  • Installation: Swift Package Manager. Add https://github.com/chriskarani/SwiftAgents.git to your project's Package Dependencies.
  • Prerequisites: Swift 6.2+.
    • Apple Platforms: iOS 17+, macOS 14+, watchOS 10+, tvOS 17+, visionOS 1+.
    • Linux: Ubuntu 22.04+ with Swift 6.2.
  • Notes: SwiftData persistence capabilities are exclusive to Apple platforms.

Highlighted Details

  • Agent Patterns: Supports ReAct, PlanAndExecute, and ToolCalling agent archetypes.
  • Type-Safe Tools: Utilizes the @Tool macro for straightforward tool definition and registration.
  • Memory Systems: Offers conversation, summary, and vector memory backends for state management.
  • Multi-Agent Orchestration: Features a supervisor agent with LLM routing for coordinating specialized agents.
  • Real-time Streaming: Enables streaming agent outputs for responsive user interfaces.
  • Guardrails: Includes input and output validation mechanisms for enhanced safety and control.
  • MCP Integration: Provides seamless integration with Model Context Protocol servers.
  • Resilience: Built-in support for retry policies, circuit breakers, fallbacks, and timeouts.

Maintenance & Community

  • Support: Primarily managed through GitHub Issues and Discussions.
  • Social: Active on Twitter at @ckarani7.
  • The provided README does not detail specific core contributors, sponsorships, or a public roadmap.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Designed for broad compatibility across supported Swift environments. Note that SwiftData persistence features are limited to Apple platforms.

Limitations & Caveats

  • The SwiftData persistence functionality is restricted to Apple operating systems.
  • Requires a Swift 6.2 toolchain, which may necessitate specific environment configurations.
  • No explicit mention of alpha/beta status or known critical bugs was found in the provided text.
Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
15
Issues (30d)
1
Star History
262 stars in the last 30 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
7 more.

SuperAGI by TransformerOptimus

0.2%
17k
Open-source framework for autonomous AI agent development
Created 2 years ago
Updated 11 months ago
Starred by Wes McKinney Wes McKinney(Author of Pandas), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
22 more.

autogen by microsoft

0.5%
53k
Agentic framework for multi-agent AI applications
Created 2 years ago
Updated 3 months ago
Feedback? Help us improve.