About Swiftagentkit
Swiftagentkit is an MCP server published by JamieScanlon in the Developer Tools category: a set of tools for building local AI agents in swift. MCP, A2A, intercommunication, etc. It has been installed 0 times through Conduid.
The repository has 11 stars and 1 forks, with the last commit 6 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx swiftagentkitThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Swiftagentkit
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
SwiftAgentKit
A Swift framework for building AI agents with support for Model Context Protocol (MCP) and Agent-to-Agent (A2A) communication.
Overview
SwiftAgentKit provides a modular foundation for building AI agents that can:
- Connect to MCP-compliant model servers and tools
- Communicate with other A2A-compliant agents
- Register local function tools with EasyJSON arguments
- Make HTTP requests and handle streaming responses
- Execute shell commands and manage subprocesses
- Use structured logging for debugging and monitoring
- Integrate with popular AI providers (OpenAI, Anthropic, Gemini)
- Build composable tool-aware adapters with A2A and MCP capabilities
- Extend agents with Agent Skills for modular, on-demand instruction sets
The framework is designed with a simple, direct API - no unnecessary abstractions or configuration objects.
Modules
| Module | Description | Documentation |
|---|---|---|
| SwiftAgentKit | Core networking and utilities | SwiftAgentKit.md · LLM state & observation (StatefulLLM, QueuedLLM, state types) |
| SwiftAgentKitMCP | Model Context Protocol support | MCP.md |
| SwiftAgentKitA2A | Agent-to-Agent communication | A2A.md |
| SwiftAgentKitAdapters | AI provider adapters and tool-aware architecture | SwiftAgentKitAdapters.md |
| SwiftAgentKitOrchestrator | LLM orchestrator with MCP and A2A support | SwiftAgentKitOrchestrator.md · README |
| SwiftAgentKitSkills | Agent Skills specification support | SwiftAgentKitSkills.md |
Quick Start
Installation
Add SwiftAgentKit to your project:
dependencies: [
.package(url: "https://github.com/JamieScanlon/SwiftAgentKit.git", from: "0.1.3")
]
Importing Modules
Add the products you want to use to your target dependencies:
.target(
name: "YourTarget",
dependencies: [
.product(name: "SwiftAgentKit", package: "SwiftAgentKit"),
.product(name: "SwiftAgentKitA2A", package: "SwiftAgentKit"), // Optional
.product(name: "SwiftAgentKitMCP", package: "SwiftAgentKit"), // Optional
.product(name: "SwiftAgentKitAdapters", package: "SwiftAgentKit"), // Optional
.product(name: "SwiftAgentKitSkills", package: "SwiftAgentKit"), // Optional
]
)
Basic Usage
import SwiftAgentKit
import SwiftAgentKitMCP
import SwiftAgentKitA2A
import SwiftAgentKitAdapters
// Use the modules as needed
let apiManager = RestAPIManager()
let mcpManager = MCPManager()
let a2aManager = A2AManager()
// Create AI adapters with tool capabilities
let adapter = AdapterBuilder()
.withLLM(OpenAIAdapter(apiKey: "your-key"))
.build()
print("SwiftAgentKit initialized")
Local Function Tools (EasyJSON)
import SwiftAgentKit
let localConfig = LocalFunctionToolsConfig(functions: [
LocalFunctionDefinition(
name: "get_weather",
description: "Get weather by city",
parameters: [
.init(name: "city", description: "City name", type: "string", required: true)
]
)
])
let provider = LocalFunctionToolProvider(config: localConfig) { toolName, arguments, toolCallId in
guard case .object(let args) = arguments,
case .string(let city) = args["city"] else {
return ToolResult(success: false, content: "", toolCallId: toolCallId, error: "Missing city argument")
}
return ToolResult(success: true, content: "Weather in \(city): sunny", toolCallId: toolCallId)
}
let toolManager = ToolManager(providers: [provider])
Examples
Run the examples to see SwiftAgentKit in action:
# Basic networking example
swift run BasicExample
# MCP client example
swift run MCPExample
# A2A client example
swift run A2AExample
# AI adapters example
swift run AdaptersExample
# Tool-aware adapters example
swift run ToolAwareExample
# LLM orchestrator example
swift run OrchestratorExample
# Raw function tools example
swift run RawFunctionToolsExample
Documentation
LLM wrappers & state (read this when integrating an app):
- LLM state and observation —
StatefulLLM,QueuedLLM,LLMRuntimeState,LLMRequestState,AgenticLoopState, and what to subscribe to.
Module guides:
- SwiftAgentKit Module — Core networking, utilities, logging bootstrap
- LLMProtocolAdapter — A2A adapter,
agenticLoopUpdates, per-call FIFO notes - Agentic loop pattern — Tool loop behavior inside
LLMProtocolAdapter - SwiftAgentKitOrchestrator — Orchestrator,
agenticLoopUpdates - MCP Module — Model Context Protocol
- A2A Module — Agent-to-Agent
- SwiftAgentKitAdapters Module — Provider adapters and tool-aware architecture
- SwiftAgentKitSkills Module — Agent Skills specification
Logging
All modules use Swift Logging for structured logging, providing cross-platform logging capabilities for debugging and monitoring.
Requirements
- macOS 13.0+
- Swift 5.9+
License
MIT License - see LICENSE file for details.
README mirrored from the source repository yesterday. The original is authoritative.