All Projects → agentframework → Agentframework

agentframework / Agentframework

Licence: apache-2.0
An elegant & efficient TypeScript metaprogramming API to build software agents

Programming Languages

typescript
32286 projects
es6
455 projects
reflection
70 projects

Projects that are alternatives of or similar to Agentframework

Oragon.Spring
Spring.NET (spring.core + spring.aop) on .NET Standard 2.0
Stars: ✭ 19 (-80.41%)
Mutual labels:  dependency-injection, aop
Proxymanager
🎩✨🌈 OOP Proxy wrappers/utilities - generates and manages proxies of your objects
Stars: ✭ 4,556 (+4596.91%)
Mutual labels:  proxy, aop
Aspect4Delphi
Concepts of aspect-oriented programming (AOP) in Delphi.
Stars: ✭ 28 (-71.13%)
Mutual labels:  interceptor, aop
Asmin
Asmin is .NET CORE project infrastructure, to get a quick start on the project.
Stars: ✭ 89 (-8.25%)
Mutual labels:  dependency-injection, interceptor
Cauldron
C# Toolkit
Stars: ✭ 27 (-72.16%)
Mutual labels:  interceptor, aop
Cauldron
C# Toolkit
Stars: ✭ 68 (-29.9%)
Mutual labels:  interceptor, aop
Hyperf
🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Stars: ✭ 4,206 (+4236.08%)
Mutual labels:  dependency-injection, aop
Puresharp
Puresharp is a Framework that provides the essential APIs (AOP, IOC, etc...) to productively build high quality (.NET 4.5.2+ & .NET Core 2.1+) applications through reliability, scalability and performance without no compromise
Stars: ✭ 120 (+23.71%)
Mutual labels:  proxy, aop
Broxy
An HTTP/HTTPS intercept proxy written in Go.
Stars: ✭ 912 (+840.21%)
Mutual labels:  proxy, interceptor
Grpc Tools
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.
Stars: ✭ 881 (+808.25%)
Mutual labels:  proxy, interceptor
Aws Lambda Fastify
Insipired by aws-serverless-express to work with Fastify with inject functionality.
Stars: ✭ 190 (+95.88%)
Mutual labels:  serverless, proxy
Proxykit
A toolkit to create code-first HTTP reverse proxies on ASP.NET Core
Stars: ✭ 1,063 (+995.88%)
Mutual labels:  serverless, proxy
Malagu
Malagu is a Serverless First, component-based, platform-independent, progressive application framework based on TypeScript.
Stars: ✭ 184 (+89.69%)
Mutual labels:  serverless, dependency-injection
Mimick.Fody
An integrated framework for dependency injection and aspect-oriented processing.
Stars: ✭ 15 (-84.54%)
Mutual labels:  dependency-injection, aop
Chucker
🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
Stars: ✭ 2,169 (+2136.08%)
Mutual labels:  proxy, interceptor
Blog.core
💖 ASP.NET Core 6.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
Stars: ✭ 3,542 (+3551.55%)
Mutual labels:  dependency-injection, aop
Framework
💎 Go! AOP PHP - modern aspect-oriented framework for the new level of software development
Stars: ✭ 1,559 (+1507.22%)
Mutual labels:  interceptor, aop
Arouter
💪 A framework for assisting in the renovation of Android componentization (帮助 Android App 进行组件化改造的路由框架)
Stars: ✭ 13,587 (+13907.22%)
Mutual labels:  interceptor, dependency-injection
Blockhook
Hook Objective-C blocks. A powerful AOP tool.
Stars: ✭ 742 (+664.95%)
Mutual labels:  interceptor, aop
Axios Module
Secure and easy axios integration with Nuxt.js
Stars: ✭ 998 (+928.87%)
Mutual labels:  proxy, interceptor

AgentFramework

An elegant & efficient TypeScript metaprogramming API to build software agents

gzip size


🍭 Modernize: 100% for TypeScript. Compatible with ES2015.

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

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

♻️ Clean: No prototype pollution. No polyfill. No nodejs/npm dependencies.

Changelog

Date Version Status
2021-02-01 2.0.0 Stable
2019-02-27 1.0.0 Maintenance
2018-12-21 0.9.23 Maintenance

Install

npm i agentframework

Example code

import { agent, transit } from 'agentframework';

class ComponentA {
	name = 'Agent Framework';
}

@agent()
class ProjectA {
	@transit()
	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

  • Add metadata to your code at design-time (using @decorator) or runtime (using Reflector api)
  • Access the metadata at runtime (using Reflector api)
  • AOP, dependence injection and dependence lookup

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

  • You want to build software agents.
  • You want to use dependence injection or dependence lookup.
  • You want to build a framework which similar to Spring Framework but in JavaScript.
  • You want to build an abstract layer for a specific business domain in your organization.
  • You want to remove duplicated code and keep project codebase small and clean.
  • You need a powerful method to pre-process, post-process or modify system behaviors without touching existing code.

Agentframework 2.x milestones

  • [x] Breaking change: Remove I from interface name
  • [x] Breaking change: Remove Intializer. Use Interceptor instead
  • [x] MVP: Dependency injection/dependency lookup and Domain driven design support
  • [x] MVP: Improve unit test coverage rate
  • [ ] COMPATIBILITY: Revise error types and message
  • [ ] COMPATIBILITY: Revise Domain interface
  • [ ] COMPATIBILITY: Revise embedded decorators
  • [ ] EPIC: Abstract data layer - mongodb 4.x
  • [ ] EPIC: Cross architecture web application development (Server, Serverless)
  • [ ] EPIC: Serverless support - AWS Lambda, Google Cloud Function, Azure Function, Alicloud Function Computing
  • [ ] EPIC: Bot development (Telegram)
  • [ ] Other: Example and references
  • [ ] Other: docs.agentframework.com
  • [ ] Other: agentframework.com

Agentframework 1.x milestones

  • [x] MVP: Reflection can access type information generated by tsc. tsc --emitDecoratorMetadata
  • [x] MVP: Reflection support both ES6 and ES2017 (Reflect.metadata)
  • [x] MVP: Share metadata across different agentframework library of same application
  • [x] MVP: Both agent or normal class can be used for dependence injection
  • [x] MVP: Add IInitializer to init a field property
  • [x] MVP: Interceptor can work with Initializer during dependence injection
  • [x] EPIC: Create agent without domain
  • [x] EPIC: Provide access to intercepted property value in constructor
  • [x] PERFORMANCE: Metadata only attribute, attribute without interceptor
  • [x] PERFORMANCE: Pre-compile class member interceptors to improve method call performance
  • [x] PERFORMANCE: Cache class constructor interceptors to faster initialize new class instance staring from second time.
  • [x] PERFORMANCE: Remove interceptor for @agent attribute to improve performance
  • [x] PERFORMANCE: Do not add proxy if the agent don't have interceptor
  • [x] PERFORMANCE: Remove ES6 Proxy if don't have field interceptor
  • [x] COMPATIBILITY: Move @inject and @ready decorator out from core
  • [x] COMPATIBILITY: GetPrototypeOf should return origin prototype
  • [x] COMPATIBILITY: Agent should works in extended classes
  • [x] COMPATIBILITY: instanceOf should works when compile to proxy
  • [x] COMPATIBILITY: Revise IInvocation Interface
  • [x] COMPATIBILITY: Revise IInitializer Interface
  • [x] COMPATIBILITY: Revise IInterceptor Interface
  • [x] COMPATIBILITY: Revise IAttribute Interface
  • [x] COMPATIBILITY: Revise Reflection Interface
  • [x] COMPATIBILITY: Revise Reflector Interface
  • [x] COMPATIBILITY: Revise Agent Options
  • [x] COMPATIBILITY: Revise Domain Interface (Domain is been completely moved to 2.0)

License

Copyright 2021 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].