sekuire-sdk

Crates.iosekuire-sdk
lib.rssekuire-sdk
version0.1.1
created_at2025-12-30 13:50:20.113073+00
updated_at2025-12-30 13:50:20.113073+00
descriptionThe official SDK for the Sekuire Agent Identity Protocol
homepagehttps://sekuire.com
repositoryhttps://github.com/sekuire/sekuire
max_upload_size
id2012669
size269,652
Joel Fickson (joelfickson)

documentation

https://docs.sekuire.com

README

Sekuire Rust SDK

Rust SDK for building AI agents with the Sekuire Trust Protocol.

Installation

Add to your Cargo.toml:

[dependencies]
sekuire-sdk = "0.1"
tokio = { version = "1", features = ["full"] }

Quick Start

Config-First Approach (Recommended)

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(())
}

Features

  • 4 LLM Providers: OpenAI, Anthropic, Google, Ollama
  • Built-in Tools: Calculator, Web Search, HTTP, File Read
  • Config-First: Declarative YAML configuration
  • Type-Safe: Rust's type system
  • Async: Built on Tokio

API Reference

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?;

SekuireAgent

Main agent struct with methods:

  • chat(&mut self, message, options) - Send message and get response
  • get_history(&self) - Get conversation history
  • clear_history(&mut self) - Clear history
  • get_llm_provider(&self) - Get provider name
  • get_model_name(&self) - Get model name
  • get_tools(&self) - Get tool names

Built-in Tools

use 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(())
}

Development

# Build
cargo build

# Test
cargo test

# Run examples
cargo run --example basic_agent

License

MIT

Commit count: 0

cargo fmt