🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 9 Min Lesezeit
0

Quick tip: Using SingleStore with OpenAI's Swarm

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Abstract



In this short article, we'll build a system designed to analyse and derive investment insights from blockchain trends using a sequential flow of specialised agents. The first agent, a blockchain expert, retrieves the latest developments and trends in blockchain technology specific to Northern Ireland. This response is stored in a shared context, accessible to the second agent - an investment expert - which further refines and identifies potential investment opportunities within the blockchain context. This layered approach uses domain-specific expertise, allowing each agent to contribute unique insights, resulting in a more comprehensive analysis of blockchain investment opportunities.



The notebook file used in this article is available on . Swarm is a stateless framework that enables the creation and management of multiple AI agents, allowing them to collaborate and solve complex tasks by breaking them down into smaller, more manageable subtasks.



In this short article, we'll build a super simple example using two agents and a sequential flow.






Create a SingleStore Cloud account



A previous article showed the steps to create a free SingleStore Cloud account. We'll use the Free Shared Tier and take the default names for the Workspace and Database. We'll store our OpenAI Key in the .



From the left navigation pane in the SingleStore cloud portal, we'll select DEVELOP > Data Studio.



In the top right of the web page, we'll select New Notebook > Import From File. We'll use the wizard to locate and import the notebook we downloaded from GitHub.






Run the notebook



After checking that we are connected to our SingleStore workspace, we'll run the cells one by one.



We'll begin by installing the necessary libraries and importing dependencies.



Next, we'll ensure that we are connected to our database:




CODE
from sqlalchemy import *

conn = create_engine(connection_url)






We'll download a file from the internet that contains details of investment opportunities in Northern Ireland:




CODE
loader = OnlinePDFLoader("https://www.investni.com/sites/default/files/2021-02/NI-fintech-document.pdf")

data = loader.load()






and we'll get some details:




CODE
print (f"You have {len(data)} document(s) in your data")
print (f"There are {len(data[0].page_content)} characters in your document")






Example output:




CODE
You have 1 document(s) in your data
There are 39674 characters in your document






Next, we'll split the document into chunks with a small chunk overlap:




CODE
text_splitter = RecursiveCharacterTextSplitter(
chunk_size = 2000,
chunk_overlap = 20
)
texts = text_splitter.split_documents(data)

print (f"You have {len(texts)} pages")






Example output:




CODE
You have 23 pages






Now we'll get the OpenAI Key from the secrets vault:




CODE
os.environ["OPENAI_API_KEY"] = get_secret("OPENAI_API_KEY")






and drop the database table if it already exists:




CODE
DROP TABLE IF EXISTS fintech_docs;






Next, we'll use LangChain to get the embeddings and store the document and embeddings in SingleStore:




CODE
embedding = OpenAIEmbeddings(model = "text-embedding-3-small")

docsearch = SingleStoreDB.from_documents(
texts,
embedding,
table_name = "fintech_docs"
)






We'll now define two functions. The first function will query the database using a similarity search and the second function will transfer control from one agent to another agent:




CODE
# Define the search function
def search_s2(query_text: str) -> str:
# Perform a similarity search and return the first result's content
docs = docsearch.similarity_search(query_text)
return docs[0].page_content

# Define a function to transfer control to Agent B
def transfer_to_agent_b():
return agent_b






Now we'll define our two agents:




CODE
# Define shared context to hold information between agents
shared_context = {}

# Define Agent A to focus on blockchain context
agent_a = Agent(
name = "Blockchain Expert",
model = "gpt-4o-mini",
instructions = "You are an expert in blockchain technology.",
functions = [search_s2, transfer_to_agent_b]
)

# Define Agent B to focus on investment opportunities
agent_b = Agent(
name = "Investment Expert",
model = "gpt-4o-mini",
instructions = "You are an expert in stock market investment."
)






Agent A is a Blockchain Expert and will be called first. It will transfer control to Agent B which is an Investment Expert.



We'll now run Agent A and save its results for use by Agent B.




CODE
client = Swarm()

# Run Agent A with a blockchain-specific query
response_a = client.run(
agent = agent_a,
messages = [{
"role": "user",
"content": "What are the latest developments and trends in blockchain technology in Northern Ireland?"
}],
)

# Store Agent A's response in shared context for Agent B to expand on
shared_context["blockchain_context"] = response_a.messages[-1]["content"]

# Output the response from Agent A
print(shared_context["blockchain_context"])






Example output:




CODE
Northern Ireland is emerging as a notable hub for blockchain technology and FinTech, driven by several key developments and trends:

1. **Growth in FinTech Sector**: Northern Ireland boasts a robust FinTech sector, attracting international firms due to its combination of world-class talent, competitive operating costs, and resilient infrastructure. This has made it a leading global location for FinTech investments.

2. **Investment from Global Firms**: Major companies such as Citi, Allstate, Liberty Mutual, and FD Technologies have established operations in the region. New entrants like CME Group, Vela, and TP ICAP are also setting up significant delivery centers, indicating a strong confidence in the local ecosystem.

3. **Focus on Emerging Technologies**: There is a significant emphasis on emerging technologies including blockchain, machine learning, and artificial intelligence. The local industry is experiencing transformation powered by advancements in data analytics, digital and mobile technologies, and automation.

4. **Thriving Start-up Ecosystem**: The startup and SME tech community in Northern Ireland is vibrant, supported by an entrepreneurial ecosystem and active sector collaboration efforts. This environment fosters innovation and encourages the development of blockchain solutions.

5. **Cybersecurity and Compliance**: As blockchain technology continues to develop, so does the importance of cybersecurity and regulatory compliance, both of which are pivotal in maintaining the integrity and trustworthiness of blockchain applications.

These trends highlight Northern Ireland's position as a center of excellence for technology and innovation, particularly in the realm of blockchain and financial services.






Now we'll call Agent B.




CODE
# Run Agent B with a focus on investment opportunities within the blockchain context
response_b = client.run(
agent = agent_b,
messages = [{
"role": "user",
"content": f"{shared_context['blockchain_context']} Based on these developments, what are the best investment opportunities in blockchain in Northern Ireland?"
}],
)

# Output the final response from Agent B
print(response_b.messages[-1]["content"])






Example output:




CODE
Investing in blockchain technology and the FinTech sector in Northern Ireland presents several promising opportunities. Here are some investment avenues to consider:

1. **Investment in Startups**:
- **Venture Capital and Angel Investing**: Consider investing in early-stage FinTech and blockchain startups that are leveraging innovative solutions. Companies focused on areas like blockchain for payments, supply chain transparency, or decentralized finance (DeFi) may yield high returns given the region's growth potential.
- **Accelerator Programs**: Support or invest in accelerator programs that help nurture promising blockchain startups. These programs often provide seed funding and mentorship, increasing the chances of success.

2. **Partnerships with Established Firms**:
- **Collaborate with Local Companies**: Engage established FinTech companies and blockchain firms in Northern Ireland to leverage their expertise in product development and go-to-market strategies. Companies like Citi, Liberty Mutual, and FD Technologies could provide avenues for collaboration and shared innovation.

3. **Blockchain Applications in Traditional Industries**:
- **Sector-Specific Solutions**: Look for opportunities that apply blockchain technology in traditional industries such as agriculture, healthcare, and logistics. These sectors are ripe for disruption with blockchain's capabilities, particularly in areas like supply chain management and traceability.

4. **Cybersecurity and Compliance Technologies**:
- **Invest in Security Solutions**: Given the emphasis on cybersecurity and regulatory compliance, investing in companies that provide security solutions specifically tailored for blockchain applications can be beneficial. Startups focusing on secure transaction protocols, identity verification, and compliance solutions may be lucrative.

5. **Collaborative Research and Development**:
- **Research Institutions**: Partner with local universities and research institutions that are exploring blockchain technologies. Funding collaborative R&D projects could lead to innovative breakthroughs and potential commercial applications.

6. **Public-Private Partnerships**:
- **Government Initiatives**: Explore investment opportunities in public-private partnerships that aim to promote blockchain technology adoption in Northern Ireland. Engaging with government bodies can provide insights into policy directions and potential funding opportunities.

7. **Blockchain Education and Training Programs**:
- **Invest in Training Institutions**: Consider investing in or partnering with educational institutions that offer programs in blockchain technology and FinTech. As the demand for skilled professionals rises, these initiatives can generate substantial returns through tuition and partnerships with businesses looking to upskill their workforce.

8. **Tokenization of Assets**:
- **Explore Asset Tokenization**: Investing in projects focusing on the tokenization of illiquid assets (such as real estate or art) could be a significant opportunity. This market is still emerging and holds considerable potential for growth and innovation.

In conclusion, Northern Ireland's favorable environment for blockchain technology and FinTech presents multiple investment opportunities. The focus on innovation, established firms' willingness to invest, and the local startup ecosystem all contribute to creating a viable landscape for future growth in this sector. Due diligence and careful selection of partnerships and projects will be vital in maximizing investment returns.









Summary



In this short article, we've built a two-agent system that applied specialised expertise to analyse blockchain trends and derive investment insights. By dividing tasks between two agents - one focusing on blockchain developments and the other on investment potential - the system demonstrated an efficient, layered approach to complex data analysis. The blockchain expert identified and retrieved relevant trends specific to Northern Ireland, which were then passed to an investment expert. With access to this blockchain-specific context, the investment expert was able to identify investment opportunities within the blockchain landscape. This setup showcased the benefits of multi-agent collaboration, where each agent's domain knowledge contributed to a deeper, more focused analysis, ultimately enhancing decision-making in investment strategies.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Quick tip: Using SingleStore with OpenAI's Swarm

Thematisch verwandte Begriffe: Quick, Using, SingleStore, with · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...