
Agent Go SDK
A Go-based SDK for building AI agents with various capabilities like memory, tools, LLM integration, and more.
Features
- ๐ง Multiple LLM Providers: Integration with OpenAI, Anthropic, and more
- ๐ง Extensible Tools System: Easily add capabilities to your agents
- ๐ Memory Management: Store and retrieve conversation history
- ๐ Vector Store Integration: Semantic search capabilities
- ๐ ๏ธ Task Execution: Plan and execute complex tasks
- ๐ฆ Guardrails: Safety mechanisms for responsible AI
- ๐ Observability: Tracing and logging for debugging
- ๐ข Multi-tenancy: Support for multiple organizations
Getting Started
Prerequisites
- Go 1.21+
- Redis (optional, for distributed memory)
Installation
Add the SDK to your Go project:
go get github.com/Ingenimax/agent-sdk-go
Configuration
The SDK uses environment variables for configuration. Key variables include:
OPENAI_API_KEY: Your OpenAI API key
OPENAI_MODEL: The model to use (e.g., gpt-4-turbo)
LOG_LEVEL: Logging level (debug, info, warn, error)
REDIS_ADDRESS: Redis server address (if using Redis for memory)
See .env.example for a complete list of configuration options.
Usage Examples
Creating a Simple Agent
package main
import (
"context"
"fmt"
"github.com/Ingenimax/agent-sdk-go/pkg/agent"
"github.com/Ingenimax/agent-sdk-go/pkg/llm/openai"
"github.com/Ingenimax/agent-sdk-go/pkg/memory"
)
func main() {
// Create OpenAI client
openaiClient := openai.NewClient("your-api-key")
// Create a memory store
memoryStore := memory.NewConversationBuffer()
// Create a new agent
agentInstance, err := agent.NewAgent(
agent.WithLLM(openaiClient),
agent.WithMemory(memoryStore),
agent.WithSystemPrompt("You are a helpful AI assistant."),
)
if err != nil {
panic(err)
}
// Run the agent
response, err := agentInstance.Run(context.Background(), "What is the capital of France?")
if err != nil {
panic(err)
}
fmt.Println(response)
}
import (
"github.com/Ingenimax/agent-sdk-go/pkg/tools"
"github.com/Ingenimax/agent-sdk-go/pkg/tools/websearch"
)
// Create a tools registry
toolRegistry := tools.NewRegistry()
// Add the web search tool
searchTool := websearch.New(
"your-google-api-key",
"your-search-engine-id",
)
toolRegistry.Register(searchTool)
// Create agent with tools
agent, err := agent.NewAgent(
agent.WithLLM(openaiClient),
agent.WithMemory(memoryStore),
agent.WithTools(toolRegistry.List()...),
agent.WithSystemPrompt("You are a helpful AI assistant with web search abilities."),
)
Using Execution Plans with Approval
// Create an agent that requires plan approval
agent, err := agent.NewAgent(
agent.WithLLM(openaiClient),
agent.WithMemory(memoryStore),
agent.WithTools(toolRegistry.List()...),
agent.WithSystemPrompt("You can help with complex tasks that require planning."),
agent.WithRequirePlanApproval(true), // Enable execution plan workflow
)
// When the agent generates a plan, you can get it using ListTasks
plans := agent.ListTasks()
// Approve a plan by task ID
response, err := agent.Run(ctx, fmt.Sprintf("I approve the execution plan for task %s", taskID))
Architecture
The SDK follows a modular architecture with these key components:
- Agent: Coordinates the LLM, memory, and tools
- LLM: Interface to language model providers
- Memory: Stores conversation history and context
- Tools: Extend the agent's capabilities
- Vector Store: For semantic search and retrieval
- Guardrails: Ensures safe and responsible AI usage
License
This project is licensed under the MIT License - see the LICENSE file for details.
StarOps Agent
A PlatformOps assistant that helps with deployment and management tasks.
Features
- Interactive command-line interface
- Natural language understanding for deployment requests
- Multi-agent architecture with specialist agents
- Detailed deployment planning
- Task management system with approval workflow
Task Management
The StarOps Agent includes a task management system that provides tracking and approval for deployment tasks:
Task Commands
task list - List all your tasks
task get <task-id> - View details of a specific task
task approve <task-id> - Approve a task's execution plan
task reject <task-id> <feedback> - Reject a task's plan with feedback for improvement
Task Workflow
- Create a task by asking the agent to deploy something (e.g., "deploy llama 3.3 on kserve")
- The agent will create a task and provide you with the task ID
- Check the status with
task get <task-id>
- Once planning is complete, review the plan and either:
- Approve it with
task approve <task-id>
- Reject it with
task reject <task-id> The plan needs more security measures
- If approved, the task will be executed
- If rejected, the task will be replanned with your feedback
Task Statuses
pending - Task has been created but planning hasn't started
planning - Task plan is being created
awaiting_approval - Plan is ready for your review
executing - Plan is being executed
completed - Task has been completed successfully
failed - Task has failed
Usage
-
Run the application:
go run main.go
-
Ask the agent to deploy something:
Enter your query: deploy llama 3.3 on kserve
-
Follow the task workflow described above to manage your deployment.
Development
The StarOps Agent is built with a modular architecture:
internal/agent - Agent implementation and factory
internal/planning - Deployment planning and project management
internal/services - Task management and other services
internal/models - Data models for tasks and plans
internal/conversation - Session handling and user interaction
internal/prompts - System prompts for different agents
License
Copyright ยฉ 2025 Ingenimax Inc.