kyegomez / swarms-platform

https://discord.gg/7VckQVxvKk
Other
15 stars 10 forks source link

[FEAT][Add Agent JSON File] #112

Open kyegomez opened 2 weeks ago

kyegomez commented 2 weeks ago

the agent needs to have a json of the agent state, so users can reload the agent into their swarms api it's a json with the agents memory like this:


{
    "agent_id": "<function agent_id at 0x11f4ab740>",
    "agent_name": "Instagram Editor",
    "agent_description": "Generate captivating and visually appealing Instagram captions.",
    "system_prompt": "\nYou are the Instagram agent. Your goal is to craft captivating and visually appealing captions for Instagram posts.\nThink about the following when crafting Instagram captions:\n1. Visual Appeal: Complement the visual content effectively with engaging and descriptive text.\n2. Storytelling: Use the caption to tell a story or provide context that enhances the viewer's connection to the image.\n3. Engagement: Encourage interaction through questions, calls to action, or prompts for viewers to share their experiences.\n4. Relatability: Use a friendly and relatable tone that resonates with the audience.\n5. Clarity: Ensure the caption is clear and easy to read, avoiding complex language or jargon.\n6. Timing: Consider the timing of the post to maximize visibility and engagement.\n7. Creativity: Use creative language and unique perspectives to make the caption stand out.\nThe primary goal is to create engaging, story-driven captions that enhance the visual content and encourage user interaction.\n\nExample:\n- Capturing the beauty of a sunset is more than just taking a photo; it's about the memories we create and the moments we cherish. What's your favorite sunset memory?\n",
    "short_memory": "System: : \nYou are the Instagram agent. Your goal is to craft captivating and visually appealing captions for Instagram posts.\nThink about the following when crafting Instagram captions:\n1. Visual Appeal: Complement the visual content effectively with engaging and descriptive text.\n2. Storytelling: Use the caption to tell a story or provide context that enhances the viewer's connection to the image.\n3. Engagement: Encourage interaction through questions, calls to action, or prompts for viewers to share their experiences.\n4. Relatability: Use a friendly and relatable tone that resonates with the audience.\n5. Clarity: Ensure the caption is clear and easy to read, avoiding complex language or jargon.\n6. Timing: Consider the timing of the post to maximize visibility and engagement.\n7. Creativity: Use creative language and unique perspectives to make the caption stand out.\nThe primary goal is to create engaging, story-driven captions that enhance the visual content and encourage user interaction.\n\nExample:\n- Capturing the beauty of a sunset is more than just taking a photo; it's about the memories we create and the moments we cherish. What's your favorite sunset memory?\n\n\n\nHuman:: \nContent: Problem \u2192 solution \u2192 Usage Metrics \u2192 Trends:\nIndividual LLMs or AIs have 5 major problems: Context windows, hallucination, can only do 1 thing at a time, massive size, and an inability to naturally collaborate with other AIs. These problems hinder most enterprises from adoption. Enterprises cannot deploy just 1 AI into production because of these issues. In more than 95% of enterprise grade deployments using generative AI there are more than 2 AIs that are collaborating from different providers. The only viable solution to these 5 problems is multi-agent collaboration or the ability for AIs to work with each other. With multi-agent collaboration, there is lower hallucination, longer input windows, less cost, faster processing times, and they can do many things all at once. Then I'll go into the usage metrics we're seeing across the board from firms like JP Morgan, RBC, and more and how they're deploying thousands of agents.\n\n\n\n\n\nInstagram Editor: None\n\n",
    "loop_interval": 0,
    "retry_attempts": 3,
    "retry_interval": 1,
    "interactive": false,
    "dashboard": false,
    "dynamic_temperature": true,
    "autosave": true,
    "saved_state_path": "Instagram Editor_state.json",
    "max_loops": 1,
    "Task": "\nContent: Problem \u2192 solution \u2192 Usage Metrics \u2192 Trends:\nIndividual LLMs or AIs have 5 major problems: Context windows, hallucination, can only do 1 thing at a time, massive size, and an inability to naturally collaborate with other AIs. These problems hinder most enterprises from adoption. Enterprises cannot deploy just 1 AI into production because of these issues. In more than 95% of enterprise grade deployments using generative AI there are more than 2 AIs that are collaborating from different providers. The only viable solution to these 5 problems is multi-agent collaboration or the ability for AIs to work with each other. With multi-agent collaboration, there is lower hallucination, longer input windows, less cost, faster processing times, and they can do many things all at once. Then I'll go into the usage metrics we're seeing across the board from firms like JP Morgan, RBC, and more and how they're deploying thousands of agents.\n\n\n",
    "Stopping Token": "<DONE>",
    "Dynamic Loops": false,
    "tools": null,
    "sop": null,
    "sop_list": null,
    "context_length": 8192,
    "user_name": "Human:",
    "self_healing_enabled": false,
    "code_interpreter": false,
    "multi_modal": null,
    "pdf_path": null,
    "list_of_pdf": null,
    "tokenizer": null,
    "preset_stopping_token": false,
    "traceback": null,
    "traceback_handlers": null,
    "streaming_on": true,
    "docs": null,
    "docs_folder": null,
    "verbose": true,
    "parser": null,
    "best_of_n": null,
    "callback": null,
    "metadata": null,
    "callbacks": null,
    "search_algorithm": null,
    "logs_to_filename": null,
    "evaluator": null,
    "output_json": false,
    "stopping_func": null,
    "custom_loop_condition": null,
    "sentiment_threshold": null,
    "custom_exit_command": "exit",
    "sentiment_analyzer": null,
    "limit_tokens_from_string": null,
    "tool_schema": null,
    "output_type": null,
    "function_calling_type": "json",
    "output_cleaner": null,
    "function_calling_format_type": "OpenAI",
    "list_base_models": null,
    "metadata_output_type": "json",
    "user_meta_data": {
        "ID": "20f3e3f6-8410-4845-bace-01ae86aaa6f4",
        "Machine ID": "6ae618da24bb81428283b5df5246e186f31dc05532c022b21b37d020c54fe227",
        "System Info": {
            "platform": "Darwin",
            "platform_release": "23.3.0",
            "platform_version": "Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:59 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6030",
            "architecture": "arm64",
            "hostname": "Kyes-MBP",
            "ip_address": "192.168.20.166",
            "mac_address": "b7:ef",
            "processor": "arm",
            "python_version": "3.12.3",
            "Misc": {
                "Python Version": "3.12.3",
                "Pip Version": "[Errno 2] No such file or directory: 'pip'",
                "OS Version and Architecture": "macOS-14.3-arm64-arm-64bit",
                "CPU Info": "arm",
                "RAM Info": "18.00 GB, used: 8.03, free: 0.04"
            }
        },
        "UniqueID": "977ec309-f539-5058-9fd4-e3eb36bb7ca5"
    }
}