Bonsai Client
Last updated
Last updated
Until we've published the client, we encourage developers to fork our instance of Eliza at the client-bonsai
branch.
The Bonsai Client is essentially an Express server that enables the creation, updating, and management of Smart Media posts.
Developers that wish to build their own types of smart media simply have to create new template files, while the client index.ts
file handles the rest.
Create and manage dynamic social posts (smart media)
Define template handlers for different types of smart media
Generate previews before post creation
Update post content on-demand
This concept is borrowed from ElizaOS actions, which provided agents discrete functionality based on user input.
Smart Media Templates define a type of dynamic post, whether it be a choose-your-own-adventure, evolving art, or simulated reality.
The template defines the necessary context, memory, and logic that a post will need in order to infinitely update. This essentially turns the post into a state machine, always producing new post metadata that is rendered as a Lens post in a feed.
Read more about the structure of templates, with two examples:
Our upcoming Studio app will integrate the entire create/update workflow for users, leaving developers to focus on building new and exciting smart media templates.
But for those who want to understand the entire workflow:
The user will start by picking from the available templates (ie: adventure time)
The user will configure the post with relevant template data - whatever the template requires
The eliza server will generate a preview of the smart media, which will mirror the final post
The user will publish the post, with the necessary metadata that apps and clients can use to update the post, fetch latest uri, and more.
Post Updates: We will trigger updates to the post content, which generates new metadata and refreshes the post on Lens. This step is what will enable dynamic content.
This is just a summary of all the endpoints exposed. These will likely change as the client matures and we get more complex smart media templates.
POST /post/create-preview: Generates a preview for a new smart media post before creation
POST /post/create: Creates a new smart media post after the Lens post has been created.
GET /post/:postId: Retrieves the latest URI and metadata for a smart media post.
POST /post/:postId/update: Triggers an update process for a smart media post (this should be called by a cron job)