> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Rust Agent SDKのインストール

> phaseo-agentをインストールし、Phaseo Gatewayクライアントを設定します。

## 必要条件

* Rust 1.86以降
* Phaseo Gateway APIキー

## インストール

```toml theme={null}
[dependencies]
phaseo = "0.1"
phaseo-agent = "0.1"
serde_json = "1"
```

または、次を実行します。

```bash theme={null}
cargo add phaseo@0.1 phaseo-agent@0.1 serde_json
```

## 認証を設定する

`create_gateway_agent_client(...)`と`GatewayAgentClient::from_env(...)`は`PHASEO_API_KEY`を読み込みます。

```bash theme={null}
export PHASEO_API_KEY="phaseo_v1_sk_..."
```

基盤となる`phaseo`クライアントでは、任意で`PHASEO_BASE_URL`も指定できます。

## インストールを確認する

```rust theme={null}
use phaseo_agent::{create_agent, AgentDefinition};

fn main() {
    let _agent = create_agent(AgentDefinition::new(
        "verification-agent",
        "openai/gpt-6-astra",
    ));
    println!("Phaseo Rust Agent SDK installed");
}
```

## 次のステップ

* [最初のRustエージェントを作成する](./agent-sdk.mdx)
* [ツールと承認](./agent-sdk-tools.mdx)
* [Agent APIリファレンス](./agent-sdk-api-reference.mdx)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.