omi icon indicating copy to clipboard operation
omi copied to clipboard

Create Import Apps

Open kodjima33 opened this issue 9 months ago • 20 comments

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

kodjima33 avatar Feb 22 '25 00:02 kodjima33

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?

abhayporwals avatar Feb 22 '25 07:02 abhayporwals

yes it would be better to divide so than more than one can work, i would also like to work on this

parthiv11 avatar Feb 22 '25 08:02 parthiv11

Also Discord would be great.

ibrahimAlbyrk avatar Feb 28 '25 01:02 ibrahimAlbyrk

@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

beastoin avatar Mar 15 '25 03:03 beastoin

created example https://github.com/BasedHardware/omi/tree/main/plugins/example/import/manual-import

kodjima33 avatar Mar 21 '25 01:03 kodjima33

email integration by @ibrahimAlbyrk https://github.com/BasedHardware/omi/issues/1895#issuecomment-2742136224

beastoin avatar Mar 24 '25 04:03 beastoin

@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

ibrahimAlbyrk avatar Mar 26 '25 03:03 ibrahimAlbyrk

hi @ibrahimAlbyrk , great! will take a look at your PR. btw what do you think about https://composio.dev/ ?

beastoin avatar Mar 28 '25 22:03 beastoin

@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.

ibrahimAlbyrk avatar Mar 28 '25 22:03 ibrahimAlbyrk

we need to integrate composio instead

kodjima33 avatar Apr 01 '25 01:04 kodjima33

checked.

q/ could we merge the bounties so that our contributors can earn more by their superious works ?

beastoin avatar Apr 01 '25 01:04 beastoin

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?

ibrahimAlbyrk avatar Apr 01 '25 08:04 ibrahimAlbyrk

@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

ibrahimAlbyrk avatar Apr 09 '25 16:04 ibrahimAlbyrk

@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?

Ani-4x avatar May 14 '25 08:05 Ani-4x

Hello! @kodjima33 @beastoin @mdmohsin7 @aaravgarg

Did a PR on this #2435

Hope you like it!

Thanks!

solomonshalom avatar May 24 '25 21:05 solomonshalom

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!

solomonshalom avatar May 25 '25 19:05 solomonshalom

@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.

michaelgreen06 avatar Jul 02 '25 23:07 michaelgreen06

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()

Thegringolingo avatar Aug 05 '25 19:08 Thegringolingo

is it still open

MithilSaiReddy avatar Sep 29 '25 15:09 MithilSaiReddy

@kodjima33 can I work on this issue ?

rishi-jat avatar Nov 02 '25 11:11 rishi-jat