Clients
Lunet framework comes with a set of clients out of the box. New core clients are regularly added to the framework. Below is a list of currently supported clients and how to use them.
Cron Client
Cron client sends empty message to the agent in order to trigger the agent execution at regular intervals.
Use Cases
a trading agent which regularly executes its own trading strategy based on market data and updates users’ portfolios
a twitter agent which distills world news’ every 1 hour and prepares a comprehensive report
Example:
Copy
Discord Client
This client listens to messages in a Discord server and replies with agent-generated responses.
Use Cases
an assistant agent which answers questions, moderates conversations, or assists in a Discord community.
Example:
Copy
Telegram Client
The Telegram client listens to messages in a Telegram server and replies with agent-generated responses.
Use Cases
An assistant agent that answers questions, moderates conversations, or assists in a Telegram community.
Example:
Copy
Gradio Client
The Gradio client listens to messages from a local Gradio server and replies with agent-generated responses.
Use Cases
Test and debug your agent without requiring extra tokens or configuration.
Copy
Terminal Client
The Terminal client listens to messages from the terminal and replies with agent-generated responses.
Use Cases
Test and debug your agent without requiring extra tokens or configuration.
Copy
SimpleMessageClient
A simple client that receives messages when instantiated and pushes them to the agent at a specified interval. The agent’s responses are then printed to the console.
Use Cases
Test and debug your agent without requiring extra (authentication?) tokens or configuration.
Copy
TwitterMentionClient
The TwitterMention client listens to mentions on Twitter and replies accordingly.
Use Cases
An assistant agent that answers questions, moderates conversations, or assists in a Twitter community.
Copy
TwitterPostClient
The TwitterPost client is an AgentOutput
type that posts new messages on a Twitter account.
Use Cases
An assistant that posts curated and personalized content on Twitter.
Copy
Build your own Client
In order to build the client, implement one or both of these interfaces:
AgentInput
Copy
start
function contains a queue to which the agent should push a Message
object.
Copy
In the simplest case, Message
has justcontent
.
Let’s implement the simplest AgentInput
Copy
This client, when passed to the runtime will pass a single Hello, Agent!
message to the agent.
AgentOutput
Copy
send
function receives the response from the client, together with the request which trigger the agent flow.
Here is the simplest implementation of
Copy
As explained above, the input and output need to be passed to AgentRuntime to start operating.
Conclusion
Lunet provides a diverse set of built-in clients to seamlessly integrate agents with various platforms, including messaging services, social media, and local development environments. Whether you need to trigger agents at regular intervals, process real-time user interactions, or debug locally, these clients offer flexible solutions. Additionally, developers can extend Lunet's capabilities by implementing custom clients using the AgentInput
and AgentOutput
interfaces. This modular approach ensures adaptability to a wide range of use cases, enabling efficient and intelligent agent interactions across different ecosystems.
Last updated