Forevervm
概要
ForeverVMとは?
ForeverVMは、無期限に動作する状態を持つサンドボックスでAI生成コードを安全に実行するために設計された強力なツールです。この革新的なプラットフォームは、開発者が制御された環境でコードをテストおよびデプロイできるようにし、アプリケーションがクラッシュしたりデータを失ったりするリスクを回避しながらスムーズに動作することを保証します。ForeverVMを使用することで、ユーザーはAIの能力を活用しながら、高いレベルのセキュリティと信頼性を維持できます。
ForeverVMの特徴
- 状態を持つサンドボックス:各サンドボックスはその状態を保持し、永続的なデータストレージと長時間実行されるプロセスのシームレスな実行を可能にします。
- AIコード実行:AI生成コードを実行するために特別に設計されたForeverVMは、パフォーマンスと信頼性を向上させる最適化された環境を提供します。
- セキュリティ:プラットフォームはセキュリティを最優先し、コード実行が外部の脅威から隔離され保護されることを保証します。
- ユーザーフレンドリーなインターフェース:ForeverVMは直感的なインターフェースを提供し、コードのデプロイと管理のプロセスを簡素化し、初心者と経験豊富な開発者の両方にアクセス可能にします。
- スケーラビリティ:システムはスケールするように構築されており、パフォーマンスを損なうことなく、さまざまなワークロードやユーザーの要求に対応します。
ForeverVMの使い方
- サインアップ:ForeverVMのウェブサイトでアカウントを作成して始めます。
- サンドボックスを作成:ログイン後、プロジェクトのニーズに合わせた新しいサンドボックス環境を作成できます。
- コードをアップロード:AI生成コードをサンドボックスにアップロードして実行します。
- 実行とテスト:サンドボックス内でコードを実行し、そのパフォーマンスを監視し、必要な調整を行います。
- 保存とデプロイ:結果に満足したら、設定を保存し、必要に応じてアプリケーションをデプロイします。
よくある質問
Q: ForeverVMでどのようなコードを実行できますか?
A: ForeverVMはAI生成コードを実行するために設計されていますが、サンドボックスの設定に応じてさまざまなプログラミング言語やフレームワークもサポートできます。
Q: ForeverVMは安全ですか?
A: はい、セキュリティはForeverVMの最優先事項です。各サンドボックスは隔離されて動作し、あなたのコードとデータを潜在的な脅威から保護します。
Q: どこからでもサンドボックスにアクセスできますか?
A: はい、ForeverVMはクラウドベースであり、インターネット接続のある任意のデバイスからサンドボックスにアクセスできます。
Q: ForeverVMはコード実行中のエラーをどのように処理しますか?
A: ForeverVMは詳細なログとエラーメッセージを提供し、問題を迅速かつ効率的にトラブルシューティングするのに役立ちます。
Q: コードの実行時間に制限はありますか?
A: いいえ、ForeverVMはコードを無期限に実行できるため、長時間実行されるプロセスやアプリケーションに最適です。
詳細
foreverVM
| repo | version |
|--||
| cli | |
| sdk |
|
foreverVM provides an API for running arbitrary, stateful Python code securely.
The core concepts in foreverVM are machines and instructions.
Machines represent a stateful Python process. You interact with a machine by running instructions (Python statements and expressions) on it, and receiving the results. A machine processes one instruction at a time.
Getting started
You will need an API token (if you need one, reach out to paul@jamsocket.com).
The easiest way to try out foreverVM is using the CLI. First, you will need to log in:
npx forevervm login
Once logged in, you can open a REPL interface with a new machine:
npx forevervm repl
When foreverVM starts your machine, it gives it an ID that you can later use to reconnect to it. You can reconnect to a machine like this:
npx forevervm repl [machine_name]
You can list your machines (in reverse order of creation) like this:
npx forevervm machine list
You don't need to terminate machines -- foreverVM will automatically swap them from memory to disk when they are idle, and then automatically swap them back when needed. This is what allows foreverVM to run repls “forever”.
Using the API
import { ForeverVM } from '@forevervm/sdk'
const token = process.env.FOREVERVM_TOKEN
if (!token) {
throw new Error('FOREVERVM_TOKEN is not set')
}
// Initialize foreverVM
const fvm = new ForeverVM({ token })
// Connect to a new machine.
const repl = fvm.repl()
// Execute some code
let execResult = repl.exec('4 + 4')
// Get the result
console.log('result:', await execResult.result)
// We can also print stdout and stderr
execResult = repl.exec('for i in range(10):\n print(i)')
for await (const output of execResult.output) {
console.log(output.stream, output.data)
}
process.exit(0)
Working with Tags
You can create machines with tags and filter machines by tags:
import { ForeverVM } from '@forevervm/sdk'
const fvm = new ForeverVM({ token: process.env.FOREVERVM_TOKEN })
// Create a machine with tags
const machineResponse = await fvm.createMachine({
tags: {
env: 'production',
owner: 'user123',
project: 'demo'
}
})
// List machines filtered by tags
const productionMachines = await fvm.listMachines({
tags: { env: 'production' }
})
Memory Limits
You can create machines with memory limits by specifying the memory size in megabytes:
// Create a machine with 512MB memory limit
const machineResponse = await fvm.createMachine({
memory_mb: 512,
})
サーバー設定
{
"mcpServers": {
"mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--jamsocket--forevervm--mcp-server",
"npm run start"
],
"env": {
"FOREVERVM_TOKEN": "forevervm-token"
}
}
}
}