Skip to content

Commit 001d509

Browse files
committed
chore: lint fix
1 parent 32d496a commit 001d509

File tree

22 files changed

+163
-130
lines changed

22 files changed

+163
-130
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,21 @@ jobs:
3131
run: pnpm install
3232
- name: Run typecheck
3333
run: pnpm run typecheck
34+
prettier:
35+
name: Prettier
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Install pnpm
40+
uses: pnpm/action-setup@v4
41+
with:
42+
version: 10
43+
- name: Setup Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version-file: .nvmrc
47+
cache: "pnpm"
48+
- name: Install dependencies
49+
run: pnpm install
50+
- name: Run prettier check
51+
run: pnpm run lint

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

.swcrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
}
1616
}
1717
}
18-
}
18+
}

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<a href="https://athenalab.ai/"><img src="https://img.shields.io/badge/Website-AthenaLab.AI-blue" alt="Website"></a>
1212
</div>
1313

14-
**Athena** is a production-ready general AI agent built to *do*, not just *think*. It bridges insight with execution, helping you move from idea to results effortlessly.
14+
**Athena** is a production-ready general AI agent built to _do_, not just _think_. It bridges insight with execution, helping you move from idea to results effortlessly.
1515

1616
Some examples of what Athena can do:
1717

@@ -47,23 +47,27 @@ With all the tools it has, Athena is capable of:
4747
## 🚀 Quick Start
4848

4949
1. Clone the repository:
50+
5051
```bash
5152
git clone https://github.com/Athena-AI-Lab/athena-core.git
5253
```
5354

5455
2. [Install pnpm](https://pnpm.io/installation) (if not already installed):
56+
5557
```bash
5658
npm install -g pnpm
5759
```
5860

5961
3. Install project dependencies:
62+
6063
```bash
6164
cd athena-core
6265
pnpm i
6366
pnpx playwright install
6467
```
6568

6669
4. Copy the example config file:
70+
6771
```bash
6872
cp configs/config.yaml-example configs/config.yaml
6973
```
@@ -99,6 +103,7 @@ plugins:
99103
> For a complete list of plugins and detailed configuration options, please refer to the [Configuration Guide](docs/configuration.md). See [Cerebrum](docs/configuration.md#cerebrum) section for best practices on selecting the right model for your use case.
100104
101105
6. Launch Athena:
106+
102107
```bash
103108
pnpm start
104109
```
@@ -117,25 +122,30 @@ Trust us: the AI will probably do a better job explaining it than we ever could.
117122
118123
## 🗓️ Roadmap
119124

120-
Our mission is to realize **human-level intelligence**, or *AGI*, by evolving Athena into a truly autonomous and capable agent. Here's a more detailed roadmap of what we're working on:
125+
Our mission is to realize **human-level intelligence**, or _AGI_, by evolving Athena into a truly autonomous and capable agent. Here's a more detailed roadmap of what we're working on:
121126

122127
- [ ] **Autonomous Code Writing**
128+
123129
- Enable Athena to iteratively write and improve its own plugins
124130

125131
- [ ] **Robust Browser Automation**
132+
126133
- Improve reliability and fault tolerance in headless and headful modes
127134
- Add advanced DOM element parsing and interaction strategies
128135

129136
- [ ] **Context Management Improvements**
137+
130138
- Adjust prompt context windows for different LLMs
131139
- Implement context summarization for out-of-window context
132140

133141
- [ ] **Long-Term Memory with RAG**
142+
134143
- Set up vector database integration for persistent knowledge
135144
- Enable memory recall across sessions and tasks
136145
- Support user-specific long-term context embedding and retrieval
137146

138147
- [ ] **Image and Video Model Expansion**
148+
139149
- Integrate support for more image and video generation models
140150
- Enable multimodal workflows that combine text, image, and video reasoning
141151

@@ -148,7 +158,7 @@ Our mission is to realize **human-level intelligence**, or *AGI*, by evolving At
148158

149159
We welcome contributions from everyone — whether you're fixing a typo, suggesting a feature, or building a whole new plugin!
150160

151-
Athena is a community-driven project, and we believe in building great tools *together*. Here's how you can help:
161+
Athena is a community-driven project, and we believe in building great tools _together_. Here's how you can help:
152162

153163
### 💡 Got an Idea?
154164

@@ -166,6 +176,7 @@ Open a [GitHub Issue](https://github.com/Athena-AI-Lab/athena-core/issues) and l
166176
### 🧪 Suggest Tests or Improvements
167177

168178
Not into code? You can still help by:
179+
169180
- Testing features and reporting issues
170181
- Improving documentation
171182
- Sharing Athena with others and providing feedback

docs/configuration.md

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Plugins are the core components of Athena. Each plugin has its own configuration
2929
The `browser` plugin allows Athena to control a web browser via Playwright.
3030

3131
```yaml
32-
browser:
33-
headless: true
32+
browser:
33+
headless: true
3434
```
3535

3636
- `headless`: Whether to run the browser in headless mode. If set to `true`, the browser will not be visible.
@@ -42,43 +42,43 @@ The `cerebrum` plugin is the main plugin for Athena. It handles event receiving,
4242
Here is a configuration example for the cerebrum plugin using GPT-4o:
4343

4444
```yaml
45-
cerebrum:
46-
base_url: https://api.openai.com/v1
47-
api_key: sk-proj-your-openai-api-key
48-
model: gpt-4o
49-
temperature: 0.5
50-
image_supported: true
51-
max_prompts: 50
52-
max_event_strlen: 65536
53-
max_tokens: 16384
45+
cerebrum:
46+
base_url: https://api.openai.com/v1
47+
api_key: sk-proj-your-openai-api-key
48+
model: gpt-4o
49+
temperature: 0.5
50+
image_supported: true
51+
max_prompts: 50
52+
max_event_strlen: 65536
53+
max_tokens: 16384
5454
```
5555

5656
However, Athena performs best with DeepSeek V3 (not 0324). The web app version of Athena uses DeepSeek V3 as its cerebrum model. Here is an example configuration for DeepSeek V3:
5757

5858
```yaml
59-
cerebrum:
60-
base_url: https://openrouter.ai/api/v1
61-
api_key: sk-your-openrouter-api-key
62-
model: deepseek/deepseek-chat
63-
temperature: 0.5
64-
image_supported: false
65-
max_prompts: 50
66-
max_event_strlen: 65536
67-
max_tokens: 16384
59+
cerebrum:
60+
base_url: https://openrouter.ai/api/v1
61+
api_key: sk-your-openrouter-api-key
62+
model: deepseek/deepseek-chat
63+
temperature: 0.5
64+
image_supported: false
65+
max_prompts: 50
66+
max_event_strlen: 65536
67+
max_tokens: 16384
6868
```
6969

7070
Although more expensive, Athena can perform even better with Claude 3.7 Sonnet. Here is an example configuration:
7171

7272
```yaml
73-
cerebrum:
74-
base_url: https://api.anthropic.com/v1
75-
api_key: sk-ant-api03-your-anthropic-api-key
76-
model: claude-3-7-sonnet-latest
77-
temperature: 0.5
78-
image_supported: false
79-
max_prompts: 50
80-
max_event_strlen: 65536
81-
max_tokens: 16384
73+
cerebrum:
74+
base_url: https://api.anthropic.com/v1
75+
api_key: sk-ant-api03-your-anthropic-api-key
76+
model: claude-3-7-sonnet-latest
77+
temperature: 0.5
78+
image_supported: false
79+
max_prompts: 50
80+
max_event_strlen: 65536
81+
max_tokens: 16384
8282
```
8383

8484
- `base_url`: The base URL of the API endpoint.
@@ -95,29 +95,29 @@ Although more expensive, Athena can perform even better with Claude 3.7 Sonnet.
9595
Enable `cli-ui` to interact with Athena via the command line. If not needed, you can remove it from the `plugins` section.
9696

9797
```yaml
98-
cli-ui:
98+
cli-ui:
9999
```
100100

101101
### Clock
102102

103103
The `clock` plugin provides time awareness and scheduling. When enabled, Athena can get the current date and time, and manage timers and alarms.
104104

105105
```yaml
106-
clock:
106+
clock:
107107
```
108108

109109
### Discord
110110

111111
Enable `discord` for Athena to send and receive messages from Discord.
112112

113113
```yaml
114-
discord:
115-
bot_token: your-discord-bot-token
116-
allowed_channel_ids:
117-
- "1234567890"
118-
- "9876543210"
119-
admin_channel_ids: []
120-
log_channel_ids: []
114+
discord:
115+
bot_token: your-discord-bot-token
116+
allowed_channel_ids:
117+
- "1234567890"
118+
- "9876543210"
119+
admin_channel_ids: []
120+
log_channel_ids: []
121121
```
122122

123123
- `bot_token`: The Discord bot token.
@@ -130,21 +130,21 @@ Enable `discord` for Athena to send and receive messages from Discord.
130130
Enable `file-system` to allow Athena to access your local file system. Athena will be able to read and write files.
131131

132132
```yaml
133-
file-system:
133+
file-system:
134134
```
135135

136136
### HTTP
137137

138138
Enable `http` for Athena to send HTTP requests, search the web via Jina Search or Exa Search, and download files from the Internet.
139139

140140
```yaml
141-
http:
142-
jina: # Optional Jina config
143-
base_url: https://s.jina.ai
144-
api_key: your-jina-api-key
145-
exa: # Optional Exa config
146-
base_url: https://api.exa.ai # Optional, defaults to this
147-
api_key: your-exa-api-key # Required if using Exa
141+
http:
142+
jina: # Optional Jina config
143+
base_url: https://s.jina.ai
144+
api_key: your-jina-api-key
145+
exa: # Optional Exa config
146+
base_url: https://api.exa.ai # Optional, defaults to this
147+
api_key: your-exa-api-key # Required if using Exa
148148
```
149149

150150
- `jina`: Configuration for [Jina Search](https://jina.ai/). (Optional)
@@ -159,24 +159,24 @@ Enable `http` for Athena to send HTTP requests, search the web via Jina Search o
159159
Enable `llm` for Athena to chat with other language models and generate images.
160160

161161
Since only a single OpenAI endpoint can be configured currently, it's recommended to use a service like LiteLLM proxy to route requests to different language models. OpenRouter is another option, though it doesn't support image generation.
162-
162+
163163
```yaml
164-
llm:
165-
base_url: https://openrouter.ai/api/v1
166-
api_key: sk-or-v1-your-openrouter-api-key
167-
models:
168-
chat:
169-
- name: openai/gpt-4o
170-
desc: GPT-4o is good at general purpose tasks. Supports image input. Whenever you receive an image and need to understand it, pass it to this model using the image arg.
171-
- name: openai/o3-mini
172-
desc: O3 Mini is good at deep thinking and planning. Whenever you need to plan something complicated or solve complex math problems, use this model.
173-
- name: anthropic/claude-3.7-sonnet
174-
desc: Claude 3.7 Sonnet is good at writing code. Whenever you need to write code, use this model.
175-
- name: perplexity/sonar
176-
desc: Perplexity can access the Internet. Whenever you need to search the Internet, use this model.
177-
image:
178-
- name: openai/dall-e-3 # OpenRouter doesn't support image generation
179-
desc: DALL-E 3 is good at generating images. Whenever you are requested to generate images, use this model.
164+
llm:
165+
base_url: https://openrouter.ai/api/v1
166+
api_key: sk-or-v1-your-openrouter-api-key
167+
models:
168+
chat:
169+
- name: openai/gpt-4o
170+
desc: GPT-4o is good at general purpose tasks. Supports image input. Whenever you receive an image and need to understand it, pass it to this model using the image arg.
171+
- name: openai/o3-mini
172+
desc: O3 Mini is good at deep thinking and planning. Whenever you need to plan something complicated or solve complex math problems, use this model.
173+
- name: anthropic/claude-3.7-sonnet
174+
desc: Claude 3.7 Sonnet is good at writing code. Whenever you need to write code, use this model.
175+
- name: perplexity/sonar
176+
desc: Perplexity can access the Internet. Whenever you need to search the Internet, use this model.
177+
image:
178+
- name: openai/dall-e-3 # OpenRouter doesn't support image generation
179+
desc: DALL-E 3 is good at generating images. Whenever you are requested to generate images, use this model.
180180
```
181181

182182
- `base_url`: The base URL of the API endpoint.
@@ -194,37 +194,37 @@ Since only a single OpenAI endpoint can be configured currently, it's recommende
194194
Enable `python` for Athena to run inline Python code or Python scripts. This also enables Athena to install pip packages.
195195

196196
```yaml
197-
python:
197+
python:
198198
```
199199

200200
### Shell
201201

202202
Enable `shell` for Athena to run shell commands.
203203

204204
```yaml
205-
shell:
205+
shell:
206206
```
207207

208208
### Short-Term Memory
209209

210210
Enable `short-term-memory` for Athena to manage a basic task list.
211211

212212
```yaml
213-
short-term-memory:
213+
short-term-memory:
214214
```
215215

216216
### Telegram
217217

218218
Enable `telegram` for Athena to send and receive messages from Telegram.
219219

220220
```yaml
221-
telegram:
222-
bot_token: your-telegram-bot-token
223-
allowed_chat_ids:
224-
- 1234567890
225-
- 9876543210
226-
admin_chat_ids: []
227-
log_chat_ids: []
221+
telegram:
222+
bot_token: your-telegram-bot-token
223+
allowed_chat_ids:
224+
- 1234567890
225+
- 9876543210
226+
admin_chat_ids: []
227+
log_chat_ids: []
228228
```
229229

230230
- `bot_token`: The Telegram bot token.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"build": "npm run clean && npm run fast-build",
1414
"fast-build": "swc src -d dist --strip-leading-paths",
1515
"clean": "rm -rf dist",
16-
"typecheck": "tsc --noEmit"
16+
"typecheck": "tsc --noEmit",
17+
"lint": "prettier --check .",
18+
"lint:fix": "prettier --write ."
1719
},
1820
"repository": {
1921
"type": "git",
@@ -57,6 +59,7 @@
5759
"@types/node": "^22.14.1",
5860
"@types/node-telegram-bot-api": "^0.64.7",
5961
"@types/ws": "^8.5.14",
62+
"prettier": "^3.5.3",
6063
"tsx": "^4.19.3",
6164
"typescript": "^5.7.3"
6265
}

src/core/athena.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class Athena extends EventEmitter {
167167
if (tool.explain_retvals) {
168168
this.emitPrivateEvent(
169169
"athena/tool-result",
170-
tool.explain_retvals(args, retvals)
170+
tool.explain_retvals(args, retvals),
171171
);
172172
}
173173
return retvals;

0 commit comments

Comments
 (0)