Developer Documentation

Everything you need to deploy, manage, and scale AI agents with StackAgent.

Quick Start Guide

Install the CLI

Install the StackAgent CLI using npm, pip, or download the binary directly.

# Using npm
npm install -g @stackagent/cli

# Using pip
pip install stackagent-cli

# Using Homebrew (macOS)
brew install stackagent/tap/stackagent

Configure AWS Credentials

Set up your AWS credentials and configure the StackAgent CLI with your API key.

# Configure AWS credentials
aws configure

# Initialize StackAgent
stackagent init --api-key YOUR_API_KEY

Deploy Your First Agent

Create and deploy an AI agent with a simple configuration file or natural language.

# Using natural language
stackagent deploy "Create a RAG agent with 
GPT-4 that can answer questions about my PDF documents"

# Using config file
stackagent deploy -f agent.yaml

Test Your Agent

Send requests to your deployed agent and verify it's working correctly.

# Send a test request
stackagent invoke my-agent "What is the main topic 
of my documents?"

# View logs
stackagent logs my-agent --tail

API Reference

RESTful API for programmatic access to StackAgent

Agents API

POST /v1/agents

Create a new AI agent with specified configuration

GET /v1/agents/{agent_id}

Retrieve agent details and status

PUT /v1/agents/{agent_id}

Update agent configuration

DELETE /v1/agents/{agent_id}

Delete an agent and associated resources

Inference API

POST /v1/agents/{agent_id}/invoke

Invoke agent with a prompt and get response

POST /v1/agents/{agent_id}/stream

Stream agent responses in real-time

GET /v1/agents/{agent_id}/history

Retrieve conversation history

POST /v1/agents/{agent_id}/feedback

Submit feedback for response quality

View Full API Documentation

SDK Downloads

Official client libraries for your favorite language

🐍

Python

v1.2.0 • pip install

Download
🟢

Node.js

v1.2.0 • npm install

Download
🔵

Go

v1.2.0 • go get

Download

Java

v1.2.0 • Maven

Download
💜

.NET

v1.2.0 • NuGet

Download

Python SDK Example

from stackagent import StackAgent

# Initialize client
client = StackAgent(api_key="your-api-key")

# Deploy an agent with natural language
agent = client.agents.create(
    name="customer-support-agent",
    description="Answer customer questions about products",
    model="anthropic.claude-3-sonnet",
    knowledge_base={
        "type": "s3",
        "bucket": "my-product-docs"
    }
)

# Invoke the agent
response = client.agents.invoke(
    agent_id=agent.id,
    prompt="What is the return policy?"
)

print(response.content)

Code Examples

Ready-to-use templates for common use cases

Chatbot with Memory

Build a conversational AI that remembers context across sessions.

View Example →

RAG Document Q&A

Answer questions from your document corpus with citations.

View Example →

Tool-Using Agent

Create agents that can call external APIs and tools.

View Example →

Multi-Agent System

Orchestrate multiple specialized agents working together.

View Example →

Streaming Responses

Implement real-time streaming for better user experience.

View Example →

Secure Deployment

Deploy agents with VPC isolation and IAM best practices.

View Example →

Additional Resources

Guides, tutorials, and reference materials

Need Help Getting Started?

Our developer support team is here to help you succeed.

Contact Support