Coder Social home page Coder Social logo

synw / agent-smith Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 14.76 MB

Local first human friendly agents toolkit for the browser and Nodejs

Home Page: https://synw.github.io/agent-smith/

License: MIT License

JavaScript 5.45% TypeScript 83.63% HTML 0.23% Vue 10.65% CSS 0.04%

agent-smith's Introduction

Agent Smith

An api to create local first human friendly agents in the browser or Nodejs

Agent Smith

๐Ÿ“š Read the documentation

Check the ๐Ÿ’ป Starter template

What is an agent?

An agent is an anthropomorphic representation of a bot. It has these basic habilities:

  • Interact: the agent can perform interactions with the user and get input and feedback
  • Think: interact with some language model servers to perform inference queries
  • Run jobs: manage long running jobs with multiple tasks
  • Remember: use it's transient or semantic memory to store data

Packages

Version Name Description Nodejs Browser
pub package @agent-smith/body The body โœ… โœ…
pub package @agent-smith/brain The brain โœ… โœ…
pub package @agent-smith/jobs Jobs โœ… โœ…
pub package @agent-smith/tmem Transient memory โŒ โœ…
pub package @agent-smith/tmem-jobs Jobs transient memory โŒ โœ…
pub package @agent-smith/smem Semantic memory โœ… โŒ
pub package @agent-smith/tfm Templates for models โŒ โœ…
pub package @agent-smith/lmtask Yaml model task โœ… โŒ

FAQ

  • What local or remote inference servers can I use?

Actually it works with Llama.cpp, Koboldcpp and Ollama.

  • Can I use this with OpenAI or other big apis?

Sorry no: this library favours local first or private remote inference servers

Example

Quick Nodejs example:

const expert = useLmExpert({
    name: "default",
    localLm: "koboldcpp",
    templateName: "mistral",
    onToken: (t) => process.stdout.write(t),
});
const brain = useAgentBrain([expert]);
// auto discover if expert's inference servers are up
await brain.discover();
// run an inference query
const _prompt = "list the planets of the solar sytem";
await brain.think(_prompt, { 
   temperature: 0.2, 
   min_p: 0.05 
});

Libraries

Powered by:

  • Nanostores for the state management and reactive variables
  • Locallm for the inference api servers management
  • Modprompt for the prompt templates management

agent-smith's People

Contributors

synw avatar

Stargazers

Caio Henrique Figurski avatar Paul Mullins avatar Wingston SHaron avatar nicikiefer avatar Joran Kikke avatar  avatar Markus Rauhalahti avatar Karol Fabjaล„czuk avatar  avatar Jose Suarez avatar ZF avatar

Watchers

 avatar  avatar

Forkers

madhusuthanan-b

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.