SDK Quickstart
Get your first AI agent running in 5 minutes.
Prerequisites
- Sekuire CLI installed
- LLM API key (OpenAI, Anthropic, etc.)
Optional (platform mode only):
- Sekuire API key from your dashboard
Step 1: Create a Project
Use the CLI to scaffold a new agent:
Terminal
sekuire init --name my-agent --language python
cd my-agent
This creates a sekuire.yml config file and project structure.
Step 2: Configure Your Agent
Edit sekuire.yml to set your LLM provider:
sekuire.yml
project:
name: "my-agent"
version: "1.0.0"
agents:
assistant:
name: "AI Assistant"
system_prompt: "./prompts/assistant.md"
llm:
provider: "openai"
model: "gpt-4-turbo"
api_key_env: "OPENAI_API_KEY"
temperature: 0.7
memory:
type: "buffer"
max_messages: 10
Set your API key in the environment:
export OPENAI_API_KEY="sk-..."
# or add to .env file
Step 3: Install the SDK
- TypeScript
- Python
- Rust
npm install @sekuire/sdk
pip install sekuire-sdk
# Add to Cargo.toml
[dependencies]
sekuire-sdk = "0.1"
tokio = { version = "1", features = ["full"] }
Step 4: Use the Agent
- TypeScript
- Python
- Rust
import { getAgent } from '@sekuire/sdk';
async function main() {
// Load agent from sekuire.yml
const agent = await getAgent('assistant');
// Chat with the agent
const response = await agent.chat('What is the capital of France?');
console.log(response);
// Continue the conversation
const followUp = await agent.chat('What is its population?');
console.log(followUp);
// Get conversation history
const history = agent.getHistory();
console.log(`Messages: ${history.length}`);
}
main();
import asyncio
from sekuire_sdk import get_agent
async def main():
# Load agent from sekuire.yml
agent = await get_agent('assistant')
# Chat with the agent
response = await agent.chat('What is the capital of France?')
print(response)
# Continue the conversation
follow_up = await agent.chat('What is its population?')
print(follow_up)
# Get conversation history
history = agent.get_history()
print(f"Messages: {len(history)}")
asyncio.run(main())
use sekuire_sdk::get_agent;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Load agent from sekuire.yml
let mut agent = get_agent(Some("assistant"), None).await?;
// Chat with the agent
let response = agent.chat("What is the capital of France?", None).await?;
println!("{}", response);
// Continue the conversation
let follow_up = agent.chat("What is its population?", None).await?;
println!("{}", follow_up);
// Get conversation history
let history = agent.get_history();
println!("Messages: {}", history.len());
Ok(())
}
Step 5: Run It
- TypeScript
- Python
- Rust
npx tsx main.ts
# or
node --loader ts-node/esm main.ts
python main.py
cargo run
tip
This quickstart runs in standalone mode by default. Add platform credentials later for managed features.
Next Steps
- Agent API - Deep dive into agent methods
- Built-in Tools - Add capabilities to your agent
- Streaming - Real-time token responses
- Publishing - Push to the registry