Skip to main content

Crate gopher_mcp_rust

Crate gopher_mcp_rust 

Source
Expand description

§Gopher MCP Rust SDK

Rust SDK for Gopher Orch - AI Agent orchestration framework with native C++ performance.

§Quick Start

use gopher_mcp_rust::{GopherAgent, ConfigBuilder};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create agent with server configuration
    let config = ConfigBuilder::new()
        .with_provider("AnthropicProvider")
        .with_model("claude-3-haiku-20240307")
        .with_server_config(r#"{"succeeded": true, "data": {"servers": []}}"#)
        .build();

    let agent = GopherAgent::create(config)?;

    // Run a query
    let result = agent.run("What is the weather in Tokyo?")?;
    println!("{}", result);

    Ok(())
}

Structs§

AgentResult
Result of an agent query with detailed information.
Config
Configuration for creating a GopherAgent.
ConfigBuilder
Builder for creating Config instances.
GopherAgent
A gopher-orch agent for running AI queries.

Enums§

AgentResultStatus
Status of an agent result.
Error
Error types for gopher-orch operations.

Functions§

init
Initialize the gopher-orch library. Called automatically by GopherAgent::create() if not already initialized.
is_initialized
Returns true if the library is initialized.
shutdown
Shutdown the gopher-orch library.

Type Aliases§

Result
Result type alias for gopher-orch operations.