Skip to main content

Documentation Index

Fetch the complete documentation index at: https://astralform.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

  • Xcode 15+
  • iOS 16+ deployment target
  • An Astralform account at astralform.ai

Step 1: Create a Project

  1. Go to astralform.ai and sign in
  2. Click New Project
  3. Enter a project name and click Create
  4. Copy your API Key from the project settings

Step 2: Install the SDK

Add Astralform to your Xcode project using Swift Package Manager:
  1. In Xcode, go to File > Add Package Dependencies
  2. Enter the repository URL:
    https://github.com/astralform-ai/Astralform-iOS-SDK
    
  3. Select the latest version and click Add Package

Step 3: Configure the Client

Initialize the Astralform client with your API key:
import Astralform

let client = AstralformClient(
    baseURL: URL(string: "https://api.astralform.ai")!,
    apiKey: "your-api-key"
)
Never hardcode API keys in production. Use environment variables or secure storage.

Step 4: Send Your First Message

Create a conversation and send a message:
// Create a new conversation
let conversation = try await client.createConversation()

// Send a message and stream the response
for try await event in client.streamChat(
    conversationId: conversation.id,
    message: "Hello! What can you help me with?"
) {
    switch event {
    case .contentBlock(let text):
        print(text, terminator: "")
    case .messageStop:
        print("\n[Done]")
    case .toolUse(let tool):
        // Handle client-side tool calls if needed
        break
    }
}

Step 5: Configure LLM Provider

In your dashboard, configure which LLM provider to use:
  1. Go to Agents and click the Main Agent
  2. On the Model tab, select a provider (OpenAI, Anthropic, Groq, or Ollama)
  3. Enter your provider API key
  4. Choose the model (e.g., gpt-4o, claude-sonnet-4-20250514)
  5. Click Save

Next Steps

Client Tools

Add device capabilities like Calendar and Contacts

Server MCP

Configure backend MCP servers

Platform Tools

Enable built-in tools like web search

API Reference

Explore the full API