Skip to content

m1guelpf/GeneralAgentsKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

5 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages