Synapse banner

Synapse

22 devlogs
29h 26m 18s

Synapse is an AI agent that can execute tasks using tools and manage conversations. It is feature packed with streaming, multi-turn conversations, configurability, and is equipped with built-in tools for operating files, directory operations, text…

Synapse is an AI agent that can execute tasks using tools and manage conversations. It is feature packed with streaming, multi-turn conversations, configurability, and is equipped with built-in tools for operating files, directory operations, text searching, shell executions, web access, memory layer and todo manager, All with insanely optimized context management, safety first approach, session management, MCP integrations, subagents and minimalistic Terminal User Interface.

This project uses AI

I had used AI for debugging some python errors like: “TypeError in Python tool initialization”, “None values”, etc. If requested, I can provide the chat history too. I had taken decent help from AI to create nice and effective prompts for the Agent. In the second last two devlogs, I had mentioned AI usage because of time constraints I used AI, but not copied blindly, I know how exactly each file works.

Demo Repository

Loading README...

burningggflamesss

Shipped this project!

Synapse is an AI agent that can execute tasks using tools and manage conversations. It is feature packed with streaming, multi-turn conversations, configurability, and is equipped with built-in tools for operating files, directory operations, text searching, shell executions, web access, memory layer and todo manager, All with insanely optimized context management, safety first approach, session management, MCP integrations, subagents and minimalistic Terminal User Interface.

Challenges were in every step, from creating tools, subagents, mcps to hooks, compaction and pruning algorithm. Especially, the main challenge I faced was to make it publicly available by building the exe file.
I am proud that atleast till the end of flavortown, I completed this project.

burningggflamesss

Made the Synapse publicly available via releases in github. Anyone can download the latest Synapse version according to their OS and it will work.

Changelog

Attachment
0
burningggflamesss

Synapse doesnot have a public web interface for anyone to use since it’s a terminal based application. Sorry for the inconvience it provided but I genuinely tried so many options like daytona, gitpod, codesandbox, stackblitz, and many more.

Changelog

Attachment
0
burningggflamesss

Added the undo command so that any unwanted result can be undone. Also, created the README.md file

Attachment
0
burningggflamesss

I am extremely sorry but for this part I used AI so that I could somehow complete this project before flavortown is ended. Hope you understand.
Here’s the list of patches made:

  • Commands (starting from /)
  • Grep and Glob Tool
  • Web fetch and Web search Tool
Attachment
0
burningggflamesss

Looping with in a Agentic System is a huge problem so I fixed that completely, by introducing a system through which it scans the tools used by the Agent and if same tool with same args were passes continuously will mark as a loop detection and we will feed a prompt on loop detected to make the agent realise itself in a loop.

Attachment
0
burningggflamesss

Finally completed the hooks system in the Agent. By this any developer (or even user these days, thanks to AI) can create a script or command, which will be executed by the Synapse on the specified before_agent, before_tool, after_agent, after_tool, on_error via which we can make it super useful in creating a robust system. For eg, You can prompt Agent to build YT clone and just sleep and agent after completing the task will notify you in your phone (via hooks).

Attachment
0
burningggflamesss

I had now added the safety feature to prevent force editting or potential issue with the AI agent by introducing a confirmation layer where user can choose to approve or reject the given operation. On top of that I also added the pruning and compacting algorithm to prevent AI from stopping completely by virtue of context limit.

Attachment
0
burningggflamesss

Finally, after decent time investment on MCP across multiple worksessions, the MCP is finally completed. This alone gives our Agent a huge edge over other coding assistants.

Attachment
0
burningggflamesss

Added the memory tool to preserve some user-memory for great user experience. Not only that, it also enables the model to store essential informations that needs to be accessed frequently liked a cache. In this worksession, I also worked more on mcps.

Attachment
0
burningggflamesss

Initially I was creating the MCP configurations but realised that it might a lot of time, so I decided to just create another tool which is TODO, which will help the agent to keep track of what to do and what goal it has

Attachment
0
burningggflamesss

I added the feature to discover the tools custom made by other devs to utilise their tools. The agents goes through the specified folder and if it founds the stucture it executes.

Attachment
0
burningggflamesss

I had implemented the sub agents logic in the codebase. Currently, there are CODEBASE_INVESTIGATOR, CODE_REVIEWER subagents and users can add their own sub agents in this system.

Attachment
Attachment
0
burningggflamesss

I added ListDirTool for directory listing functionality. In future, it will manage recursiveness and optimizations but for now it works. The reason I added ListDirTool is to reduce AI hallucination on consistently getting the folder structure.

Attachment
0
burningggflamesss

I added the ShellTool for executing shell commands. This feature isnot only meant for the programming purpose but also by virtue of this feature, non-programmers also has a niche to use this Agent. Additonally, I had enhanced ToolResult and configuration management

Attachment
0
burningggflamesss

I had added EditTool for file editing functionality. The benefit of having a edit tool is that we can ask the agent to fix bugs and issues in our code. Also, I had updated TUI to support the edit tool

Attachment
0
burningggflamesss

Write file for the agent is added. The tool enables the agent to create files, folders, and write content in it. This is the stepping stone for the true agent. On top of that, I had also added the session so that when Synapse is available as a package, anyone can use it by creating multiple instance running concurrently.

Attachment
0
burningggflamesss

I had added few UI elements to make the Agent feel interactive and friendly. Firstly, I added three pets; Sunsun, Ramama, and Sursur which can be customized in future. Also, I enabled using markdown by the AI so that their responses are now nicely rendered.

Attachment
0
burningggflamesss

Now, Synapse is a true Agent with a proper agentic loop, meaning in a single message, it can perform multiple actions all at once.

Attachment
0
burningggflamesss

I had added a manual configuration system i.e. setting up the envs and model name via files and terminal command $env:env_var:env_value. It took a lot of time, but currently it just works.

Attachment
Attachment
0
burningggflamesss

Made the agent to preserve the context for the chat so that it remembers what it did last time.

Attachment
0
burningggflamesss

Here, I implemented the interactive mode for the users to msg the agent even after it had completed its response. And, also added a welcome screen to greet and make sure that the users know some of the commands.

Attachment
0
burningggflamesss

I want to apologize for devlogging so late. I have reason for that (This project was intended to be submitted to jackpot but I realized that I missed the season 1 deadline so it’s the only place where I can reliably submit to).

Thing Achieved:

  • A robust start
  • Tools for reading the file
  • Nice looking Terminal User Interface
  • Reusable code
  • a lot other things
Attachment
0