Skip to content

Commit c184739

Browse files
V0.7.0 (#48)
* UI tweaks * Update GitLab code reviewing * Fix aider path when working outside the repo * Create agent for merge request reviews * Update agent script to take available tools by a command line arg * Add npm and ts tools to the registry * Rename to TypedAI
1 parent ace85e6 commit c184739

File tree

89 files changed

+2816
-6995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2816
-6995
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ node_modules
22
dist
33
bin
44
.venv
5-
.sophia/
5+
.typedai/
66
frontend
77

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ temp/
1515
.ignore
1616
.cache
1717
.venv/
18-
.sophia/
18+
.typedai/
1919
src/cli/*-in
2020
src/cli/*-out
2121
tg/

.husky/pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
#npm run lint && npm test && npx --no-install lint-staged
1+
#!/usr/bin/bash
2+
source ~/.nvm/nvm.sh && nvm use && npm run lint:ci # && npm test && npx --no-install lint-staged

.husky/pre-push

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/bash
2+
source ~/.nvm/nvm.sh && nvm use && npm run lint:ci && npm test

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ FROM python:3.11
33

44
ENV DEBIAN_FRONTEND=noninteractive
55

6-
RUN pip install aider-chat
7-
86
#COPY .nvmrc .
97
# $(cat .nvmrc)
108
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
119
RUN chmod +x ./nodesource_setup.sh && ./nodesource_setup.sh
1210
RUN apt install -y nodejs
1311

14-
ENV user=sophia
15-
ENV homedir=/home/sophia/
12+
RUN pip install aider-chat
13+
14+
ENV user=typedai
15+
ENV homedir=/home/typedai/
1616

17-
RUN useradd --create-home -g users sophia
17+
RUN useradd --create-home -g users typedai
1818
WORKDIR $homedir
1919

2020
RUN mkdir ".husky"
@@ -26,18 +26,18 @@ RUN npm ci
2626
COPY . .
2727

2828
# Download the tiktokenizer model, which is written to node_modules/@microsoft/tiktokenizer/model,
29-
# as the root user, as the sophia user can't write to node_modules
29+
# as the root user, as the typedai user can't write to node_modules
3030
RUN npm run initTiktokenizer
3131

3232
USER $user
3333

34-
RUN mkdir .sophia
34+
RUN mkdir .typedai
3535
# Generate the function schemas
3636
RUN npm run functionSchemas
3737

38-
# Needed to avoid the error "fatal: detected dubious ownership in repository at '/home/sophia'" when running git commands
39-
# as the application files are owned by the root user so an agent (which runs as the sophia user) can't modify them.
40-
RUN git config --global --add safe.directory /home/sophia
38+
# Needed to avoid the error "fatal: detected dubious ownership in repository at '/home/typedai'" when running git commands
39+
# as the application files are owned by the root user so an agent (which runs as the typedai user) can't modify them.
40+
RUN git config --global --add safe.directory /home/typedai
4141

4242
ENV NODE_ENV=production
4343
ENV PORT=8080

Dockerfile.dev

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ RUN apt install -y nodejs
1111

1212
RUN pip install aider-chat
1313

14-
ENV user=sophia
15-
ENV homedir=/home/sophia/
16-
RUN useradd --create-home -g users sophia
14+
ENV user=typedai
15+
ENV homedir=/home/typedai/
16+
RUN useradd --create-home -g users typedai
1717

1818
WORKDIR $homedir
1919

README.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
<a id="banner"></a>
22
<p align="center">
3-
<img src="https://public.trafficguard.ai/sophia/banner.png" alt="Sophia banner"/>
3+
<img src="https://public.trafficguard.ai/typedai/banner.png" alt="TypedAI banner"/>
44
</p>
55
<p align="center">
6-
<em>The open TypeScript platform for autonomous AI agents and LLM based workflows </em><br/>
7-
<small>The Ancient Greek word <em><b>sophía (σοφία)</b></em> variously translates to "clever, skillful, intelligent, wise"</small>
6+
<em >The TypeScript-first AI platform for developers</em><br/>
7+
<small>Autonomous AI agents and LLM based workflows</small>
88
</p>
99

1010
## Documentation site
11-
[Home](https://sophia.dev/) | [Setup](https://sophia.dev/setup/) | [Observability](https://sophia.dev/observability/) | [Function calling](https://sophia.dev/functions/) |
12-
[Autonomous AI Agent](https://sophia.dev/autonomous-agents/) | [AI Software Engineer](https://sophia.dev/software-engineer/) | [AI Code reviews](https://sophia.dev/code-review/) |
13-
[Tools/Integrations](https://sophia.dev/integrations/) | [Roadmap](https://sophia.dev/roadmap/)
11+
[Home](https://typedai.dev/) | [Setup](https://typedai.dev/setup/) | [Observability](https://typedai.dev/observability/) | [Function calling](https://typedai.dev/functions/) |
12+
[Autonomous AI Agent](https://typedai.dev/autonomous-agents/) | [AI Software Engineer](https://typedai.dev/software-engineer/) | [AI Code reviews](https://typedai.dev/code-review/) |
13+
[Tools/Integrations](https://typedai.dev/integrations/) | [Roadmap](https://typedai.dev/roadmap/)
1414

1515
---
1616

1717
[Features](#key-features) | [UI Examples](#ui-examples) | [Code examples](#code-examples) | [Contributing](#contributing)
1818

19-
Sophia is a full-featured platform for developing and running agents, LLM based workflows and chatbots.
19+
TypedAI is a full-featured platform for developing and running agents, LLM based workflows and chatbots.
2020

2121
Included are capable software engineering agents, which have assisted building the platform.
2222

2323
## Key features
2424

25-
- [Advanced Autonomous agents](https://sophia.dev/autonomous-agents)
26-
- [Software developer agents](https://sophia.dev/software-engineer/)
27-
- [Pull request code review agent](https://sophia.dev/code-review/)
28-
- [AI chat interface](https://sophia.dev/chat/)
29-
- [Slack chatbot](https://sophia.dev/chatbot/)
25+
- [Advanced Autonomous agents](https://typedai.dev/autonomous-agents)
26+
- [Software developer agents](https://typedai.dev/software-engineer/)
27+
- [Pull request code review agent](https://typedai.dev/code-review/)
28+
- [AI chat interface](https://typedai.dev/chat/)
29+
- [Slack chatbot](https://typedai.dev/chatbot/)
3030
- Supports many LLM services - OpenAI, Anthropic (native & Vertex), Gemini, Groq, Fireworks, Together.ai, DeepSeek, Ollama, Cerebras, X.ai
31-
- Multi-agent [extend-reasoning implementations](https://github.com/TrafficGuard/sophia/tree/main/src/llm/multi-agent) of the LLM interface
31+
- Multi-agent [extend-reasoning implementations](https://github.com/TrafficGuard/typedai/tree/main/src/llm/multi-agent) of the LLM interface
3232
- Configurable Human-in-the-loop settings
33-
- [Functional callable tools/integrations](https://sophia.dev/integrations/) (Filesystem, Jira, Slack, Perplexity, Google Cloud, Gitlab, GitHub etc)
33+
- [Functional callable tools/integrations](https://typedai.dev/integrations/) (Filesystem, Jira, Slack, Perplexity, Google Cloud, Gitlab, GitHub etc)
3434
- CLI and Web UI interface
3535
- Run locally or deployed on the cloud with multi-user/SSO
3636
- OpenTelemetry based observability
@@ -45,7 +45,7 @@ Included are capable software engineering agents, which have assisted building t
4545
- LLM function schemas auto-generated from source code
4646
- Human-in-the-loop for budget control, agent initiated questions and error handling
4747

48-
More details at the [Autonomous agent docs](https://sophia.dev/autonomous-agents)
48+
More details at the [Autonomous agent docs](https://typedai.dev/autonomous-agents)
4949

5050
## Software developer agents
5151

@@ -67,7 +67,7 @@ More details at the [Autonomous agent docs](https://sophia.dev/autonomous-agents
6767
- Repository ad hoc query agent
6868
- Codebase awareness - optional index creation used by the task file selection agent
6969

70-
More details at the [Software developer agents](https://sophia.dev/software-engineer/) docs.
70+
More details at the [Software developer agents](https://typedai.dev/software-engineer/) docs.
7171

7272
## Flexible run/deploy options
7373

@@ -82,52 +82,52 @@ More details at the [Software developer agents](https://sophia.dev/software-engi
8282

8383
### List agents
8484

85-
![List agents](https://public.trafficguard.ai/sophia/agent-list.png)
85+
![List agents](https://public.trafficguard.ai/typedai/agent-list.png)
8686

8787
### New Agent
8888

89-
![New Agent UI](https://public.trafficguard.ai/sophia/agent-new.png)
89+
![New Agent UI](https://public.trafficguard.ai/typedai/agent-new.png)
9090

9191
### Agent error handling
9292

93-
![Feedback requested](https://public.trafficguard.ai/sophia/agent-feedback.png)
93+
![Feedback requested](https://public.trafficguard.ai/typedai/agent-feedback.png)
9494

9595
### Agent LLM calls
9696

97-
![Agent LLM calls](https://public.trafficguard.ai/sophia/agent-llm-calls.png)
97+
![Agent LLM calls](https://public.trafficguard.ai/typedai/agent-llm-calls.png)
9898

9999
### Sample trace (Google Cloud)
100100

101-
![Sample trace in Google Cloud](https://public.trafficguard.ai/sophia/trace.png)
101+
![Sample trace in Google Cloud](https://public.trafficguard.ai/typedai/trace.png)
102102

103103
### Human in the loop notification
104104

105-
<img src="https://public.trafficguard.ai/sophia/feedback.png" width="702">
105+
<img src="https://public.trafficguard.ai/typedai/feedback.png" width="702">
106106

107107
### Code review configuration
108108

109-
![Code review configuration](https://public.trafficguard.ai/sophia/code-reviews.png)
109+
![Code review configuration](https://public.trafficguard.ai/typedai/code-reviews.png)
110110

111111
### AI Chat
112112

113-
![AI chat](https://public.trafficguard.ai/sophia/chat.png)
113+
![AI chat](https://public.trafficguard.ai/typedai/chat.png)
114114

115115
### User profile
116116

117-
![Profile](https://public.trafficguard.ai/sophia/profile1.png)
118-
![Profile](https://public.trafficguard.ai/sophia/profile2.png)
117+
![Profile](https://public.trafficguard.ai/typedai/profile1.png)
118+
![Profile](https://public.trafficguard.ai/typedai/profile2.png)
119119

120120
Default values can also be set from environment variables.
121121

122122
## Code Examples
123123

124-
### Sophia vs LangChain
124+
### TypedAI vs LangChain
125125

126-
Sophia doesn't use LangChain, for [many reasons](https://www.octomind.dev/blog/why-we-no-longer-use-langchain-for-building-our-ai-agents) that [you](https://www.google.com/search?q=langchain+site%3Anews.ycombinator.com) can [read](https://www.reddit.com/r/LangChain/comments/1gmfyi2/why_are_people_hating_langchain_so_much/) [online](https://www.google.com/search?q=langchain+sucks+site%3Areddit.com)
126+
TypedAI doesn't use LangChain, for [many reasons](https://www.octomind.dev/blog/why-we-no-longer-use-langchain-for-building-our-ai-agents) that [you](https://www.google.com/search?q=langchain+site%3Anews.ycombinator.com) can [read](https://www.reddit.com/r/LangChain/comments/1gmfyi2/why_are_people_hating_langchain_so_much/) [online](https://www.google.com/search?q=langchain+sucks+site%3Areddit.com)
127127

128-
The scope of the Sophia platform covers functionality found in LangChain and LangSmith.
128+
The scope of the TypedAI platform covers functionality found in LangChain and LangSmith.
129129

130-
Let's compare the LangChain document example for Multiple Chains to the equivalent Sophia implementation.
130+
Let's compare the LangChain document example for Multiple Chains to the equivalent TypedAI implementation.
131131

132132
#### LangChain
133133
```typescript
@@ -165,7 +165,7 @@ const result = await combinedChain.invoke({
165165
console.log(result);
166166
```
167167

168-
#### Sophia
168+
#### TypedAI
169169
```typescript
170170
import { runAgentWorkflow } from '#agent/agentWorkflowRunner';
171171
import { anthropicLLMs } from '#llms/anthropic'
@@ -181,7 +181,7 @@ runAgentWorkflow({ llms: anthropicLLMs() }, async () => {
181181
});
182182
```
183183

184-
The Sophia code also has the advantage of static typing with the prompt arguments, enabling you to refactor with ease.
184+
The TypedAI code also has the advantage of static typing with the prompt arguments, enabling you to refactor with ease.
185185
Using simple control flow allows easy debugging with breakpoints/logging.
186186

187187
To run a fully autonomous agent:
@@ -221,4 +221,4 @@ export class Jira {
221221

222222
## Contributing
223223

224-
We warmly welcome contributions to the project through [issues](https://github.com/TrafficGuard/nous/issues), [pull requests](https://github.com/TrafficGuard/nous/pulls) or [discussions](https://github.com/TrafficGuard/nous/discussions)
224+
We warmly welcome contributions to the project through [issues](https://github.com/TrafficGuard/typedai/issues), [pull requests](https://github.com/TrafficGuard/typedai/pulls) or [discussions](https://github.com/TrafficGuard/typedai/discussions)

bin/configure

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ cd ..
3434

3535
# Setup for bash
3636
if [ -f ~/.bashrc ]; then
37-
if ! grep -q "SOPHIA_HOME" ~/.bashrc; then
38-
echo "\n# Sophia CLI environment" >> ~/.bashrc
39-
echo "export SOPHIA_HOME=$(pwd)" >> ~/.bashrc
40-
echo "export PATH=\$SOPHIA_HOME/bin/path:\$PATH" >> ~/.bashrc
37+
if ! grep -q "TYPEDAI_HOME" ~/.bashrc; then
38+
echo "\n# TypedAI CLI environment" >> ~/.bashrc
39+
echo "export TYPEDAI_HOME=$(pwd)" >> ~/.bashrc
40+
echo "export PATH=\$TYPEDAI_HOME/bin/path:\$PATH" >> ~/.bashrc
4141
fi
4242
fi
4343

4444
# Setup for zsh
4545
if [ -f ~/.zshrc ]; then
46-
if ! grep -q "SOPHIA_HOME" ~/.zshrc; then
47-
echo "\n# Sophia CLI environment" >> ~/.zshrc
48-
echo "export SOPHIA_HOME=$(pwd)" >> ~/.zshrc
49-
echo "export PATH=\$SOPHIA_HOME/bin/path:\$PATH" >> ~/.zshrc
46+
if ! grep -q "TYPEDAI_HOME" ~/.zshrc; then
47+
echo "\n# TypedAI CLI environment" >> ~/.zshrc
48+
echo "export TYPEDAI_HOME=$(pwd)" >> ~/.zshrc
49+
echo "export PATH=\$TYPEDAI_HOME/bin/path:\$PATH" >> ~/.zshrc
5050
fi
5151
fi
5252

bin/container

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
docker exec -it $(docker ps -qf "name=sophia-dev") bash
2+
docker exec -it $(docker ps -qf "name=typedai-dev") bash

bin/path/ss renamed to bin/path/ai

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
# Shortcut to running `npm run <script> <arg>` from the Sophia installation
3+
# Shortcut to running `npm run <script> <arg>` from the TypedAI installation
44
# Usage: `ss <script> <args>`
55

6-
if [ -z "$SOPHIA_HOME" ]; then
7-
echo "Error: SOPHIA_HOME is not set."
6+
if [ -z "$TYPEDAI_HOME" ]; then
7+
echo "Error: TYPEDAI_HOME is not set."
88
exit 1
99
fi
1010

@@ -24,10 +24,9 @@ CWD=$(pwd)
2424
export NVM_DIR="$HOME/.nvm"
2525
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
2626

27-
set -x
2827
# Run the npm script with any additional arguments and the filesystem arg
2928
(
30-
cd "$SOPHIA_HOME"
29+
cd "$TYPEDAI_HOME"
3130
nvm use
3231
npm run "$script" -- --fs="${CWD}" "$@"
3332
)

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# docker compose up --build
22
services:
33
node:
4-
container_name: sophia-dev # name should match the filter in the ./bin/container script
4+
container_name: typedai-dev # name should match the filter in the ./bin/container script
55
restart: always
66
ports:
77
- 4200:4200
@@ -10,11 +10,11 @@ services:
1010
context: ./
1111
dockerfile: Dockerfile.dev
1212
volumes:
13-
- ~/.config/gcloud:/home/sophia/.config/gcloud # Comment out if not using Google Cloud
13+
- ~/.config/gcloud:/home/typedai/.config/gcloud # Comment out if not using Google Cloud
1414
# Mount project files but exclude node_modules
15-
- ./:/home/sophia/:delegated
16-
- /home/sophia/node_modules
17-
- /home/sophia/frontend/node_modules
15+
- ./:/home/typedai/:delegated
16+
- /home/typedai/node_modules
17+
- /home/typedai/frontend/node_modules
1818
# environment:
1919
# GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
2020
# - var=value

docs/CODE_REVIEW.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code Review
22

3-
Sophia has the ability to review merge requests on GitLab with configured code review guidelines.
3+
TypedAI has the ability to review merge requests on GitLab with configured code review guidelines.
44

55
Some situations where you may want to use LLMs for reviewing code styles are:
66
- When a linting rule isn't yet available.
@@ -75,5 +75,5 @@ Webhooks can be configured at the project or group level, so if you have multipl
7575
that you wanted to be reviewed, then you will need to configure a webhook for each one.
7676

7777
Follow the [GitLab Webhook documentation](https://gitlab.synrgy.mobi/groups/devops/-/hooks) and for the
78-
webhook URL enter `https://<your-sophia-domain>/gitlab/v1/webhook`
78+
webhook URL enter `https://<your-typedai-domain>/gitlab/v1/webhook`
7979

docs/bin/deploy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./bin/build && cd site && gsutil -m cp -r . gs://$DOCS_BUCKET/

docs/docs/agent-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ We follow a similar naming convention described in [Building Effective Agents](h
1212
1313
### 1. Autonomous agents
1414

15-
Sophia comes with two autonomous agent types (XML and CodeGen), which applying reasoning to break down
15+
TypedAI comes with two autonomous agent types (XML and CodeGen), which applying reasoning to break down
1616
a user request into a plan to be completed by the available function calls.
1717

1818
The Slack chatbot uses an autonomous agent to provide a response to a user.

docs/docs/assets/tai.png

23.3 KB
Loading

docs/docs/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Currently, the valid options are `single_user` and `IAP`
66

77
## Single user mode
88

9-
By default, Sophia runs in a single user mode which disables any authentication. On startup the database is queried for
9+
By default, TypedAI runs in a single user mode which disables any authentication. On startup the database is queried for
1010
a user profile, and if none is found then creates one, using the email from the `SINGLE_USER_EMAIL` environment variable.
1111

1212
Th

docs/docs/autonomous-agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- LLM function schemas auto-generated from source code
88
- Human-in-the-loop for budget control, agent initiated questions and error handling
99

10-
Sophia provides two autonomous agents which work to complete the request via a control loop which iteratively (re-)plans and calls the functions available to the agent.
10+
TypedAI provides two autonomous agents which work to complete the request via a control loop which iteratively (re-)plans and calls the functions available to the agent.
1111

1212
At a high level they share the same internal state, agent memory, human-in-the loop, functional calling history etc.
1313

@@ -57,4 +57,4 @@ When the budget control or control loop iteration thresholds have been reached,
5757

5858
More configuration will be provided soon.
5959

60-
![Agent feedback request](https://public.trafficguard.ai/nous/feedback.png){ align=left }
60+
![Agent feedback request](https://public.trafficguard.ai/typedai/feedback.png){ align=left }

docs/docs/chat.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AI Chat
22

3-
Sophia provides a chat interface like chatgpt.com or claude.ai.
3+
TypedAI provides a chat interface like chatgpt.com or claude.ai.
44

55
## LLM selection
66

@@ -26,4 +26,4 @@ in the new and previous messages, otherwise an error will occur.
2626

2727
## Screenshots
2828

29-
![Chats](https://public.trafficguard.ai/sophia/chat.png)
29+
![Chats](https://public.trafficguard.ai/typedai/chat.png)

0 commit comments

Comments
 (0)