Skip to main content

SDK for interacting with AutoAgents.ai API

Project description

autoagents_core Python SDK

Professional AI Platform Python SDK

English | 简体中文

PyPI version License MIT

Professional Python SDK for autoagents_core AI platform, providing intuitive APIs for intelligent conversation, file processing, knowledge base management, and more.

Table of Contents

Why autoagents_core AI Python SDK?

autoagents_core AI Python SDK is a comprehensive toolkit that transforms how developers interact with AI-powered automation systems. Built for modern Python applications, it provides seamless integration with the autoagents_core AI platform.

Core Features

Intelligent Conversation

  • Streaming Chat: Real-time conversation with multi-turn interactions
  • Reasoning Process: Display AI thinking and decision-making steps
  • Multi-modal Support: Handle text, images, and files in unified interface

File Processing

  • Multi-format Support: Automatic processing of PDF, Word, images, and more
  • Smart Analysis: Extract insights and content from documents
  • Batch Operations: Handle multiple files efficiently

Knowledge Base Management

  • Complete CRUD Operations: Create, read, update, delete knowledge bases
  • Advanced Search: Semantic search and content retrieval
  • Content Organization: Structured storage and management

Pre-built Agents

  • PowerPoint Generation: Create presentations from templates and data
  • React Agents: Interactive problem-solving agents
  • Workflow Automation: Complex multi-step task orchestration
  • Data Science Tools: Analytics and visualization capabilities

Modern Architecture

  • Async Support: High-performance asynchronous API calls
  • Type Safety: Full Pydantic type validation
  • Extensible Design: Modular components for custom solutions

Why Choose autoagents_core AI Python SDK?

  • Developer-First: Intuitive APIs designed for modern Python development
  • Production-Ready: Battle-tested in enterprise environments
  • Comprehensive: Everything needed for AI automation in one package
  • Well-Documented: Extensive examples and clear API documentation

Quick Start

Prerequisites

  • Python 3.11+
  • autoagents_core AI platform account

Installation

pip install autoagents_coreai

Or install from source:

git clone https://github.com/your-repo/autoagents_core-python-sdk.git
cd autoagents_core-python-sdk
pip install -e .

Get API Keys

  1. Log in to autoagents_core AI platform
  2. Navigate to Profile → Personal Keys
  3. Copy your personal_auth_key and personal_auth_secret

First Conversation

from autoagents_coreai.client import ChatClient

# Initialize client
client = ChatClient(
    agent_id="your_agent_id",
    personal_auth_key="your_auth_key", 
    personal_auth_secret="your_auth_secret"
)

# Start conversation
for event in client.invoke("Hello, please introduce artificial intelligence"):
    if event['type'] == 'token':
        print(event['content'], end='', flush=True)
    elif event['type'] == 'finish':
        break

File Processing

# Upload and analyze files
for event in client.invoke(
    prompt="Please analyze the main content of this document",
    files=["document.pdf"]
):
    if event['type'] == 'token':
        print(event['content'], end='', flush=True)

Knowledge Base Management

from autoagents_coreai.client import KbClient

# Initialize knowledge base client
kb_client = KbClient(
    personal_auth_key="your_auth_key",
    personal_auth_secret="your_auth_secret"
)

# Create knowledge base
result = kb_client.create_kb(
    name="Technical Documentation",
    description="Store technical documents"
)

# Query knowledge base list
kb_list = kb_client.query_kb_list()

Slide Generation

from autoagents_coreai.slide import SlideAgent

# Create slide agent
slide_agent = SlideAgent()

# Generate presentation
slide_agent.fill(
    prompt="Create a presentation about AI development",
    template_file_path="template.pptx",
    output_file_path="output.pptx"
)

Advanced Workflow Automation

from autoagents_coreai.graph import FlowGraph

# Create workflow graph
graph = FlowGraph(
    personal_auth_key="your_auth_key",
    personal_auth_secret="your_auth_secret"
)

# Add workflow nodes and compile
graph.add_node("chat_node", "chat", {"prompt": "Analyze this data"})
graph.add_node("ppt_node", "slide", {"template": "report.pptx"})
graph.add_edge("chat_node", "ppt_node")

# Deploy workflow
graph.compile(workflow_name="data_analysis_pipeline")

API Reference

ChatClient

Main conversation client supporting streaming chat and multimodal input.

Methods

  • invoke(prompt, images=None, files=None) - Start conversation
  • history() - Get conversation history

Event Types

  • start_bubble - New response bubble starts
  • token - Text fragment (for typewriter effect)
  • reasoning_token - AI reasoning process
  • end_bubble - Response bubble ends
  • finish - Conversation complete

KbClient

Knowledge base management client.

Methods

  • create_kb(name, description) - Create knowledge base
  • query_kb_list() - Query knowledge base list
  • get_kb_detail(kb_id) - Get knowledge base details
  • delete_kb(kb_id) - Delete knowledge base

FlowGraph

Workflow automation and orchestration.

Methods

  • add_node(node_id, module_type, inputs) - Add workflow node
  • add_edge(source, target) - Connect nodes
  • compile(workflow_name) - Deploy workflow

Configuration

Environment Settings

# Development environment (default)
base_url = "https://uat.agentspro.cn"

# Production environment
base_url = "https://agentspro.cn"

API Keys Setup

Set your credentials as environment variables:

export autoagents_core_AUTH_KEY="your_auth_key"
export autoagents_core_AUTH_SECRET="your_auth_secret"

Or pass them directly when initializing clients:

client = ChatClient(
    personal_auth_key="your_auth_key",
    personal_auth_secret="your_auth_secret"
)

Getting Agent ID

  1. Open Agent details page
  2. Click "Share" → "API"
  3. Copy Agent ID

Examples

Explore the playground/ directory for comprehensive examples:

  • playground/client/ - Chat and API examples
  • playground/slide/ - PowerPoint generation examples
  • playground/kb/ - Knowledge base management
  • playground/react/ - React Agent examples
  • playground/graph/ - Workflow automation
  • playground/datascience/ - Data analysis tools

Contributing

We welcome contributions! Please feel free to submit issues and pull requests.

Development Setup

git clone https://github.com/your-repo/autoagents_core-python-sdk.git
cd autoagents_core-python-sdk
pip install -e .[dev]

License

MIT License

Support

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

autoagents_core-0.1.0.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

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

autoagents_core-0.1.0-py3-none-any.whl (83.5 kB view details)

Uploaded Python 3

File details

Details for the file autoagents_core-0.1.0.tar.gz.

File metadata

  • Download URL: autoagents_core-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.9

File hashes

Hashes for autoagents_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50eac70793db7990b193a8f7376a429076b1d0f627992615e0b12d22cb84806a
MD5 810ae11fa6a5425d635e144e851c94ea
BLAKE2b-256 46ca25fa58ee67d9b1ce4aa00ab5293c9d586a6d7a241eb11a41f07bfc2151ce

See more details on using hashes here.

File details

Details for the file autoagents_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autoagents_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 201e5f224dea9fe0d14ca6d86c6ff0a3ee08485833e4750ea6d8c99ce41d0c91
MD5 710a3627bbfa282d348075b437e2d791
BLAKE2b-256 e35de64700b1dcec4636d14ca96c7ab0e9111ab4e6f3378c4150d3add5ca1c46

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