Getting Started with VibeX
Welcome to VibeX! This guide will walk you through setting up your first persistent workspace with AI agents.
What is VibeX?
VibeX is a Space-oriented Collaborative Workspace Platform designed for persistent, evolving work with AI agents. Unlike traditional task-oriented frameworks that simply execute and terminate, VibeX provides persistent workspaces where artifacts evolve through continuous user-agent collaboration.
| Aspect | Task-Oriented (Others) | Space-Oriented (VibeX) |
|---|---|---|
| Mental Model | ”Run a task, get a result, done" | "Enter a space, evolve artifacts, iterate” |
| Lifecycle | One-shot execution | Persistent, continuous collaboration |
| State | Ephemeral (task context) | Persistent (space with history) |
| Artifacts | Output files | Living documents that evolve |
Prerequisites
Before you begin, make sure you have:
- Node.js 18+ installed
- pnpm 9+ (recommended) or npm/yarn
- An LLM API key (OpenAI, Anthropic, DeepSeek, etc.)
Installation
pnpm
pnpm add vibexQuick Start
1. Set Up Your Environment
Create a .env file with your API key:
# For OpenAI
OPENAI_API_KEY=sk-your-key-here
# Or for DeepSeek
DEEPSEEK_API_KEY=your-key-here
# Or for Anthropic
ANTHROPIC_API_KEY=your-key-here2. Create Your First Workspace
Create a new TypeScript file (e.g., index.ts):
import "dotenv/config";
import { XAgent } from "vibex";
async function main() {
// Start a new persistent workspace
const xAgent = await XAgent.start("Write my thesis on AI");
const space = xAgent.getSpace();
console.log(`✨ Created Space: ${space.spaceId}`);
// Stream a response from XAgent
const stream = await xAgent.streamText({
messages: [
{ role: "user", content: "Write an introduction paragraph" }
],
metadata: { mode: "agent", requestedAgent: "X" },
});
// Print the streamed response
for await (const chunk of stream.textStream) {
process.stdout.write(chunk);
}
// Save the workspace state
await space.persistState();
console.log(`\n💾 Saved! Resume with: SPACE_ID=${space.spaceId}`);
}
main().catch(console.error);3. Run Your Code
npx tsx index.tsNote the Space ID that’s printed — you’ll use it to resume your workspace later!
Resuming Your Workspace
This is VibeX’s superpower: persistent workspaces. You can continue your work anytime:
import "dotenv/config";
import { XAgent } from "vibex";
async function main() {
// Resume an existing workspace
const xAgent = await XAgent.resume(process.env.SPACE_ID!);
const space = xAgent.getSpace();
console.log(`📂 Resumed Space: ${space.name}`);
console.log(`📊 Goal: ${space.goal}`);
console.log(`💬 Previous messages: ${space.history.messages.length}`);
// Continue the conversation - XAgent remembers everything!
const stream = await xAgent.streamText({
messages: [
{ role: "user", content: "Now expand on what you wrote before" }
],
metadata: { mode: "agent", requestedAgent: "X" },
});
for await (const chunk of stream.textStream) {
process.stdout.write(chunk);
}
await space.persistState();
}
main().catch(console.error);Core Concepts
Space
A Space is a persistent container for all your work:
- Holds artifacts (documents, code, data)
- Preserves conversation history across sessions
- Stores configuration and preferences
- Maintains version history of all changes
XAgent
XAgent is the project manager for each Space:
- Remembers the entire project history
- Knows all artifacts in the Space
- Coordinates specialist agents (Writer, Researcher, Developer, etc.)
- Adapts plans based on evolving requirements
Artifacts
Artifacts are living documents that evolve over time:
- Documents, code, and data that improve through collaboration
- Full version history for rollback
- Can be created, updated, and managed by agents
What’s Next?
- Tutorials — Step-by-step guides for common use cases
- Design Principles — Understand the architecture
- SDK Reference — Complete API documentation
- Examples — Real-world code examples
Tip: Check out the examples folder for complete, runnable projects including thesis writing, research assistants, and code review tools.