omi
omi copied to clipboard
Create Import Apps
Let's build omi apps that will allow to import into omi
Below are the sources that omi users want to connect into omi
You can build any one of these, launch in omi app store and earn from usage
they are sorted by popularity, so start from the top if you want to maximize earnings
Learn how to build such apps here: https://docs.omi.me/docs/developer/apps/Import
Example of manual import: https://github.com/BasedHardware/omi/tree/main/plugins/example/import/manual-import
Hi, @kodjima33! I'm working on this issue and will raise a PR asap. Just one thing I want to know is that this issue have a big checklist. So will it be divided into multiple sub-issues or not?
yes it would be better to divide so than more than one can work, i would also like to work on this
Also Discord would be great.
@mdmohsin7 please try this ticket with the new integration actions then lmk if there's any friction you're facing so far. https://docs.omi.me/docs/developer/apps/Import
@nquang29 you could try it as well
created example https://github.com/BasedHardware/omi/tree/main/plugins/example/import/manual-import
email integration by @ibrahimAlbyrk https://github.com/BasedHardware/omi/issues/1895#issuecomment-2742136224
@beastoin I am also working on a modular and generic agent system. In other words, any structure such as notion, gmail, calendar, facebook etc. can be created as an agent and perform data gets, memory or conversation creation operations.
this is ok, right? i mean can i work of all of it? :)
Repo: https://github.com/ibrahimAlbyrk/AgentMate
hi @ibrahimAlbyrk , great! will take a look at your PR. btw what do you think about https://composio.dev/ ?
@beastoin
Wow looking amazing. looking into it.. want me to integrate it in my agent mate? i can research and try to implement it If it works as it said, i think that 10s of agents can be added in a few days after setting up the system.
we need to integrate composio instead
checked.
q/ could we merge the bounties so that our contributors can earn more by their superious works ?
implementing composio for agent mate
btw, @beastoin Have you had the chance to look into Agent Mate? Is the design good or are there any parts you would like to see changed?
@beastoin @kodjima33
Composito is integrated into Agent Mate.
Login to any service and sending or receiving data can be done in a modular way.
And with such a simple structure, agents for many different services can be added, and various operations can be performed.
Is this architecture suitable?
I’ll make a few adjustments and then start adding all the other systems one by one.
Gmail agent as an example to create a new agent:
Adding actions is done like this inside the __init__:
def __init__(self, uid: str, service_id):
super().__init__(uid, service_id)
self.app_name = App.GMAIL
actions = {
"get_emails": LLMActionData(Action.GMAIL_FETCH_EMAILS,
processors={"post": {Action.GMAIL_FETCH_EMAILS: self._gmail_postprocessor}}),
"get_emails_subjects": LLMActionData(Action.GMAIL_FETCH_EMAILS,
processors={"post": {Action.GMAIL_FETCH_EMAILS: self._gmail_subject_postprocessor}}),
"get_email_by_message_id": LLMActionData(Action.GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID,
processors={"post": {
Action.GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID: self._gmail_postprocessor}}),
}
self.initialize_llm(actions)
Listener can be added like this:
async def _run_impl(self):
# LISTENERS
self.add_listener("GMAIL_NEW_GMAIL_MESSAGE", self._handle_new_email_messages)
Example processors:
def _gmail_subject_postprocessor(self, result: dict) -> dict:
return self._filter_gmail_fields(result, fields=["subject", "messageId"])
def _gmail_postprocessor(self, result: dict) -> dict:
return self._filter_gmail_fields(result, fields=[
"messageTimestamp", "messageId", "subject", "sender", "messageText"
])
@staticmethod
def _filter_gmail_fields(result: dict, fields: list[str]) -> dict:
processed_result = result.copy()
processed_response = []
for email in result["data"]["messages"]:
filtered_email = {field: email[field] for field in fields if field in email}
processed_response.append(filtered_email)
processed_result["data"] = processed_response
return processed_result
The full Gmail Agent script: https://github.com/ibrahimAlbyrk/AgentMate/blob/main/Agents/gmail_agent.py
@beastoin @kodjima33 Are any of the imports still open to work upon or are you guys planning to go with @ibrahimAlbyrk 's approach for every import listed?
Hello! @kodjima33 @beastoin @mdmohsin7 @aaravgarg
Did a PR on this #2435
Hope you like it!
Thanks!
Update: I have made the OMI app + deployed it to Vercel 🫡
Check it out [at] https://omi-crisps.vercel.app
OR, search for OMI Crisps on the OMI app store!
@kodjima33
FYI the import app docs link you have posted above no longer works. It looks like the link you need now is: https://docs.omi.me/doc/developer/apps/Import
The difference is the new one is at /doc/ & the old one is at /docs/ <- this causes a redirect to the docs intro page.
Note that connecting to a real email server requires network access and valid credentials. This example will fail without internet connectivity, but the code demonstrates the intended usage pattern. """ import os server = os.getenv('EMAIL_SERVER') username = os.getenv('EMAIL_USERNAME') password = os.getenv('EMAIL_PASSWORD') if not all([server, username, password]): print("Please set EMAIL_SERVER, EMAIL_USERNAME and EMAIL_PASSWORD environment variables") return importer = EmailImporter(server, username, password) try: messages = importer.fetch_last_n_messages('INBOX', count=5) for i, msg in enumerate(messages, 1): print(f"Email {i}") print(f" From: {msg['from']}") print(f" To: {msg['to']}") print(f" Subject: {msg['subject']}") print(f" Date: {msg['date']}") # Compute preview separately to avoid backslash in f-string preview = msg['body'][:200].replace('\n', ' ') print(f" Body Preview: {preview}...\n") finally: importer.disconnect()
if name == 'main': main()
is it still open
@kodjima33 can I work on this issue ?