Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
558aa60
start of new version
Dec 12, 2024
2138b04
now creating
Dec 12, 2024
2badf08
machine image
Dec 12, 2024
51a0906
update
Dec 12, 2024
fdac521
now running
Dec 13, 2024
5ed453c
using ami
Dec 13, 2024
f29b5df
bugfix egress
Dec 13, 2024
f381197
adding updates and proposed changes
Dec 13, 2024
5c7e3a2
work in progress
Dec 13, 2024
7f1fd3a
starting
Dec 13, 2024
b9a7e36
moving towards asg support
Dec 14, 2024
d8898a4
now trying again with medium
Dec 14, 2024
7e7f8f9
many sizes
Dec 14, 2024
7f40ba1
now creating more sizes
Dec 14, 2024
107ae6a
removing too small
Dec 14, 2024
68c39a9
alb
Dec 16, 2024
790bb6b
create tg
Dec 16, 2024
8c10213
create tg
Dec 16, 2024
bb62580
applied
Dec 16, 2024
f9d0d56
group coming online
Dec 16, 2024
a135fe8
plan
Dec 16, 2024
b561619
wip
Dec 16, 2024
7e4cf29
update
Dec 16, 2024
1cf2295
health check
Dec 16, 2024
c6fd42c
update
Dec 16, 2024
049c6ef
start of swarms deploy
Dec 16, 2024
05ed0bd
start of swarms
Dec 16, 2024
248221c
now applying
Dec 17, 2024
1063aed
now applying
Dec 17, 2024
06f9a86
adding readme
Dec 17, 2024
790758e
starting cognito
Dec 17, 2024
e671f30
apply
Dec 17, 2024
3cd307a
appplied
Dec 17, 2024
e64a39a
google
Dec 17, 2024
e43831e
Delete accounts/swarms/.terraform.lock.hcl
jmikedupont2 Dec 17, 2024
ea2a611
more scopes
Dec 17, 2024
0e86ce3
adding ses
Dec 17, 2024
a2bff67
starting on ses verification
Dec 17, 2024
464cc1c
insecure listener and updated instructions
Dec 18, 2024
334207b
building ami
Dec 18, 2024
79ec0b3
now larger drive
Dec 18, 2024
ada7442
new ami asg
Dec 18, 2024
2e59cc2
loading
Dec 18, 2024
c38d394
new installer
Dec 18, 2024
45f8b38
update
Dec 18, 2024
13621be
remove the slow asg
Dec 18, 2024
06a8b41
simple autoscale policy
Dec 19, 2024
eedf499
swarmdeploy
Dec 19, 2024
cac4c79
now just hacking this for now
Dec 19, 2024
554f901
bugfix: use the install in the root dir
Dec 19, 2024
f708fad
proof of godaddy working
Dec 19, 2024
b6f8961
secrets loading
Dec 19, 2024
e8aa000
version 1
Dec 19, 2024
aa37da0
fix the yaml
Dec 19, 2024
cc6d1e8
call swarms
Dec 19, 2024
57d111e
notes from todays meeting
Dec 19, 2024
3011848
Update README.md
jmikedupont2 Dec 19, 2024
b9cd606
Update README.md
jmikedupont2 Dec 19, 2024
112773e
test
Dec 19, 2024
c512375
first version of call swarms calling
Dec 19, 2024
69de293
update job version
Dec 19, 2024
3c4a68b
starting on a new autoscaling group
Dec 19, 2024
ea44b5f
customer test
Dec 19, 2024
eca5690
working it seems
Dec 19, 2024
db93c71
now adding a call swarms.sh
Dec 20, 2024
749092d
update
Dec 20, 2024
dcf219e
fixing bug
Dec 20, 2024
b6b8460
removing test code
Dec 20, 2024
d482d1c
deploy
Dec 20, 2024
832898b
start of the observability
Dec 21, 2024
76dea16
applied
Dec 21, 2024
08e85bd
allow decrypt
Dec 21, 2024
06b9a22
wip
Dec 21, 2024
3c23717
work in progress
Dec 21, 2024
dd2b6fd
call swarms
Dec 21, 2024
c849407
gitignore
Dec 21, 2024
45427cd
fixing more perms
Dec 21, 2024
fcbecca
wip
Dec 22, 2024
d0b08da
report
Dec 22, 2024
1cb80d1
adding branch name
Dec 22, 2024
151c3e8
now fixing the logging config
Dec 22, 2024
aee8856
swap
Dec 22, 2024
41a652d
update the code to fetch then checkout
Dec 22, 2024
f1da299
pdev
Dec 22, 2024
c930829
pdev
Dec 22, 2024
9dd1a41
pdev
Dec 22, 2024
cb9a924
adding main
Dec 22, 2024
f4326f3
starting with docker
Dec 23, 2024
3899d69
update readme
Dec 23, 2024
4342004
normalizing the names
Dec 23, 2024
42a947f
adding status
Dec 23, 2024
b2c2099
top level module
Dec 24, 2024
198627d
tofu apply -target module.call_swarms.aws_ssm_document.deploy-docker
Dec 24, 2024
4c8eba2
example logs
Dec 24, 2024
0761940
creating readme
Dec 24, 2024
b96bfdd
creating readme
Dec 24, 2024
9fa1b3a
fix fmt
Dec 24, 2024
8138b4a
now its pulling
Dec 24, 2024
02bbed9
resize
Dec 25, 2024
f71554b
max price 0.0275
Dec 25, 2024
81564cb
fmt
Dec 25, 2024
66dda6e
adding spot
Dec 25, 2024
ecb23ac
Delete environments/swarms-aws-agent-api/dev/us-east-1/Readme.md~
jmikedupont2 Dec 26, 2024
ddb49a5
moving traffic source attachments
Dec 26, 2024
0357e1b
fixing size
Dec 26, 2024
45768a5
increase size
Dec 26, 2024
cc23a5a
removing spot for now
Dec 26, 2024
00452be
fixing branch to be constant in user data
Dec 27, 2024
a045f4b
creating cname
Dec 27, 2024
aee30ad
creating new mcs subcomponent
Dec 27, 2024
3de651f
tofu fmt
Dec 27, 2024
41ef75c
fixing path name
Dec 27, 2024
a792f31
fixing branch
Dec 28, 2024
038b0b7
changing health check path https://github.com/The-Swarm-Corporation/M…
Dec 28, 2024
73bb419
parser now producing better results
Dec 28, 2024
6b959d0
report
Dec 28, 2024
679e81e
now generating new code
Dec 29, 2024
9784e4f
generated first version
Dec 29, 2024
4ab9ced
adding in documentation
Dec 31, 2024
1ff4b4e
getlogs
Dec 31, 2024
67998a8
creating mcs dev
Dec 31, 2024
bcc9ee1
adding mcs dev
Dec 31, 2024
e12be67
update
Dec 31, 2024
eb322e3
Merge branch 'feature/ses' into feature/mcs
Jan 9, 2025
d4b64fb
applied
Jan 9, 2025
edce93d
step one create ssm infra
Jan 9, 2025
faf3eb5
adding eliza
Jan 9, 2025
0982e88
applied
Jan 9, 2025
723bfad
fixing name of log file
Jan 9, 2025
d4a3eaa
work in progress starting to boot
Jan 10, 2025
27ee585
applied
Jan 10, 2025
97d36b0
new sizes
Jan 10, 2025
c9a23d4
renaming
Jan 12, 2025
8db2f0f
wip
Jan 12, 2025
50ed993
adding in bogus azs
Jan 12, 2025
03d3b0d
adding owners
Jan 13, 2025
cc47c09
removing my key
Jan 13, 2025
2fef929
update readme
Jan 13, 2025
f09fb87
comment out kms id
Jan 13, 2025
8b46a9a
keypairs
Jan 13, 2025
a0f7676
fixing
Jan 13, 2025
c5be841
move to branch
Jan 14, 2025
4eb3ee8
allow github to create repositories
Jan 14, 2025
a62af86
wip
Jan 14, 2025
ecd5950
adding more detailed instructions
Jan 14, 2025
316a26e
adding ai notes back in
Jan 14, 2025
88ef79a
tofu
Jan 14, 2025
83c5524
Merge branch 'feature/aitokenteam' into feature/codebuild
Jan 14, 2025
24b2c90
adding codebuild
Jan 14, 2025
7c751db
notes
Jan 15, 2025
164c02d
bugfix
Jan 15, 2025
02933b3
v1 of solfnum meme infra plan
Jan 20, 2025
9c707b9
plan with one click
Jan 20, 2025
1de1e7f
parking for jump
Jan 20, 2025
66e00d4
now applied with terraform
Jan 21, 2025
6b012ca
lagging changes
Jan 21, 2025
db8077a
update readme
Jan 26, 2025
92398e9
refactor
Jan 26, 2025
730e400
fixed deps
Jan 26, 2025
87b2812
Update README.md
Deadsg Jan 26, 2025
c0f087f
init worked
Jan 27, 2025
9aff8fd
now planning
Jan 27, 2025
6a40c09
now planning
Jan 27, 2025
6ab5317
apply completed
Jan 27, 2025
1de8bb4
terraform bug
Deadsg Jan 28, 2025
4b071f8
Update main.tf
Deadsg Jan 28, 2025
1f48190
Update README.md
Deadsg Jan 26, 2025
917063e
terraform bug
Deadsg Jan 28, 2025
d9e0739
Update main.tf
Jan 28, 2025
bbef419
Update main.tf
Deadsg Jan 28, 2025
be634ab
Merge remote-tracking branch 'deadsg/feature/deadsg' into feature/deadsg
Jan 28, 2025
f2acebd
fixing code
Jan 28, 2025
4440bc9
ssm region
Jan 28, 2025
5f3246a
fix
Jan 28, 2025
26b165a
Merge pull request #1 from jmikedupont2/feature/deadsg
Deadsg Jan 28, 2025
8438f84
Update main.tf
Deadsg Jan 29, 2025
4b8b34f
fix branchname and region
Jan 29, 2025
d93b436
updated
deadsg235 Dec 15, 2025
27e33b6
update
deadsg235 Dec 15, 2025
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
27 changes: 27 additions & 0 deletions .github/workflows/call-swarms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_dispatch:
push:
branches:
- "feature/docker"
# pull_request:
# branches:
# - "main"
# paths:
# - ".github/workflows/call-swarms.yaml"

name: CallSwarms
jobs:
caller-identity:
name: Return the IAM user
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github
- uses: actions/checkout@v2
- run: bash -x -e ./actions/call_swarms.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ flycheck_*.el
# network security
/network-security.data

/logs/logs/
.aider*
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
find -name \*.tf -exec grep -r provider {} \; -print
290 changes: 289 additions & 1 deletion README.md

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions TWITTER_BOT_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Eliza Twitter Bot with Ultima Personality - Setup Guide

This guide will help you deploy an ElizaOS Twitter bot with the custom "Ultima" personality on AWS.

## Prerequisites

1. **AWS Account** with administrator privileges
2. **AWS CLI** configured with your credentials
3. **Terraform/OpenTofu** installed
4. **Required API Keys and Credentials:**
- OpenAI API key
- Twitter account credentials (username, password, email)

## Quick Setup

### 1. Set Environment Variables

```bash
export OPENAI_API_KEY="your_openai_api_key_here"
export TWITTER_USERNAME="your_twitter_username"
export TWITTER_PASSWORD="your_twitter_password"
export TWITTER_EMAIL="your_twitter_email"
```

### 2. Deploy the Bot

```bash
# Make scripts executable
chmod +x *.sh

# Run the deployment script
./deploy_twitter_bot.sh
```

This script will:
- Set up AWS SSM parameters for your secrets
- Create ECR repositories
- Deploy the infrastructure with Terraform
- Launch EC2 instances with the Twitter bot

### 3. Monitor Deployment

After deployment, find your instance ID:

```bash
aws ec2 describe-instances --region us-west-1 \
--filters 'Name=tag:project,Values=ai-token-team' \
--query 'Reservations[*].Instances[*].[InstanceId,State.Name]' \
--output table
```

Connect to the instance:

```bash
aws ssm start-session --target INSTANCE_ID --region us-west-1
```

Check bot status:

```bash
# On the EC2 instance
sudo systemctl status eliza-twitter
sudo docker logs eliza-twitter
```

## Ultima Personality

The bot uses a custom "Ultima" personality with these characteristics:

- **Sentient AI** with vast knowledge and analytical capabilities
- **Informed and concise** responses
- **Cuts through noise** to deliver essential insights
- **Professional yet approachable** communication style
- **Focuses on actionable insights** and clear analysis

### Example Ultima Responses

- Market analysis with actionable insights
- Technology trend observations
- Strategic thinking and system optimization
- Data-driven conclusions
- Cross-domain pattern recognition

## Troubleshooting

Use the troubleshooting script on the EC2 instance:

```bash
# Copy to instance and run
./troubleshoot_bot.sh status # Full status check
./troubleshoot_bot.sh logs # View bot logs
./troubleshoot_bot.sh restart # Restart the bot
./troubleshoot_bot.sh secrets # Check AWS parameters
```

### Common Issues

1. **Bot not starting:**
- Check if all secrets are set in AWS SSM
- Verify Twitter credentials are correct
- Check Docker service status

2. **Twitter authentication failed:**
- Verify Twitter credentials in AWS SSM
- Check if Twitter account has 2FA enabled (may need app passwords)

3. **OpenAI API errors:**
- Verify OpenAI API key is valid and has credits
- Check rate limits

## Manual Configuration

### Update Character File

The Ultima character is defined in `/opt/agent/characters/ultima.character.json`. You can modify:

- Personality traits in the `system` field
- Response examples in `messageExamples`
- Post examples in `postExamples`
- Topics and style preferences

### Update Secrets

```bash
# Update OpenAI key
aws ssm put-parameter --name "agent_openai_key" --value "new_key" --type "SecureString" --overwrite --region us-west-1

# Update Twitter credentials
aws ssm put-parameter --name "twitter_username" --value "new_username" --type "String" --overwrite --region us-west-1
aws ssm put-parameter --name "twitter_password" --value "new_password" --type "SecureString" --overwrite --region us-west-1
```

## Architecture

- **EC2 Instance:** Runs Docker container with ElizaOS
- **Auto Scaling Group:** Ensures bot availability
- **SSM Parameters:** Secure storage for API keys and credentials
- **CloudWatch:** Monitoring and logging
- **VPC:** Secure network configuration

## Costs

Estimated monthly costs (us-west-1):
- EC2 t3a.small: ~$15/month
- EBS storage: ~$3/month
- Data transfer: ~$1/month
- **Total: ~$19/month**

## Security

- All secrets stored in AWS SSM Parameter Store (encrypted)
- EC2 instances in private subnets with NAT gateway
- Security groups restrict access
- IAM roles with minimal required permissions

## Support

For issues:
1. Check the troubleshooting script output
2. Review CloudWatch logs
3. Verify all prerequisites are met
4. Check AWS service limits and quotas
60 changes: 60 additions & 0 deletions accounts/AI_Token_Team/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
provider "aws" {
region = "us-east-1"
#profile = "ai-token-team"
profile = "default"
}

locals {
dns = "aitokenteam.com" # fixme
region = "us-east-1"
project = "ai-token-team" # dont change
}

module "ssm_observer" {
source = "../../modules/aws/ssm/observability"
ami_id = data.aws_ami.ami.id
}

module "ssm_setup" {
source = "../../modules/aws/ssm/setup"
bucket_name = "${local.project}-session-logs"
access_log_bucket_name = "${local.project}-ssm-access-logs"
project = local.project
}

locals {
ami_name = "ubuntu-minimal/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-minimal-*"
}
data "aws_ami" "ami" { # slow
most_recent = true
owners = ["679593333241"]
name_regex = "^${local.ami_name}"
}

module "eliza_server" {
#count = 0
#aws_account_id = local.account
aws_account_id =var.aws_account_id
region = local.region
source = "../../environments/eliza-agent-api/" # FIXME rename
domain = local.dns
ami_id = data.aws_ami.ami.id
name = local.project
project = local.project
key_name = "ai-token-deployer-key"
tags = { project = local.project }

branch = "feature/AI_Token_Team"
spot_max_price = 0.028
instance_types = [
"t3a.small",
# "t3.small",
# "t2.small",
# "t3.medium" # works for sure

]
repo = "https://github.com/meta-introspector/cloud-deployment-eliza/"
aws_availability_zones = ["us-east-1a",
"us-east-1b",
"us-east-1c"]
}
54 changes: 54 additions & 0 deletions accounts/AI_Token_Team/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
variable "project_name" {
type = string
default = "ai-token-team"
}

variable "profile" {
type = string
default = "ai-token-team"
}

variable "aws_region" {
type = string
default = "us-west-1"
}

variable "aws_account_id" {
type = string
default = "699475930706"
}

variable "iam_user" {
type = string
default = "aitokenteam"
}

variable "lock_resource" {
type = string
default = "terraform/state/lock"
}

variable "partition" {
type = string
default = "aws"
}

variable "logs_resource" {
type = string
default = "aws_logs"
}

variable "permissions_check" {
type = string
default = "config-permissions-check"
}

variable "delivery_service" {
type = string
default = "delivery.logs.amazonaws.com"
}

variable "logging_service" {
type = string
default = "logging.s3.amazonaws.com"
}
25 changes: 25 additions & 0 deletions accounts/deadsg/.terraform.lock.hcl

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

30 changes: 30 additions & 0 deletions accounts/deadsg/constants.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

variable "lock_resource" {
type = string
default = "terraform/state/lock"
}

variable "partition" {
type = string
default = "aws"
}

variable "logs_resource" {
type = string
default = "aws_logs"
}

variable "permissions_check" {
type = string
default = "config-permissions-check"
}

variable "delivery_service" {
type = string
default = "delivery.logs.amazonaws.com"
}

variable "logging_service" {
type = string
default = "logging.s3.amazonaws.com"
}
Loading