Skip to main content

Architecture Guide

This guide explains the module structure and design philosophy of the agenticstar-platform SDK.

Design Philosophy

The agenticstar-platform SDK provides only platform infrastructure (DB, events, memory, storage, RAG, security). Developers have complete freedom to design agent logic (prompt design, tool selection, execution flow).

SDK Layer Architecture

SDK Architecture

The SDK is composed of a 3-layer architecture.

LayerRoleResponsibility
Your AI AgentAgent logic (prompts, tools, flow)Freely designed by developers
SDKAccess to platform infrastructureProvided by agenticstar-platform
InfrastructureDatabases, vector DBs, storage, etc.Managed by the platform

Module List

Each module can be installed and used independently. There are no implicit dependencies between modules.

Modulepip extrasExternal DepsDescription
events(core)NoneSSE / Webhook / DB event delivery
db[db]asyncpg, azure-identityPostgreSQL + Azure AD auth
rag[rag]qdrant-client, openaiVector search + Embedding
storage[storage]azure-storage-blob, boto3, google-cloud-storageMulti-cloud object storage
auth(core)httpxAGENTIC STAR Auth API client
memory[memory]mem0aiSemantic memory (Mem0 + Qdrant)
security[security]httpx, google-cloud-dlpContent moderation + PII detection
common(core)NoneValidation + secret masking

Data Flow

SDK Data Flow
  1. User Request — A request from the user reaches the agent
  2. Your AI Agent — Processes while streaming progress via the SDK's EventEmitter
  3. SDK — Calls modules such as DB, RAG, Storage, and Memory
  4. Infrastructure — Accesses PostgreSQL, Qdrant, cloud storage, etc.
  5. Response — Delivers the final response via SSE with EventType.COMPLETION_SUCCESS

Configuration Management

All SDK modules read configuration from config.toml. Settings can be loaded uniformly via the from_toml() method.

config.tomlToml
[database]
host = "your-db.postgres.database.azure.com"
port = 5432
database = "agenticstar"
username = "agent_user"
password = "your_password"
pool_min_size = 2
pool_max_size = 10

[database.azure_ad]
enabled = true
tenant_id = "your-tenant-id"

[rag.qdrant]
url = "http://qdrant.internal:6333"
collection_name = "knowledge_base"
vector_size = 1536

[rag.embedding]
api_base = "https://your-endpoint.openai.azure.com/"
api_key = "your-api-key"
deployment_name = "text-embedding-3-large"

[storage.azure]
bucket_name = "agent-files"
connection_string = "DefaultEndpointsProtocol=https;..."

[memory.llm]
model = "azure_openai/gpt-4.1"
api_key = "your-api-key"
base_url = "https://your-endpoint.openai.azure.com/"

[security]
provider = "azure"
content_safety_endpoint = "https://your-cs.cognitiveservices.azure.com/"
content_safety_api_key = "your-key"
Loading from config.tomlPython
from agenticstar_platform.db import PostgreSQLConfig
from agenticstar_platform.rag import QdrantConfig, EmbeddingConfig

db_config = PostgreSQLConfig.from_toml("config.toml")
qdrant_config = QdrantConfig.from_toml("config.toml")
embed_config = EmbeddingConfig.from_toml("config.toml")

Example Project Structure

my-agent/
├── config.toml # SDK settings
├── main.py # Agent entry point
├── agent.py # Your agent logic
├── tools/ # Custom tools
│ ├── search.py
│ └── file_ops.py
├── Dockerfile
└── requirements.txt

Next Steps

Deploy Guide

Docker build and platform registration steps

ガイドを見る

Events / Streaming Guide

Implementation details for SSE event delivery

ガイドを見る