agentscript  by salesforce

Schema-driven language for agent orchestration systems

Created 2 months ago
251 stars

Top 99.8% on SourcePulse

GitHubView on GitHub
Project Summary

Agent Script provides an open, schema-driven language for configuring agent orchestration systems, targeting developers building and integrating AI agents. It offers a declarative approach to defining agent behavior, state, and execution flow, enabling greater flexibility and portability across different runtime environments.

How It Works

Agent Script uses a block-based, indentation-sensitive syntax to define agents. It separates agent specification from runtime execution, allowing the same script to function with varying runtime capabilities. The language supports custom syntax for state management, execution flow, string templating, and deterministic hooks, offering a spectrum from highly deterministic agents to more autonomous ones. Its core design principle is that execution is decoupled from specification, treating agent scripts as declarative definitions rather than implementations.

Quick Start & Requirements

The recommended setup uses mise for installing pinned toolchain versions (mise install). Manual setup requires Node.js (minimum 18, recommended 22) and pnpm (version 10). The tree-sitter CLI (version 0.25.x) is also required for building the parser. To run the UI playground locally, use pnpm ui:dev, which opens at http://localhost:27002. The core library can be installed via pnpm add @sf-agentscript/agentforce.

Highlighted Details

  • Schema-Driven Dialects: Supports multiple dialects (e.g., agentforce, agentfabric) that extend a base schema, allowing customization for specific agent frameworks.
  • Comprehensive Tooling: Includes a UI playground with Monaco editor, graph visualization, and CST/AST explorers, alongside Language Server Protocol (LSP) integrations for VS Code and Monaco.
  • Declarative Syntax: Features a Python/YAML-like syntax for defining agent configurations, variables, topics, and execution logic (e.g., run, set, with, after_reasoning).
  • Runtime Decoupling: Agent scripts are compiled into a runtime specification, designed to be executable on different runtime environments without code modification.

Maintenance & Community

Contributions are welcome and require signing the Salesforce CLA. Questions, bug reports, and feature requests should be submitted via GitHub issues.

Licensing & Compatibility

The project is licensed under the Apache 2.0 license, which generally permits commercial use and integration. However, running agents defined by Agent Script requires Salesforce's internal runtime environment.

Limitations & Caveats

The Agent Script runtime environment is not open-sourced and remains internal to Salesforce. Consequently, while the specification language, parsers, linters, compilers, and developer tooling are open, agents can only be executed within Salesforce's infrastructure. Changes to the language specification are not currently accepted to maintain synchronization with the internal runtime.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
13
Issues (30d)
1
Star History
11 stars in the last 30 days

Explore Similar Projects

Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
8 more.

langgraph by langchain-ai

1.4%
37k
Agent orchestration framework for building controllable agents
Created 2 years ago
Updated 2 days ago
Feedback? Help us improve.