Skip to content
Merged

Dev #100

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests

on:
push:
branches: [ main, master, dev, re-org, production ]
branches: [ main, master, dev, server, re-org, production ]
pull_request:
branches: [ main, master, dev, re-org, production ]
branches: [ main, master, dev, server, re-org, production ]

jobs:
test:
Expand Down Expand Up @@ -46,6 +46,7 @@ jobs:
run: |
cd "${{ github.workspace }}"
python -m pytest tests/test_memory_server.py \
tests/test_credit_system.py \
tests/test_auth_provider.py \
tests/test_queue.py \
tests/test_redis_integration.py -v
Expand Down
56 changes: 35 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@

Your personal AI that builds memory through screen observation and natural conversation

<table>
<tr>
<td style="border-left: 6px solid #d35400; background: #fff3e0; padding: 12px;">
<strong>Important Update: 0.1.4 (Main) vs 0.1.3 (Desktop Agent)</strong><br/>
Starting with <code>0.1.4</code>, the <code>main</code> branch is a brand-new release line where Mirix is a pure memory system that can be plugged into any existing agents. The desktop personal assistant (frontend + backend) has been deprecated and is no longer shipped on <code>main</code>. If you need the earlier desktop application with the built-in agent, use the <code>desktop-agent</code> branch.
</td>
</tr>
</table>

| 🌐 [Website](https://mirix.io) | 📚 [Documentation](https://docs.mirix.io) | 📄 [Paper](https://arxiv.org/abs/2507.07957) | 💬 [Discord](https://discord.gg/S6CeHNrJ)
<!-- | [Twitter/X](https://twitter.com/mirix_ai) | [Discord](https://discord.gg/S6CeHNrJ) | -->

---

### Key Features 🔥

- **Multi-Agent Memory System:** Six specialized memory components (Core, Episodic, Semantic, Procedural, Resource, Knowledge Vault) managed by dedicated agents
- **Multi-Agent Memory System:** Six specialized memory components (Core, Episodic, Semantic, Procedural, Resource, Knowledge) managed by dedicated agents
- **Screen Activity Tracking:** Continuous visual data capture and intelligent consolidation into structured memories
- **Privacy-First Design:** All long-term data stored locally with user-controlled privacy settings
- **Advanced Search:** PostgreSQL-native BM25 full-text search with vector similarity support
Expand Down Expand Up @@ -44,35 +53,40 @@ client = MirixClient(
client.initialize_meta_agent(
config={
"llm_config": {
"model": "gemini-2.0-flash",
"model_endpoint_type": "google_ai",
"api_key": "your-api-key-here",
"model_endpoint": "https://generativelanguage.googleapis.com",
"context_window": 1_000_000,
"model": "gpt-4o-mini",
"model_endpoint_type": "openai",
"model_endpoint": "https://api.openai.com/v1",
"context_window": 128000,
},
"build_embeddings_for_memory": True,
"embedding_config": {
"embedding_model": "text-embedding-004",
"embedding_endpoint_type": "google_ai",
"api_key": "your-api-key-here",
"embedding_endpoint": "https://generativelanguage.googleapis.com",
"embedding_dim": 768,
"embedding_model": "text-embedding-3-small",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_endpoint_type": "openai",
"embedding_dim": 1536,
},
"meta_agent_config": {
"system_prompts_folder": "mirix\\prompts\\system\\base",
"agents": [
{
"core_memory_agent": {
"blocks": [
{"label": "human", "value": ""},
{"label": "persona", "value": "I am a helpful assistant."},
]
}
},
"core_memory_agent",
"resource_memory_agent",
"semantic_memory_agent",
"episodic_memory_agent",
"procedural_memory_agent",
"knowledge_vault_memory_agent",
"knowledge_memory_agent",
"reflexion_agent",
"background_agent",
],
"memory": {
"core": [
{"label": "human", "value": ""},
{"label": "persona", "value": "I am a helpful assistant."},
],
"decay": {
"fade_after_days": 30,
"expire_after_days": 90,
},
},
},
}
)
Expand Down Expand Up @@ -110,7 +124,7 @@ Connect with other Mirix users, share your thoughts, and get support:

### 💬 Discord Community
Join our Discord server for real-time discussions, support, and community updates:
**[https://discord.gg/S6CeHNrJ](https://discord.gg/S6CeHNrJ)**
**[https://discord.gg/FXtXJuRf](https://discord.gg/FXtXJuRf)**

### 🎯 Weekly Discussion Sessions
We host weekly discussion sessions where you can:
Expand Down
Binary file added client_env/Scripts/python.exe
Binary file not shown.
15 changes: 15 additions & 0 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dashboard/src/components/UserSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const UserSwitcher: React.FC<{ className?: string }> = ({ className }) =>

// Check if a user is the default user
const isDefaultUser = (user: User) => {
return clientUser?.default_user_id === user.id;
return clientUser?.admin_user_id === user.id;
};

const handleCreateUser = async (e: React.FormEvent) => {
Expand Down
36 changes: 36 additions & 0 deletions dashboard/src/components/ui/badge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"

const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
default:
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
secondary:
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
destructive:
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
outline: "text-foreground",
},
},
defaultVariants: {
variant: "default",
},
}
)

export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}

function Badge({ className, variant, ...props }: BadgeProps) {
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
)
}

export { Badge, badgeVariants }

21 changes: 21 additions & 0 deletions dashboard/src/components/ui/separator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from "react"
import { cn } from "@/lib/utils"

const Separator = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement> & { orientation?: "horizontal" | "vertical" }
>(({ className, orientation = "horizontal", ...props }, ref) => (
<div
ref={ref}
className={cn(
"shrink-0 bg-border",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
className
)}
{...props}
/>
))
Separator.displayName = "Separator"

export { Separator }

23 changes: 20 additions & 3 deletions dashboard/src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContext, useContext, useState, useEffect } from 'react';
import { createContext, useContext, useState, useEffect, useCallback } from 'react';
import apiClient from '@/api/client';
import { useNavigate } from 'react-router-dom';

Expand All @@ -8,15 +8,17 @@ interface ClientUser {
email: string;
scope: string;
status: string;
default_user_id: string; // Default user for memory operations
admin_user_id: string; // Default user for memory operations
created_at: string;
credits: number; // Available credits for LLM API calls
}

interface AuthContextType {
user: ClientUser | null;
token: string | null;
login: (token: string, user: ClientUser) => void;
logout: () => void;
refreshUser: () => Promise<void>; // Refresh user data from server
isAuthenticated: boolean;
isLoading: boolean;
}
Expand Down Expand Up @@ -70,8 +72,23 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
navigate('/login');
};

const refreshUser = useCallback(async () => {
const storedToken = localStorage.getItem('token');
if (!storedToken) return;

try {
const response = await apiClient.get('/admin/auth/me');
setUser(response.data);
setToken(storedToken);
} catch (error) {
console.error('Failed to refresh user profile', error);
}
}, []);

return (
<AuthContext.Provider value={{ user, token, login, logout, isAuthenticated: !!user, isLoading }}>
<AuthContext.Provider
value={{ user, token, login, logout, refreshUser, isAuthenticated: !!user, isLoading }}
>
{children}
</AuthContext.Provider>
);
Expand Down
Loading
Loading