| Crates.io | sekuire-sdk |
| lib.rs | sekuire-sdk |
| version | 0.1.1 |
| created_at | 2025-12-30 13:50:20.113073+00 |
| updated_at | 2025-12-30 13:50:20.113073+00 |
| description | The official SDK for the Sekuire Agent Identity Protocol |
| homepage | https://sekuire.com |
| repository | https://github.com/sekuire/sekuire |
| max_upload_size | |
| id | 2012669 |
| size | 269,652 |
Rust SDK for building AI agents with the Sekuire Trust Protocol.
Add to your Cargo.toml:
[dependencies]
sekuire-sdk = "0.1"
tokio = { version = "1", features = ["full"] }
Create a sekuire.yml file:
project:
name: "my-agent"
version: "1.0.0"
agents:
assistant:
name: "AI Assistant"
system_prompt: "./prompts/assistant.md"
tools: "./tools.json"
llm:
provider: "openai"
model: "gpt-4-turbo"
api_key_env: "OPENAI_API_KEY"
temperature: 0.7
memory:
type: "buffer"
max_messages: 10
Load and use your agent:
use sekuire_sdk::get_agent;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Load agent from config
let mut agent = get_agent(Some("assistant"), None).await?;
// Chat with the agent
let response = agent.chat("Hello!", None).await?;
println!("{}", response);
Ok(())
}
get_agent(name, config_path)Load a single agent from configuration.
let agent = get_agent(Some("assistant"), Some("./sekuire.yml")).await?;
get_agents(config_path)Load all agents from configuration.
let agents = get_agents(Some("./sekuire.yml")).await?;
SekuireAgentMain agent struct with methods:
chat(&mut self, message, options) - Send message and get responseget_history(&self) - Get conversation historyclear_history(&mut self) - Clear historyget_llm_provider(&self) - Get provider nameget_model_name(&self) - Get model nameget_tools(&self) - Get tool namesuse sekuire_sdk::{CalculatorTool, Tool, ToolInput, create_default_tool_registry};
use std::collections::HashMap;
use serde_json::Value;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Use calculator tool
let calc = CalculatorTool::new();
let mut input = HashMap::new();
input.insert("expression".to_string(), Value::String("2 + 2".to_string()));
let result = calc.execute(input).await?;
println!("{}", result);
// Or use registry
let registry = create_default_tool_registry();
let tools = registry.list();
Ok(())
}
# Build
cargo build
# Test
cargo test
# Run examples
cargo run --example basic_agent
MIT