Open source project share : a local agent with safe document edits and dynamic direct return

Hey folks,

I just wanted to share an open source agent I am building with LangChain, called “fais” : GitHub - lbke/fais: Fais - It does what you tell it to do · GitHub

It’s meant to run as a CLI and focuses on administrative tasks, similarly to tools such as Claude Cowork.

Perks:

I’ve implemented safe XML edit tooling. The agent can open .docx or .odt documents as a map of selector and text: instead of recopying the whole XML files in order to edit a single value, it can use an Xpath. When these tools are used, the agent CANNOT break the XML file structure. Great for editing a template document.

Another original feature: I’ve implemented a dynamic “return direct” system. This option already exist in LangChain and can be set for tools that must spit their result directly, with no further LLM processing, but it is static: you set it up once for all for a tool. Instead, I’ve created a “return_direct” tool that AI can choose to use alongside other tools: a middleware will intercept it and break the agent loop.
Example: if you ask the agent to find and open a file, it will just open the file, print it and break the agent loop immediately, without sending the file content to the LLM. But if you want to open the file and generate a summary, the agent will read it and send the file to the LLM for further processing. The agent picks the right path depending on the user’s goal.

I am very interested in all features that can let the agent control its own loop and reduce token consumption, as I strongly dislike all scenarios that could lead to hallucinations and strive to design hallucination-free alternatives.

It’s very rough and it lacks a config to pick the model, but I really like working on this project. It gives me a lot of insights about what the next generation of agentic frameworks / next versions of LangChain could look like.

2 Likes