DAGDA SEARCH | Back to results | Support the Project

agentframework · GitHub

Source: https://github.com/agentframework

@agentframework agentframework Follow More @agentframework agentframework Follow View agentframework's full-sized avatar

agentframework

Follow 9 followers · 0 following

Achievements

Achievement: Arctic Code Vault ContributorAchievement: Starstruck

Achievements

Achievement: Arctic Code Vault ContributorAchievement: Starstruck

Block or report agentframework

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse More agentframework/README.md

AgentFramework

An elegant & efficient TypeScript metaprogramming API to build software agents

gzip size


🍭 Modernize: 100% for TypeScript. Side-effect free tree shaking compatible since ES2015.

⚡ Fast: Use CodeGen to minimize overheads. Faster than es6 Proxy.

🎯 Efficient: Well-designed and crafted api only has 1300 SLOC and 5.6kb after minzipped.

♻️ Clean: Transparent dynamic proxy. No prototype pollution. No reflect-metadata or any npm dependencies.

AgentFramework's Commitment to Metaprogramming

The new decorator breaking changes of TypeScript 5, which is not compatible with the --emitDecoratorMetadata option, presents a challenge for metaprogramming of TypeScript developers. However, AgentFramework is dedicated to maintaining its original vision and will continue providing metadata in future versions without altering our Reflector API, while applying all possible solutions and efforts to ensure its continued availability.

Official Supported Environment

Platform Version
Node.js 24, 22, 20, 18, 16, 14, 12, 10, 8
TypeScript 5.x 5.9.3, 5.8.2, 5.7.3, 5.6.3, 5.5.4, 5.4.5, 5.3.3, 5.2.2, 5.1.6, 5.0.4
TypeScript 4.x 4.7.2, 4.6.3, 4.5.5, 4.4.4, 4.3.5, 4.2.4, 4.1.5, 4.0.5
TypeScript 3.x 3.9.7, 3.8.3, 3.7.5, 3.6.5, 3.5.1, 3.4.5, 3.3.4000, 3.2.4, 3.1.6, 3.0.3

Changelog

Date Version Status
2025-10-06 2.0.5 Stable
2019-02-27 1.0.0 EOL
2018-12-21 0.9.23 EOL
2017-06-30 0.5.12 EOL
2016-11-03 0.2.28 EOL

Install

npm i agentframework

Example code

import { agent, singleton } from 'agentframework';

class ComponentA {
	name = 'Agent Framework';
}

@agent()
class ProjectA {
	@singleton()
	private component!: ComponentA;

	constructor() {
		console.log(`WOW! You working on project ${this.component.name}!`);
	}
}

const project = new ProjectA();

console.log('Is it create from the ProjectA class?', project instanceof ProjectA);

Features

Projects

Agent Oriented Programming

Principle

PARADIGM INSPIRATION PRINCIPLE
Function Programming Math It transform data
OOP The world It describe things and the relationships between them
Agent Oriented Programming Human It actions like a human (AI)

Concepts

HUMAN AGENT FRAMEWORK DESCRIPTION
People Agent A class decorate with @agent attribute
Action Behavior Class method decorate with @action, @method or @behavior attribute
Belief Memory Private class field decorated with @state, @remember, @memory attribute
Environment Domain A container for agents, entities, services or artifacts
Autonomy Activation Timer, scheduler which based on environment conditions
Sociality Message Agent can communicate with other agent
Mobility Mobile Agent An agent can move from domain to domain with their belief unchanged

When use Agent Framework

Agentframework 2.x milestones

Agentframework 1.x milestones

Special Thanks To:

JetBrains, creators of the IntelliJ IDEA, supports AgentFramework with one of their Open Source Licenses. IntelliJ IDEA is the recommended IDE for working with AgentFramework.

License

Copyright 2024 Ling Zhang!

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Pinned Loading

  1. agentframework agentframework Public

    An elegant & efficient TypeScript metaprogramming API to build software agents

    TypeScript 125 3

  2. hello-world hello-world Public

    Your first AgentFramework project

    TypeScript 1

Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.

Uh oh!

There was an error while loading. Please reload this page.