Skip to content

Instantly share code, notes, and snippets.

View xianminx's full-sized avatar
🏠
Working from home

Lucas xianminx

🏠
Working from home
  • 11:57 (UTC +08:00)
View GitHub Profile
@xianminx
xianminx / 100S218.mjs
Created October 8, 2024 03:59
西方文明史 搬运到 Youtube 和 Spotify
/**
* # 西方文明史 搬运到 Youtube 和 Spotify
*
* [西方文明史](https://ocw.aca.ntu.edu.tw/ntu-ocw/ocw/cou/100S218/1) 是台湾大学 歷史系 劉慧教授所讲。
* 多年前在通勤路上听过一个学期,非常受教。 搬运到 Youtube 和 Spotify(音频) 方便大家观看。
*
* 本課程將介紹西方文明在公元 1500 年之前上古、古典、中古時期的發展。課程從文明的起源、近東地區文字與城市的出現談起;
* 進入西方文明之典範的希臘、羅馬時期後,將以哲學思想、政治組織為重心;接著介紹基督...
*/
@xianminx
xianminx / README.md
Last active October 24, 2024 04:37
Demo show when multiple agents are called in parallel, only the last agent is running when using OpenAI's Swarm framework

Running Multiple Agents in Parallel with the OpenAI Swarm Framework

Issue: Parallel Execution of Agents

In the current implementation, when multiple tools return agents, the code enters a loop where intermediate agent executions are lost. Specifically, if more than one tool provides an agent, the context from one agent is overwritten, leading to incorrect or incomplete execution.

For instance, consider the following code from core.py:

@xianminx
xianminx / swarm_music_multi_agents.py
Created November 12, 2024 06:30
Swarm cannot support multi agents to work concurrently.
from typing import List
from swarm import Agent
from swarm.repl.repl import run_demo_loop
# Simulated music player and lyrics database
music_library = {
"Bohemian Rhapsody": {
"artist": "Queen",
"lyrics": "Is this the real life? Is this just fantasy?...",
@xianminx
xianminx / smolagents.md
Created January 7, 2025 09:43
SmolAgents architecture

@startuml

package "smolagents" {
    class Tool {
        +name: str
        +description: str
@xianminx
xianminx / agent loop
Created March 10, 2025 12:03 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet