Skip to main content

Crate paigasus_helikon

Crate paigasus_helikon 

Source
Expand description

§paigasus-helikon

The facade crate of the Paigasus Helikon AI SDK — a Rust SDK for building AI agents. Most applications depend on this crate alone and turn on the features they need.

It re-exports paigasus-helikon-core unconditionally as paigasus_helikon::core, and the provider, runtime, tool, and MCP sibling crates behind Cargo features.

§Install

cargo add paigasus-helikon --features openai,macros

Each feature gates one sibling crate behind a module on paigasus_helikon:::

FeatureRe-export(s)Crate pulled in
(always on)corepaigasus-helikon-core
macrosmacros module + tool / tools macrospaigasus-helikon-macros
openai (alias providers-openai)openaipaigasus-helikon-providers-openai
anthropicanthropicpaigasus-helikon-providers-anthropic
bedrockbedrockpaigasus-helikon-providers-bedrock
geminigeminipaigasus-helikon-providers-gemini
mcpmcppaigasus-helikon-mcp
toolstoolspaigasus-helikon-tools
tools-webadds WebFetch / WebSearchpaigasus-helikon-tools/web
tools-os-sandboxadds OsSandboxBackend (Linux + macOS)paigasus-helikon-tools/os-sandbox
tools-microvmadds ForkdBackend, EgressProxy, EgressPolicy, Isolation::Proxied (microVM + domain-filtered egress via forkd/Firecracker; experimental — SMA-437)paigasus-helikon-tools/microvm
sessions-sqlitesessions_sqlitepaigasus-helikon-sessions-sqlite
sessions-postgressessions_postgrespaigasus-helikon-sessions-postgres
sessions-redissessions_redispaigasus-helikon-sessions-redis
runtime-tokioruntime_tokiopaigasus-helikon-runtime-tokio
runtime-axumruntime_axumpaigasus-helikon-runtime-axum
runtime-temporalruntime_temporalpaigasus-helikon-runtime-temporal
runtime-agentcoreruntime_agentcorepaigasus-helikon-runtime-agentcore
evalsevalspaigasus-helikon-evals

Feature names are kebab-case; the module aliases are snake-case. Note: the bedrock feature gates paigasus-helikon-providers-bedrock, which is distinct from runtime-agentcore (the Bedrock AgentCore runtime host — see the Runtimes guide). The paigasus_helikon::schema::strict() JSON-Schema normalizer is available regardless of features.

When using the mcp feature, McpServerHandle (from paigasus_helikon::mcp) implements ToolSource<Ctx> from core. Register MCP server handles directly on the builder with .mcp_servers([...]) and finalize with .build_resolved().await? — no need to convert to a Vec<Arc<dyn Tool<Ctx>>> manually. See the MCP integration guide for details.

§Example

A minimal agent against OpenAI (enable openai). This crate’s README.md is its rustdoc front page, so the example is marked ignore (it reads OPENAI_API_KEY and calls the network); the same program ships compile-checked as examples/budget_assistant_openai.rs:

use std::sync::Arc;

use paigasus_helikon::core::{
    Agent, AgentInput, CancellationToken, HookRegistry, LlmAgent, MemorySession, RunContext,
    RunResultStreaming, TracerHandle,
};
use paigasus_helikon::openai::OpenAiModel;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let model = OpenAiModel::chat("gpt-5-mini").build()?; // reads OPENAI_API_KEY

    let agent = LlmAgent::builder::<()>()
        .name("assistant")
        .model(model)
        .instructions("You are a helpful assistant.")
        .build();

    let ctx: RunContext<()> = RunContext::new(
        Arc::new(()),
        Arc::new(MemorySession::new()),
        HookRegistry::<()>::new(),
        TracerHandle::default(),
        CancellationToken::new(),
    );

    let stream = agent.run(ctx, AgentInput::from_user_text("Hello!")).await?;
    let result = RunResultStreaming::new(stream).collect().await?;
    println!("{}", result.final_output);
    Ok(())
}

See the quickstart for the full tool-calling walkthrough, and the examples/ directory for runnable programs (budget_assistant_openai, budget_assistant_anthropic, multi_agent_triage, streaming_console, structured_output, langfuse_tracing).

§License

Licensed under either of Apache-2.0 or MIT, at your option.

Re-exports§

pub use paigasus_helikon_core as core;

Modules§

schema
JSON Schema helpers.