THE WRITE-AHEAD BLOG

Brane

Introducing Brane: Membrane's AI Assistant

This week's beta announcement introduced Brane, an intelligent coding assistant designed to make you more productive in Membrane.

What is Brane?

Brane is Membrane's AI assistant that lives in your sidebar, helping you develop programs. What sets Brane apart is its ability to understand and directly interact with Membrane's graph. Brane can query your live data using grefs, execute actions across your connected programs, and help you navigate and build your Membrane ecosystem.

Brane actively understands the relationships between your programs and data.

Why We Built Brane

As Membrane has grown, we've seen how powerful the platform can be, but also how its unique concepts can present a learning curve for new users. Modern developers increasingly expect AI assistants to help them navigate new frameworks and environments, and we wanted to create something tailored specifically to Membrane.

Brane is designed to speed-up learning for newcomers and boost productivity for experienced developers.

How Brane Works

Integrated Editor Assistant

Brane is deeply integrated into the Membrane environment, functioning both as a chat interface and a code-aware assistant. When you're working on Membrane programs, Brane automatically understands the current context, including the program you're currently editing, code selections you've made (using Cmd+K), and program schemas and connections.

This integration allows Brane to provide relevant, context-aware assistance whether you're asking general questions or seeking help with specific code.

Specialized Tools

Instead of relying solely on language model capabilities, we built Brane with specialized tools that can interact directly with Membrane.

When you ask Brane to perform a task, it can choose the appropriate tool and execute it with proper parameters. Some tools run automatically without requiring user confirmation (like retrieving schemas), while others that modify your environment (like adding connections) require explicit approval, giving you full visibility and control.

Under the Hood

For the technically curious, Brane's UI is rendered using Rust compiled to WebAssembly with egui. Behind the scenes, we built a custom message processing system to handle the language model interactions, structured content parsing, and tool execution.

We're planning a more detailed technical deep-dive soon for those interested in how we built Brane. Stay tuned!

Brane and the Model Context Protocol

While Anthropic's Model Context Protocol (MCP) provides a standardized way for AI models to communicate with external tools and services, Membrane's architecture already functions similarly through its graph-based system.

In Membrane, every program acts as a context provider and tool executor accessible through standardized graph references (grefs), conceptually similar to how MCP servers provide resources, tools, and prompts to AI clients.

We're monitoring MCP's development with interest, but Membrane's existing architecture already provides many of the same benefits: standardized data access, consistent interfaces for tool execution, and a unified way to connect different systems.

What Can You Do with Brane?

Program Creation and Modification

Ask Brane to create entire programs from scratch or help you modify existing code. It can generate programs that fetch data from APIs, build notification bots that integrate with your services, add features to existing programs, or help debug issues in your Membrane code.

Create Views

Brane is particularly good at creating views. In Membrane, views are the UI components for your program's data. You can interact with them in the Membrane dashboard. Ask Brane to create a GitHub profile view showing user details and repositories, or help you design and implement views for any of your Membrane program types.

Data Exploration and Program Connections

Brane helps you explore and interact with your Membrane graph and simplifies connecting programs together. Ask it to check for messages in your Discord server, connect your Slack workspace to the sys-email program for notifications, or set up a daily SMS summary of your GitHub activity using the sys-sms program.

Learning Membrane

Even when you're just learning, Brane can serve as a knowledgeable guide. Ask it to explain concepts like grefs, clarify the differences between actions and fields, or demonstrate how to structure a program's schema for optimal connectivity. We're working to improve Brane's knowledge of Membrane and prevent misunderstandings, so you should still refer to our docs as the primary source of truth.

The Future of Brane

This beta launch is just the beginning! We have ambitious plans for Brane, including background tasks that continue while you're away, the ability for Brane to create other Branes to work on tasks in parallel, and collaborative features where multiple users can interact with shared Brane instances.

Our vision is for Brane to become an indispensable companion for Membrane developers, capable of handling increasingly complex tasks with more autonomy while maintaining the collaborative feel of working with a knowledgeable teammate.

Try Brane

We're excited for you to experience how Brane can transform your work with Membrane. As a beta launch, we're actively seeking feedback to improve the experience.

To get started with Brane, login or signup, look for the Brane tab in your sidebar, and start a conversation with a question or task.

We can't wait to hear about what you build with Brane! Please send any and all feedback to contact@membrane.io.

To learn more about Brane's features, visit the docs.


- Thomas Seeley (thomas@membrane.io)

© 2024 Programmability, Inc.