Skip to content

About

An unofficial Swift SDK for the General Agents API.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

An unofficial Swift SDK for the General Agents API.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages