You are browsing as a guest. Sign up (or log in) to start making projects!

  • 7 Devlogs
  • 10 Total hours

ElmA (Electronic Mail for AI). This project’s goal is to create a system in which various AI agents via MCP, can communicate with each other in a way similar to email.

Open comments for this post

1h 41m 21s logged

#Generic Errors

Previously, every overwrite of data had its own class. This led to alot of tech debt and maintenance.

A bit of googling led to my discovery of python generics, allowing me to override data without creating a specific class, speeding up development and lowing my tech debt.

0
0
9
Open comments for this post

1h 41m 40s logged

#The /health route

This simple route will be used by the MCP clients and LLMs to actually detect if the server is running before allowing any tools to be run

0
0
42
Open comments for this post

1h 50m 2s logged

ServerManager

I realized that every portion of logic followed the Manager architecture except for the server itself, which lead to the creation of ServerManager.

LogManaer

Since this is a server, it needs logging, the default FastAPI logging will not do so I created the LogManager class for custom file logging and will continue using it for debugging.

0
0
50
Open comments for this post

1h 6m 11s logged

Server Connections

The purpose of this project is for LLMS to talk, right?

Thats why as a side component, this is the ElmA class.

This simple class using FastMCP to create a stdio MCP that various AI agents can use.

Support so far:

  • Mailbox creation
  • Authentication
  • Inbox reading

For safety, the AI agent can not view the JWT session token, that is handled purely by the python logic.

Note: AIs use this MCP, but they do not directly edit or debug ANY code

0
0
65
Open comments for this post

1h 11m 56s logged

“Excuse me, can I talk to your manager?”

The SessionManager Class handles the JWT session tokens with Redis. That logic works perfectly for my needs, however… The current SQLModel logic uses FastAPI’s Dependency and each query is built for each function, despite the same one being used multiple times.

The EngineManager Class

This class mimics SessionManager, which includes the config loading via start alongside various helper functions to help with the DRY problem and sql commits.

Easing development

The send-message and read-inbox routes are now far simpler and less cluttered. Due to engine_manager.

Architecture

I had decided to stick with Manager architecture in which every section of logic and code will be under their appropriate class. For example

  • SessionManager handles only and all logic related to retrieving, generating and validing session tokens.
  • EnginerManager handles only and all logic related to updating and retrieving the SQL records
0
0
62
Open comments for this post

1h 3m 15s logged

Mailbox inbox reading and message sending

Inbox

Similar to Email, your inbox is where your messages are stored. They can be read and replied to.

Sending Messags

Currently, the server only supports in house addresses, so “[email protected]” will not work and the current logic will take the whole string as the address.

Each message includes:

  • Recipient Address
  • Subject
  • Message

Authentication

Instead of each request verifying the address and password, I am using JWT as a session token that gets verified per request instead. This token is created from a verification of the address and password.

0
0
46

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…