https://github.com/TrafficGuard/nous Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} TrafficGuard / nous Public * Notifications You must be signed in to change notification settings * Fork 11 * Star 197 TypeScript AI agent platform with Autonomous agents, Software developer agents, AI code review agents and more nous.trafficguard.ai License MIT license 197 stars 11 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 1 * Discussions * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights TrafficGuard/nous This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 273 Commits .github/workflows .github/workflows .husky .husky bin bin docs docs frontend frontend resources resources src src test/filesystem test/filesystem variables variables .dockerignore .dockerignore .gitignore .gitignore .npmrc .npmrc .nvmrc .nvmrc .python-version .python-version .secretlintrc.json .secretlintrc.json CONVENTIONS.md CONVENTIONS.md Dockerfile Dockerfile Dockerfile.dev Dockerfile.dev LICENCE LICENCE README.md README.md biome.json biome.json docker-compose.yml docker-compose.yml package-lock.json package-lock.json package.json package.json projectInfo.json projectInfo.json tsconfig.json tsconfig.json tsconfig.swc.json tsconfig.swc.json View all files Repository files navigation * README * MIT license nous logo The open-source TypeScript platform for autonomous AI agents and LLM based workflows Nous (Greek: nous) is a term from classical philosophy often associated with intellect or intelligence, represents the human mind's capacity to comprehend truth and reality. Documentation site Home | Setup | Observability | Function calling | Autonomous AI Agent | AI Software Engineer | AI Code reviews | Tools/Integrations | Roadmap --------------------------------------------------------------------- The Nous Story | Features | UI Examples | Code examples | Contributing The Nous Story Nous started from a simple goal: to harness AI's potential to enhance real-world productivity, born in DevOps and Platform Engineering space. We envisioned a tool that could: * Automate various processes and support requests, and triage build failures. * Review code for compliance with standards and best practices. * Assist with large refactorings, and more. At TrafficGuard we process billions of events a month for our global clients, increasing their ad spend ROI by protecting against bots and other forms of invalid traffic. Our SaaS on GCP comprises projects developed in TypeScript, Python, GoogleSQL, PHP and Terraform, deployed from GitLab. With open source projects typically Python/GitHub focused, and the vendor AI tools being focused in their silos, we saw a need for TypeScript based tooling which can work across our entire tech stack, and understand the overall architecture. Through its evolution we've designed nous as a flexible platform for the TypeScript community to expand and support the use cases and integrations of your choice. Our design choice of Firestore for the initial database implementation, with Cloud Run, provides a scale-to-zero solution with zero-cost using the free tier. With the intention to support uses cases such as your own custom personal assistant, always available via mobile. Features Key features include: * Advanced autonomous agents + Reasoning/planning inspired from Google's Self-Discover paper + Memory and function call history for complex, multi-step workflows + Adaptive iterative planning with hierarchical task decomposition + Two control-loop function calling options (LLM-independent): o Custom XML-based function calling o Dynamic code generation with sandboxed execution for multistep function calling and logic # Opportunistically can significantly reduce cost and latency over LLM-native/XML function calling * LLM function schemas auto-generated from source code * Function callable integrations: + Filesystem, Jira, Slack, Perplexity, Gitlab, GitHub and more * Supports multiple LLMs/Services: + OpenAI, Anthropic (native & Vertex), Gemini, Groq, Fireworks, Together.ai, DeepSeek, Ollama * CLI and Web interface * Human-in-the-loop for: + Budget control + Agent initiated questions + Error handling * Flexible deployment options: + Run locally from the command line or through the web UI + Scale-to-zero deployment on Firestore & Cloud Run + Multi-user SSO enterprise deployment (with Google Cloud IAP) * Observability with OpenTelemetry tracing * Code Editing Agent: + Auto-detection of project initialization, compile, test and lint + Find the relevant files to edit and perform initial analysis + Code editing loop with compile, lint, test, fix (editing delegates to Aider) o Compile error analyser can search online, add additional files and packages * Software Engineer Agent: + Find the appropriate repository from GitLab/GitHub + Clone and create branch + Call the Code Editing Agent + Create merge request * Code Review agent: + Configurable code review guidelines + Posts comments on GitLab merge requests at the appropriate line with suggested changes UI Examples New Agent | Sample trace | Human in the loop notification | Resume error | List agents | Code review config New Agent New Agent UI Sample trace Sample trace in Google Cloud Human in the loop notification [68747470733a2f2f7075626c69632e7472616666696367756172642e61692f6e6f75732f666565646261636b2e706e67] Agent requested feedback Feedback requested List agents List agents Code review configuration Code review configuration Code Examples Nous vs LangChain Nous doesn't use LangChain, for many reasons that you can read online Let's compare the LangChain document example for Multiple Chains to the equivalent Nous implementation. LangChain import { PromptTemplate } from "@langchain/core/prompts"; import { RunnableSequence } from "@langchain/core/runnables"; import { StringOutputParser } from "@langchain/core/output_parsers"; import { ChatAnthropic } from "@langchain/anthropic"; const prompt1 = PromptTemplate.fromTemplate( `What is the city {person} is from? Only respond with the name of the city.` ); const prompt2 = PromptTemplate.fromTemplate( `What country is the city {city} in? Respond in {language}.` ); const model = new ChatAnthropic({}); const chain = prompt1.pipe(model).pipe(new StringOutputParser()); const combinedChain = RunnableSequence.from([ { city: chain, language: (input) => input.language, }, prompt2, model, new StringOutputParser(), ]); const result = await combinedChain.invoke({ person: "Obama", language: "German", }); console.log(result); Nous import { llms } from '#agent/context' import { anthropicLLMs } from '#llms/anthropic' const prompt1 = (person: string) => `What is the city ${person} is from? Only respond with the name of the city.`; const prompt2 = (city: string, language: string) => `What country is the city ${city} in? Respond in ${language}.`; runAgentWorkflow({ llms: anthropicLLMs() }, async () => { const city = await llms().easy.generateText(prompt1('Obama')); const result = await llms().easy.generateText(prompt2(city, 'German')); console.log(result); }); The Nous code also has the advantage of static typing with the prompt arguments, enabling you to refactor with ease. Using simple control flow allows easy debugging with breakpoints/logging. To run a fully autonomous agent: startAgent({ agentName: 'Create ollama', initialPrompt: 'Research how to use ollama using node.js and create a new implementation under the llm folder. Look at a couple of the other files in that folder for the style which must be followed', functions: [FileSystem, Perplexity, CodeEditinAgent], llms, }); The Nous code also has the advantage of static typing with the prompt arguments, enabling you to refactor with ease. Using simple control flow allows easy debugging with breakpoints/logging. Automated LLM function schemas LLM function calling schemas are automatically generated by having the @func decorator on class methods. New Agent UI Getting Started Visit our documentation site for the getting started guide and more details. Contributing We warmly welcome contributions to the project through issues, pull requests or discussions Contributed by TrafficGuard - Increasing the ROI on your ad spend. Reach out to us as nous@trafficguard.ai if you'd like support to ramp up as a contributor. About TypeScript AI agent platform with Autonomous agents, Software developer agents, AI code review agents and more nous.trafficguard.ai Topics typescript agents ai-agents llm ai-code-review ai-agents-framework ai-software-engineer agentic-framework Resources Readme License MIT license Activity Custom properties Stars 197 stars Watchers 9 watching Forks 11 forks Report repository Releases No releases published Contributors 6 * @danielcampagnolitg * @campers * @joskanius * @eltociear * @jwlai-cloud * @andre-bonkowski-tg Languages * TypeScript 92.2% * HTML 6.3% * SCSS 1.1% * Other 0.4% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.