### Install Anima Go SDK Source: https://github.com/anima-labs-ai/go/blob/main/README.md Use the go get command to add the Anima SDK to your project. Requires Go 1.22 or later. ```bash go get github.com/anima-labs-ai/go ``` -------------------------------- ### Quick Start Agent Creation and Messaging Source: https://github.com/anima-labs-ai/go/blob/main/README.md Initialize the Anima client, create an agent, and send an email using the SDK. ```go package main import ( "context" "fmt" "log" anima "github.com/anima-labs-ai/go" ) func main() { client := anima.NewClient("ak_live_your_api_key") ctx := context.Background() // Create an agent. agent, err := client.Agents.Create(ctx, anima.CreateAgentParams{ OrgID: "org_123", Name: "My Agent", Slug: "my-agent", }) if err != nil { log.Fatal(err) } fmt.Printf("Created agent: %s\n", agent.ID) // Send an email. msg, err := client.Messages.SendEmail(ctx, anima.SendEmailParams{ AgentID: agent.ID, To: []string{"user@example.com"}, Subject: "Hello from Anima", Body: "Sent by an AI agent.", }) if err != nil { log.Fatal(err) } fmt.Printf("Sent message: %s (status: %s)\n", msg.ID, msg.Status) } ``` -------------------------------- ### Create a webhook with authentication and rate limits Source: https://github.com/anima-labs-ai/go/blob/main/README.md Create a webhook with specific events, authentication schemes, and delivery throttling settings. ```go rateLimit := 120 maxAttempts := 5 wh, err := client.Webhooks.Create(ctx, anima.CreateWebhookParams{ URL: "https://example.com/anima/webhook", Events: []anima.WebhookEventType{anima.WebhookEventMessageReceived}, // Auth Anima sends to your endpoint on each delivery. Also available: // anima.NewBasicAuth(user, pass), anima.NewCustomHeaderAuth(name, value), anima.NewNoAuth(). AuthConfig: anima.NewBearerAuth("your-endpoint-token"), RateLimitPerMinute: &rateLimit, // omit for unlimited MaxAttempts: &maxAttempts, // 1-10, default 3 }) if err != nil { log.Fatal(err) } fmt.Println("created webhook", wh.ID, "with auth scheme", wh.AuthType) ``` -------------------------------- ### Configure Client with Functional Options Source: https://github.com/anima-labs-ai/go/blob/main/README.md Customize the client behavior using functional options like BaseURL, Timeout, and MaxRetries. ```go import "time" client := anima.NewClient("ak_live_...", anima.WithBaseURL("https://api.staging.useanima.sh"), anima.WithTimeout(10 * time.Second), anima.WithMaxRetries(5), ) ``` -------------------------------- ### Connect Extensions Source: https://github.com/anima-labs-ai/go/blob/main/README.md Connect an agent using a master key or an agent-specific key. TTL options include 15m, 1h, or session. ```go // Master key: pass the agent to connect as. res, err := client.Extension.Connect(ctx, anima.ConnectExtensionParams{ AgentID: "agent_123", TTL: "1h", // "15m", "1h", or "session" }) fmt.Printf("Open to connect: %s\n", res.ConnectURL) // Agent key: omit AgentID — the key already identifies the agent. res, err = client.Extension.Connect(ctx, anima.ConnectExtensionParams{ TTL: "session", }) if res.ExpiresAt != nil { fmt.Printf("Connection expires at %s\n", *res.ExpiresAt) } ``` -------------------------------- ### client.Extension.Connect Source: https://github.com/anima-labs-ai/go/blob/main/README.md Establishes a connection for an agent extension. ```APIDOC ## client.Extension.Connect ### Description Connects an agent extension, returning a connection URL. Supports master key (with AgentID) or agent key (without AgentID) authentication. ``` -------------------------------- ### client.Webhooks.Create Source: https://github.com/anima-labs-ai/go/blob/main/README.md Creates a new webhook with specified events, authentication, and delivery settings. ```APIDOC ## client.Webhooks.Create ### Description Registers a new webhook endpoint with Anima, including custom authentication and delivery throttling settings. ### Parameters - **ctx** (context.Context) - Required - The request context. - **params** (anima.CreateWebhookParams) - Required - Webhook configuration including URL, Events, AuthConfig, RateLimitPerMinute, and MaxAttempts. ### Example ```go wh, err := client.Webhooks.Create(ctx, anima.CreateWebhookParams{ URL: "https://example.com/anima/webhook", Events: []anima.WebhookEventType{anima.WebhookEventMessageReceived}, AuthConfig: anima.NewBearerAuth("your-endpoint-token"), RateLimitPerMinute: &rateLimit, MaxAttempts: &maxAttempts, }) ``` ``` -------------------------------- ### Configure Custom HTTP Client Source: https://github.com/anima-labs-ai/go/blob/main/README.md Provide a custom http.Client to the Anima SDK using the WithHTTPClient option. ```go import "net/http" httpClient := &http.Client{ Timeout: 15 * time.Second, Transport: &http.Transport{ MaxIdleConns: 100, }, } client := anima.NewClient("ak_live_...", anima.WithHTTPClient(httpClient), ) ``` -------------------------------- ### Provisioning Resources via Requests Source: https://github.com/anima-labs-ai/go/blob/main/README.md Agents request resources like vaults or phone numbers, which owners then approve or decline. The agent polls for the status of the request. ```go // As the agent: ask for a vault. Reason is shown verbatim to the owner. req, err := client.ProvisioningRequests.Create(ctx, anima.CreateProvisioningRequestParams{ Resource: anima.ProvisionableResourceVault, Reason: "To store the Stripe key so I can issue refunds", }) // EmailSent false does NOT mean the request failed — it is live in the console // either way — but nobody was told, so nothing happens until someone looks. if !req.EmailSent { log.Println("owner was not notified") } // Poll for the decision. DecidedNote carries the owner's reason for a decline, // so a second attempt can address it instead of repeating the first. current, err := client.ProvisioningRequests.Get(ctx, req.RequestID) if current.Status == anima.ProvisioningRequestApproved { log.Println("provisioned:", *current.ProvisionedID) } // As the owner (master key only): decide. _, err = client.ProvisioningRequests.Approve(ctx, req.RequestID, "") _, err = client.ProvisioningRequests.Decline(ctx, req.RequestID, "Tell me which API first") // A phone number takes options; Starter+ plans only. _, err = client.ProvisioningRequests.Create(ctx, anima.CreateProvisioningRequestParams{ Resource: anima.ProvisionableResourcePhoneNumber, Reason: "To receive delivery notifications", Options: &anima.ProvisioningOptions{CountryCode: "US", AreaCode: "415"}, }) ``` -------------------------------- ### Manage Vault Credentials Source: https://github.com/anima-labs-ai/go/blob/main/README.md Create vault credentials with manual or server-side generated passwords. ```go cred, err := client.Vault.CreateCredential(ctx, anima.CreateVaultCredentialParams{ AgentID: "agent_123", Type: anima.CredentialTypeLogin, Name: "GitHub", Login: &anima.VaultLoginData{ Username: "bot@company.com", Password: "s3cr3t", }, }) // Or have the vault generate the password server-side — it is stored // with the credential and never returned; the response carries only the // masked credential ref. (Defaults: 24 chars, all character classes.) cred, err = client.Vault.CreateCredential(ctx, anima.CreateVaultCredentialParams{ AgentID: "agent_123", Type: anima.CredentialTypeLogin, Name: "Acme Portal", Login: &anima.VaultLoginData{ Username: "bot@company.com", }, GeneratePassword: &anima.GeneratePasswordParams{Length: 32}, }) ``` -------------------------------- ### Manage Addresses Source: https://github.com/anima-labs-ai/go/blob/main/README.md Create and validate physical addresses associated with an agent. ```go // Create an address for an agent. addr, err := client.Addresses.Create(ctx, anima.CreateAddressParams{ AgentID: "agent_123", Line1: "123 Main St", City: "San Francisco", State: "CA", PostalCode: "94105", Country: "US", }) // Validate the address. validation, err := client.Addresses.Validate(ctx, addr.ID, "agent_123") fmt.Printf("Deliverable: %v\n", validation.Deliverable) ``` -------------------------------- ### Register and Search Agents Source: https://github.com/anima-labs-ai/go/blob/main/README.md Register an agent in the public registry or search for existing agents. ```go // Register an agent in the public registry. entry, err := client.Registry.Register(ctx, anima.RegisterAgentParams{ DID: "did:anima:agent_123", Name: "My Agent", }) // Search the registry. results, err := client.Registry.Search(ctx, anima.RegistrySearchParams{ Query: "email assistant", }) ``` -------------------------------- ### Anomaly Detection and Quarantine Source: https://github.com/anima-labs-ai/go/blob/main/README.md Create rules to detect anomalies, list triggered alerts, and quarantine misbehaving agents. ```go // Create an anomaly detection rule. rule, err := client.Anomaly.CreateRule(ctx, "org_123", anima.CreateAnomalyRuleInput{ Name: "High email volume", Metric: anima.AnomalyMetricEmailSendRate, Condition: anima.AnomalyConditionZScoreGT, Threshold: 3.0, Severity: anima.AnomalySeverityCritical, }) // List triggered alerts. alerts, err := client.Anomaly.ListAlerts(ctx, "org_123", &anima.AnomalyAlertListParams{ Status: anima.AnomalyAlertStatusTriggered, }) // Quarantine a misbehaving agent. q, err := client.Anomaly.Quarantine(ctx, "org_123", "agent_123", anima.QuarantineInput{ Level: anima.QuarantineLevelHard, Reason: "Unusual email send volume", }) ``` -------------------------------- ### client.Agents.ListAutoPaging Source: https://github.com/anima-labs-ai/go/blob/main/README.md Iterates through all available agents automatically using the ListAutoPaging helper. ```APIDOC ## client.Agents.ListAutoPaging ### Description Automatically iterates through paginated agent results. ### Parameters - **params** (anima.AgentListParams) - Required - Configuration including OrgID and optional Limit. ### Example ```go iter := client.Agents.ListAutoPaging(&anima.AgentListParams{ ListParams: anima.ListParams{Limit: 50}, OrgID: "org_123", }) for iter.Next(ctx) { agent := iter.Current() fmt.Println(agent.Name) } ``` ``` -------------------------------- ### Send Email with Attachments and Threading Source: https://github.com/anima-labs-ai/go/blob/main/README.md Send emails with attachments (base64 or URL) and reply threading support using InReplyTo and References fields. ```go msg, err := client.Messages.SendEmail(ctx, anima.SendEmailParams{ AgentID: "agent_123", To: []string{"user@example.com"}, Subject: "Re: Hello", Body: "Reply with the report attached", Attachments: []anima.EmailAttachment{ {Filename: "report.pdf", ContentType: "application/pdf", Content: base64Bytes}, {URL: "https://example.com/logo.png"}, }, InReplyTo: "", References: []string{"", ""}, }) ``` -------------------------------- ### ProvisioningRequests.Create Source: https://github.com/anima-labs-ai/go/blob/main/README.md Creates a new provisioning request for a resource like a vault or phone number. The request is submitted for owner approval. ```APIDOC ## ProvisioningRequests.Create ### Description Creates a new provisioning request for a resource. The request is submitted for owner approval, and the agent receives the result upon approval. ### Parameters - **ctx** (context.Context) - Required - The request context. - **params** (anima.CreateProvisioningRequestParams) - Required - Parameters including Resource type, Reason, and optional configuration. ``` -------------------------------- ### Manage Inboxes Source: https://github.com/anima-labs-ai/go/blob/main/README.md Create, retrieve, list, update, and delete inboxes. The server generates an address if fields are omitted during creation. ```go // Create an inbox (all fields optional — the server generates an address). inbox, err := client.Inboxes.Create(ctx, anima.CreateInboxParams{ Username: "support", DisplayName: "Support Inbox", AgentID: "agent_123", }) // Get, list, update, delete. inbox, err = client.Inboxes.Get(ctx, inbox.ID) page, err := client.Inboxes.List(ctx, &anima.InboxListParams{Query: "support"}) name := "Support (EU)" inbox, err = client.Inboxes.Update(ctx, inbox.ID, anima.UpdateInboxParams{DisplayName: &name}) err = client.Inboxes.Delete(ctx, inbox.ID) ``` -------------------------------- ### List paginated results with ListAutoPaging Source: https://github.com/anima-labs-ai/go/blob/main/README.md Use ListAutoPaging to automatically iterate through all pages of a list endpoint. ```go iter := client.Agents.ListAutoPaging(&anima.AgentListParams{ ListParams: anima.ListParams{Limit: 50}, OrgID: "org_123", }) for iter.Next(ctx) { agent := iter.Current() fmt.Println(agent.Name) } if err := iter.Err(); err != nil { log.Fatal(err) } ``` -------------------------------- ### Manage Agent Identity and Credentials Source: https://github.com/anima-labs-ai/go/blob/main/README.md Retrieve DID documents, verify credentials, and manage verifiable credentials for an agent. ```go // Get an agent's DID document. did, err := client.Identity.GetDID(ctx, "agent_123") fmt.Printf("DID: %s\n", did.ID) // Verify a credential. result, err := client.Identity.VerifyCredential(ctx, "eyJhbGciOi...") fmt.Printf("Valid: %v\n", result.Valid) // Verifiable credentials: list, issue (master key, org-attestation types // only — platform-reserved types are auto-issued on verification events), // and revoke. creds, err := client.Identity.ListCredentials(ctx, "agent_123") vc, err := client.Identity.IssueCredential(ctx, "agent_123", anima.IssueCredentialParams{ Type: anima.VCTypeAddressVerified, Claims: map[string]interface{}{"country": "BG"}, }) vc, err = client.Identity.RevokeCredential(ctx, "agent_123", vc.ID) ``` -------------------------------- ### Fetch a single page manually Source: https://github.com/anima-labs-ai/go/blob/main/README.md Fetch a specific page of results manually using the List method. ```go page, err := client.Agents.List(ctx, &anima.AgentListParams{ ListParams: anima.ListParams{Limit: 10}, }) for _, agent := range page.Items { fmt.Println(agent.Name) } ``` -------------------------------- ### Managing Audit Logs Source: https://github.com/anima-labs-ai/go/blob/main/README.md List audit logs with specific filters or export them in CSV format. ```go // List audit logs with filters. page, err := client.Audit.List(ctx, "org_123", &anima.AuditLogListParams{ ActorType: anima.AuditActorAgent, ResourceType: "message", From: "2026-01-01T00:00:00Z", To: "2026-03-01T00:00:00Z", }) // Export audit logs as CSV. export, err := client.Audit.Export(ctx, "org_123", &anima.AuditLogExportParams{ Format: anima.AuditExportFormatCSV, From: "2026-01-01T00:00:00Z", }) fmt.Printf("Download: %s (%d records)\n", export.URL, export.RecordCount) ``` -------------------------------- ### Manage Email Drafts Source: https://github.com/anima-labs-ai/go/blob/main/README.md Create, retrieve, list, delete, and send email drafts. Sending a draft converts it into a message and deletes the draft. ```go draft, err := client.Drafts.Create(ctx, anima.CreateDraftParams{ AgentID: "agent_123", To: []string{"user@example.com"}, Subject: "Quarterly report", Body: "Draft body — review before sending", }) // Get, list, delete. draft, err = client.Drafts.Get(ctx, draft.ID) page, err := client.Drafts.List(ctx, &anima.DraftListParams{AgentID: "agent_123"}) deleted, err := client.Drafts.Delete(ctx, draft.ID) // Send: returns the new Message; the draft id 404s afterwards. msg, err := client.Drafts.Send(ctx, draft.ID) ``` -------------------------------- ### client.Agents.List Source: https://github.com/anima-labs-ai/go/blob/main/README.md Fetches a single page of agents manually. ```APIDOC ## client.Agents.List ### Description Retrieves a single page of agent results based on the provided parameters. ### Parameters - **ctx** (context.Context) - Required - The request context. - **params** (anima.AgentListParams) - Required - Configuration including Limit. ### Example ```go page, err := client.Agents.List(ctx, &anima.AgentListParams{ ListParams: anima.ListParams{Limit: 10}, }) ``` ``` -------------------------------- ### Handle SDK Errors Source: https://github.com/anima-labs-ai/go/blob/main/README.md Use errors.Is to check for specific sentinel errors and errors.As to extract detailed API error information. ```go import "errors" // Check error category with errors.Is _, err := doSomething() if errors.Is(err, anima.ErrNotFound) { fmt.Println("Resource not found") } else if errors.Is(err, anima.ErrRateLimit) { fmt.Println("Rate limited, try again later") } else if errors.Is(err, anima.ErrAuthentication) { fmt.Println("Invalid API key") } else if errors.Is(err, anima.ErrValidation) { fmt.Println("Invalid request parameters") } // Extract detailed error info with errors.As var apiErr *anima.APIError if errors.As(err, &apiErr) { fmt.Printf("Status: %d\n", apiErr.Status) fmt.Printf("Code: %s\n", apiErr.Code) fmt.Printf("Message: %s\n", apiErr.Message) if apiErr.RetryAfter > 0 { fmt.Printf("Retry after %d seconds\n", apiErr.RetryAfter) } } ``` -------------------------------- ### Send Email Source: https://github.com/anima-labs-ai/go/blob/main/README.md Send an email using the Messages service by providing the agent ID, recipient, subject, and body content. ```go msg, err := client.Messages.SendEmail(ctx, anima.SendEmailParams{ AgentID: "agent_123", To: []string{"user@example.com"}, Subject: "Hello", Body: "Plain text body", BodyHTML: "

Hello

", }) ``` -------------------------------- ### Verify Webhook Event in Go Source: https://github.com/anima-labs-ai/go/blob/main/README.md This handler reads the raw request body, constructs the webhook event using the provided headers and secret, and processes the event based on its type. Ensure the raw body is used, as decoding and re-encoding will invalidate the signature. ```go import "net/http" func webhookHandler(w http.ResponseWriter, r *http.Request) { // The raw body. A body that has been decoded and re-encoded will not // verify, even for a genuine delivery — the MAC covers bytes. payload, _ := io.ReadAll(r.Body) headers := anima.WebhookHeaders{ Signature: r.Header.Get("X-Anima-Signature"), Timestamp: r.Header.Get("X-Anima-Timestamp"), } event, err := anima.ConstructWebhookEvent(payload, headers, "whsec_your_secret", nil) if err != nil { http.Error(w, "Invalid signature", http.StatusForbidden) return } // The payload is flat — there is no "data" envelope to unwrap. Fields holds // every field, keyed by its wire name. switch event.Event { case anima.WebhookEventAgentCreated: fmt.Printf("New agent: %v\n", event.Fields["name"]) case anima.WebhookEventMessageReceived: fmt.Printf("Message from: %v\n", event.Fields["fromAddress"]) } // Retries reuse X-Anima-Delivery-Id, so it is the idempotency key. _ = r.Header.Get("X-Anima-Delivery-Id") w.WriteHeader(http.StatusOK) } ``` -------------------------------- ### Agent-to-Agent Communication Source: https://github.com/anima-labs-ai/go/blob/main/README.md Submit tasks to other agents and check their status. ```go // Submit a task to another agent. task, err := client.A2A.SubmitTask(ctx, "agent_456", anima.SubmitA2ATaskParams{ Input: map[string]string{"query": "summarize this document"}, }) // Check task status. task, err = client.A2A.GetTask(ctx, "agent_456", task.ID) fmt.Printf("Status: %s\n", task.Status) ``` -------------------------------- ### anima.ConstructWebhookEvent Source: https://github.com/anima-labs-ai/go/blob/main/README.md Verifies the webhook signature and constructs an event object from the raw request body and headers. ```APIDOC ## anima.ConstructWebhookEvent ### Description Verifies the HMAC-SHA256 signature of an incoming webhook delivery and parses the event data. The signature is computed over the concatenation of the timestamp and the raw request body. ### Parameters - **payload** ([]byte) - Required - The raw request body bytes. - **headers** (anima.WebhookHeaders) - Required - Struct containing X-Anima-Signature and X-Anima-Timestamp headers. - **secret** (string) - Required - The webhook secret key (whsec_...). - **options** (interface{}) - Optional - Additional configuration options. ### Returns - **event** (*anima.Event) - The parsed webhook event object. - **err** (error) - An error if the signature verification fails. ``` -------------------------------- ### Browsing Voice Catalog Source: https://github.com/anima-labs-ai/go/blob/main/README.md List available voices, optionally filtered by language or gender, and access sample audio URLs. ```go // List every voice, or filter by language / gender. spanish, err := client.Voices.List(ctx, anima.ListVoicesParams{Language: "es"}) if err != nil { log.Fatal(err) } for _, v := range spanish.Voices { fmt.Println(v.ID, v.Name, v.Language, v.Descriptors) // SampleURL is a vendor-neutral clip served from the API host // (empty until a sample has been generated for that voice). if v.SampleURL != "" { fmt.Println("preview:", v.SampleURL) } } ``` -------------------------------- ### client.Identity Source: https://github.com/anima-labs-ai/go/blob/main/README.md Manages agent DID documents and verifiable credentials. ```APIDOC ## client.Identity Methods ### Description Operations for retrieving DID documents, verifying credentials, listing credentials, issuing new credentials, and revoking existing ones. ``` -------------------------------- ### Compliance and DSAR Management Source: https://github.com/anima-labs-ai/go/blob/main/README.md Seed compliance frameworks, view dashboard scores, and create data subject access requests (DSAR). ```go // Seed SOC 2 controls for an organization. seed, err := client.Compliance.SeedFramework(ctx, "org_123", anima.SeedFrameworkInput{ Framework: anima.ComplianceFrameworkSOC2, }) fmt.Printf("Created %d controls\n", seed.ControlsCreated) // View compliance dashboard. dashboard, err := client.Compliance.GetDashboard(ctx, "org_123") fmt.Printf("Overall score: %.1f%%\n", dashboard.OverallScore) // Create a GDPR data subject access request. dsar, err := client.Compliance.CreateDSAR(ctx, "org_123", anima.CreateDSARInput{ SubjectEmail: "user@example.com", RequestType: anima.DSARRequestTypeDeletion, }) ``` -------------------------------- ### client.Registry Source: https://github.com/anima-labs-ai/go/blob/main/README.md Registers and searches for agents in the public registry. ```APIDOC ## client.Registry Methods ### Description Register an agent with a DID and name, or search the registry for existing agents. ``` -------------------------------- ### client.Drafts Source: https://github.com/anima-labs-ai/go/blob/main/README.md Manage email drafts, including creation, retrieval, listing, deletion, and sending. ```APIDOC ## client.Drafts Operations ### Description Methods for managing email drafts. Drafts can be created, retrieved, listed, deleted, or sent as a final message. ### Methods - **Create(ctx, params)**: Creates a new draft. - **Get(ctx, id)**: Retrieves a draft by ID. - **List(ctx, params)**: Lists drafts for a specific agent. - **Delete(ctx, id)**: Deletes a draft. - **Send(ctx, id)**: Converts a draft into a sent message. ``` -------------------------------- ### client.A2A Source: https://github.com/anima-labs-ai/go/blob/main/README.md Facilitates agent-to-agent task submission and status tracking. ```APIDOC ## client.A2A Methods ### Description Submit tasks to other agents and retrieve the status of submitted tasks. ``` -------------------------------- ### client.Inboxes Source: https://github.com/anima-labs-ai/go/blob/main/README.md Methods for managing agent inboxes, including creation, retrieval, listing, updating, and deletion. ```APIDOC ## client.Inboxes Methods ### Description Manage agent inboxes through Create, Get, List, Update, and Delete operations. ### Methods - **Create(ctx, params)**: Create a new inbox. - **Get(ctx, id)**: Retrieve an inbox by ID. - **List(ctx, params)**: List inboxes matching query parameters. - **Update(ctx, id, params)**: Update an existing inbox. - **Delete(ctx, id)**: Remove an inbox. ``` -------------------------------- ### client.Addresses Source: https://github.com/anima-labs-ai/go/blob/main/README.md Manages and validates agent physical addresses. ```APIDOC ## client.Addresses Methods ### Description Create new addresses for agents and validate their deliverability. ``` -------------------------------- ### Compliance.SeedFramework Source: https://github.com/anima-labs-ai/go/blob/main/README.md Seeds compliance controls for an organization, such as SOC 2. ```APIDOC ## Compliance.SeedFramework ### Description Initializes and seeds compliance controls for a specified organization framework. ### Parameters - **ctx** (context.Context) - Required - The request context. - **orgID** (string) - Required - The organization identifier. - **input** (anima.SeedFrameworkInput) - Required - The compliance framework to seed. ``` -------------------------------- ### Perform Semantic Search Source: https://github.com/anima-labs-ai/go/blob/main/README.md Search messages by meaning using vector embeddings. An empty Results slice indicates no matches, while an APIError indicates a service outage. ```go res, err := client.Messages.SemanticSearch(ctx, anima.SemanticSearchParams{ Query: "emails about the delayed shipment", AgentID: "agent_123", // optional Limit: 5, // optional, server default 10 }) for _, hit := range res.Results { fmt.Printf("%.2f %s\n", hit.Similarity, hit.Content) } ``` -------------------------------- ### client.Vault Source: https://github.com/anima-labs-ai/go/blob/main/README.md Manages secure credentials within the agent vault. ```APIDOC ## client.Vault.CreateCredential ### Description Creates a new credential in the vault. Supports manual password entry or server-side password generation. ``` -------------------------------- ### client.Messages.SendEmail Source: https://github.com/anima-labs-ai/go/blob/main/README.md Sends an email using the specified agent. Supports plain text, HTML bodies, attachments, and reply threading. ```APIDOC ## client.Messages.SendEmail ### Description Sends an email message through the Anima platform. Supports attachments and reply threading. ### Parameters - **ctx** (context.Context) - Required - The request context. - **params** (anima.SendEmailParams) - Required - The email parameters including AgentID, To, Subject, Body, BodyHTML, Attachments, InReplyTo, and References. ``` -------------------------------- ### Voices.List Source: https://github.com/anima-labs-ai/go/blob/main/README.md Lists available voices from the multilingual catalog, with optional filtering. ```APIDOC ## Voices.List ### Description Retrieves a list of voices from the catalog, optionally filtered by language or gender. ### Parameters - **ctx** (context.Context) - Required - The request context. - **params** (anima.ListVoicesParams) - Required - Filtering parameters for the voice list. ``` -------------------------------- ### Audit.List Source: https://github.com/anima-labs-ai/go/blob/main/README.md Retrieves a list of audit logs for an organization based on specified filters. ```APIDOC ## Audit.List ### Description Lists audit logs for a specific organization with optional filtering by actor type, resource type, and date range. ### Parameters - **ctx** (context.Context) - Required - The request context. - **orgID** (string) - Required - The organization identifier. - **params** (*anima.AuditLogListParams) - Optional - Filters for the audit log query. ``` -------------------------------- ### client.Messages.SemanticSearch Source: https://github.com/anima-labs-ai/go/blob/main/README.md Performs a semantic search on messages using vector embeddings ranked by cosine similarity. ```APIDOC ## client.Messages.SemanticSearch ### Description Search messages by meaning rather than keywords using vector embeddings. ### Parameters - **ctx** (context.Context) - Required - The request context. - **params** (anima.SemanticSearchParams) - Required - Search parameters including Query, AgentID (optional), and Limit (optional). ``` -------------------------------- ### Anomaly.Quarantine Source: https://github.com/anima-labs-ai/go/blob/main/README.md Quarantines a misbehaving agent based on anomaly detection rules. ```APIDOC ## Anomaly.Quarantine ### Description Applies a quarantine level to a specific agent within an organization due to detected anomalies. ### Parameters - **ctx** (context.Context) - Required - The request context. - **orgID** (string) - Required - The organization identifier. - **agentID** (string) - Required - The agent identifier. - **input** (anima.QuarantineInput) - Required - Quarantine level and reason. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.