Skip to main content

Python SDK for interacting with Headless Agents API

Project description

HeadlessAgents Python SDK 1.0.0

Welcome to the HeadlessAgents SDK documentation. This guide will help you get started with integrating and using the HeadlessAgents SDK in your project.

This SDK was generated by liblab

Versions

  • API version: 1.0.0
  • SDK version: 1.0.0

About the API

API for interacting with Headless Agents

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Python >= 3.7

Installation

To get started with the SDK, we recommend installing using pip:

pip install headlessagents

Authentication

API Key Authentication

The HeadlessAgents API uses API keys as a form of authentication. An API key is a unique identifier used to authenticate a user, developer, or a program that is calling the API.

Setting the API key

When you initialize the SDK, you can set the API key as follows:

HeadlessAgents(
    api_key="YOUR_API_KEY",
    timeout=10000
)

If you need to set or update the API key after initializing the SDK, you can use:

sdk.set_api_key("YOUR_API_KEY")

Setting a Custom Timeout

You can set a custom timeout for the SDK's HTTP requests as follows:

from headlessagents import HeadlessAgents

sdk = HeadlessAgents(timeout=10000)

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

from headlessagents import HeadlessAgents

sdk = HeadlessAgents(
    api_key="YOUR_API_KEY",
    timeout=10000
)

result = sdk.system.health_check()

print(result)

Async Usage

The SDK includes an Async Client for making asynchronous API requests. This is useful for applications that need non-blocking operations, like web servers or apps with a graphical user interface.

import asyncio
from headlessagents import HeadlessAgentsAsync

sdk = HeadlessAgentsAsync(
    api_key="YOUR_API_KEY",
    timeout=10000
)


async def main():
  result = await sdk.system.health_check()
  print(result)

asyncio.run(main())

Services

The SDK provides various services to interact with the API.

Below is a list of all available services:
Name
system
agents
execution
analysis
schema
threads

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models:
Name Description
HealthCheckOkResponse
AgentCreate
Agent
AgentUpdate
CallAgentRequest
CallAgentOkResponse
DigestRequest
CreateDigestOkResponse
SchemaCreateRequest
CreateSchemaOkResponse
Thread
ThreadMessage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

headlessagents-1.0.0.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

headlessagents-1.0.0-py3-none-any.whl (49.3 kB view details)

Uploaded Python 3

File details

Details for the file headlessagents-1.0.0.tar.gz.

File metadata

  • Download URL: headlessagents-1.0.0.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for headlessagents-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1776d6c42d08105dadf5623c4567409542041078cc5f6360ee227b4267fab133
MD5 7fe6d3ac098f5944d0be44e87f2b4577
BLAKE2b-256 ad113c896c69dd2f33388ae8629fd7fef71b4c62bc666e4570372caf5c91d247

See more details on using hashes here.

File details

Details for the file headlessagents-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: headlessagents-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 49.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for headlessagents-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eacbff217c4aaed74370191a9b6bb1a3c4385876ae3e25bf4d37fd837ad2b98c
MD5 444b8a7443ac291ff1bc65b494f6d68d
BLAKE2b-256 bf06f67aa28b1bd04e3fc106e24dbce84714e30ad9c7fc4d34958fdcdcc81965

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page