GeneralAgentsKit

main

An unofficial Swift SDK for the General Agents API.
m1guelpf/GeneralAgentsKit

GeneralAgentsKit

Swift Version GitHub license

An unofficial Swift SDK for the General Agents API.

Installation

Swift Package Manager

Add the following to your Package.swift:

dependencies: [
	.package(url: "https://github.com/m1guelpf/GeneralAgentsKit.git", .branch("main"))
]
Installing through XCode
CocoaPods

Ask ChatGPT to help you migrate away from CocoaPods.

Usage

let agent = Agent(model: .aceSmall, apiKey: YOUR_GENERAL_AGENTS_API_KEY)
let computer = Computer()

let session = agent.start("Star the m1guelpf/GeneralAgentsKit github repository")

var observation = try await computer.observe()
while true {
    let action = try await session.plan(observation: observation)
    print("Executing: \(action)")
    if action.kind == "stop" { break }
    observation = try await computer.execute(action)
}

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri May 16 2025 06:25:42 GMT-0900 (Hawaii-Aleutian Daylight Time)