Quick Start
Welcome to the Iryna Framework! This quick start guide will help you set up and run an intelligent agent using the framework. Follow these steps to get started:
Prerequisites
Before you begin, ensure you have the following installed on your machine:
- Node.js (v23.3.0 or later)
- npm (v10.9.0 or later)
- TypeScript (globally installed for development)
Installation
-
Clone the Repository
git clone https://github.com/Irys-xyz/iryna.git
cd iryna -
Install Dependencies
npm install -
Build the Project
npm run build
Running the Agent
-
Set Up Environment Variables
Create a
.envfile in the root directory and define the necessary API keys and configurations:PORT=3000
API_URL=http://localhost:3000
EVM_WALLET_PRIVATE_KEY=
EVM_WALLET_PUBLIC_KEY=
OPENAI_API_KEY=
IONET_API_KEY=
HYPERBOLIC_API_KEY=
OLLAMA_HOST=http://127.0.0.1:11434
SWARM_ORCHESTRATOR_URL=http://127.0.0.1:3000 # As to be changed in the future -
Start the Server
npm run startThe server will start on the port specified in the
.envfile (default is3000). You should see a message indicating that the server is running:Server is running on port 3000 -
Verify the Server
You can perform a health check by navigating to
http://localhost:3000/healthin your browser or usingcurl:curl http://localhost:3000/healthResponse:
{
"status": "ok"
}
Using the Client
The Iryna Framework includes a visual client interface that makes it easy to design and manage your agent workflows without writing code.
-
Start the Client
npm run start-clientThis will launch the client interface in your default web browser.
-
Purpose of the Client
The client provides a visual workflow builder that allows you to:
- Design agent behaviors through a drag-and-drop interface
- Configure AI models from multiple providers (OpenAI, Hyperbolic, Ionet, Ollama)
- Create and connect action nodes to define what your agent can do
- Save, load, and share your workflows
- Export workflows for deployment
-
Creating Your First Workflow
- Drag nodes from the sidebar onto the canvas
- Connect nodes by dragging from one handle to another
- Configure each node by clicking on it and adjusting parameters
- Save your workflow using the save button in the header
For more detailed information about the client, see the Client documentation.
API Overview
The agent exposes a RESTful API for interacting with it. Here's a summary of the available endpoints:
Base URL
http://localhost:3000/api/agent
Endpoints
-
Send Message
POST
/send-messageDescription: Sends a message to the agent and receives a response.
Request Body:
{
"message": "What's the weather like in New York today?"
}Response:
{
"response": "The current temperature in New York is 15°C with clear skies.",
"requestId": "unique-request-id"
} -
Check Agent Status
GET
/statusDescription: Retrieves the current status of the agent.
Response:
{
"status": "ready",
"agent": "agent-id"
} -
Execute All Workflows
POST
/execute-workflowsDescription: Executes all defined workflows in parallel.
Response:
{
"status": "Workflows executed successfully."
}
Example Usage with curl
-
Send a Message:
curl -X POST http://localhost:3000/api/agent/send-message \
-H "Content-Type: application/json" \
-d '{"message": "Tell me the weather in London."}' -
Check Status:
curl http://localhost:3000/api/agent/status -
Execute Workflows:
curl -X POST http://localhost:3000/api/agent/execute-workflows -
Execute Workflow with Function Calling:
curl -X POST http://localhost:3000/api/agent/send-message \
-H "Content-Type: application/json" \
-d '{"message" : "Execute the workflow DailyWeather"}' -
Execute Action with Function Calling:
curl -X POST http://localhost:3000/api/agent/send-message \
-H "Content-Type: application/json" \
-d '{"message" : "Buy token:HYPE quantity:1 on Hyperliquid"}'
Troubleshooting
-
Agent Not Initializing:
- Ensure all required environment variables are set in the
.envfile. - Check for errors in the server logs.
- Ensure all required environment variables are set in the
-
Action Not Found:
- Verify that the action class is correctly exported and placed in the appropriate plugin directory.
- Ensure the
ActionLoaderis correctly loading actions from the plugins.
-
API Issues:
- Confirm that the server is running and accessible on the specified port.
- Check API endpoint paths and request formats.
Contributing
Contributions are welcome! Please follow these steps:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/YourFeature -
Commit Your Changes
git commit -m "Add YourFeature" -
Push to the Branch
git push origin feature/YourFeature -
Open a Pull Request