SmartAgents 1.0.2
dotnet tool install --global SmartAgents --version 1.0.2
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local SmartAgents --version 1.0.2
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SmartAgents&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package SmartAgents --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
settings
You need to have appsettings.json file, it is similar to this:
{
"Log": {
"Enabled": true
},
"llm": {
"model_text": "openAI",
"model_image": "gemini",
"model_embedding": "gemini",
"RPM": 10,
"TPM": 900000
},
"gemini": {
"key": "A..................................eM",
"model_text": "gemini-2.5-flash",
"model_image": "gemini-2.0-flash-exp-image-generation",
"model_embedding": "gemini-embedding-exp-03-07"
},
"openAI": {
"key": "5S............................................................................SB",
"serviceURL": "https://admin-12312-eastus2.openai.azure.com",
"model_text": "gpt-4.1",
"model_text_version": "2025-01-01-preview",
"model_embedding": "text-embedding-3-large",
"model_embedding_version": "2024-02-15-preview"
},
"ollama": {
"url": "http://localhost:11434/api/generate",
"model_text": "deepseek-r1:1.5b"
},
"ocr": {
"path": "C:\\Program Files\\Tesseract-OCR\\tessdata",
"lang": "eng"
},
"vectorDb": {
"provider": "pinecone"
},
"pinecone": {
"key": "pcsk..................................................................K"
},
"googleSearch" : {
"key": "A..................................M",
"searchEnginId" : "e................7"
}
}
notes:
- the most important section is llm, you can choose between (openAI, gemini, ollama)
- you need to have valid keys for the model you would like to use
run
You can run the project using the following command:
smartagents -root .
you can also use some args:
-agent : this is to specify the agent you want to use, if not specified, it will list all agents -path : this is to specify the path to agents vault, if not specified, it will use the current directory -id : this is to specify the id of your current request, if not specified, it will generate a new one
Agent example
in your agent vault, you can create folders, if the folder contains file called (init.md) then the folder will be considered an agent
this is example of simple agent:
init.md
- output: "hello world"
- output: "what is your name?"
- input: {{name}}
- output: "you are welcomed:"
- output: {{name}}
Command Summary Cheat Sheet
| Statement | Description | Example |
|---|---|---|
set |
Assign value to variable | set: "value" in {{var}} |
append |
Append value to variable (concatenate) | append: {{add}} in {{base}} |
file append |
Append text to a file | file append: {{data}} in "out.log" |
for each |
Loop over newline/JSON array string | for each: {{item}} in {{list}} |
if |
Conditional execution (string equals/not equals) | if: {{status}} = "done" |
break |
Exit current loop or script | break |
remark |
Add a comment line | remark: Initialization phase |
ocr |
Extract text from image | ocr: [[img.png]] in {{text}} by eng |
pdf |
Extract text content from PDF file | pdf: [[doc.pdf]] in {{pdfText}} |
download text |
Get simplified text content from URL | download text: "url" in {{content}} |
json to csv |
Convert JSON array string to CSV string | json to csv: {{jsonVar}} in {{csvVar}} |
csv to json |
Convert CSV string to JSON array string | csv to json: {{csvVar}} in {{jsonVar}} |
run terminal |
Execute shell commands from file | run terminal: [[cmd.sh]] in {{output}} |
run curl |
Execute cURL command from file | run curl: [[request.curl]] in {{response}} |
run template |
Process file, substitute variables, store result | run template: [[msg.txt]] in {{message}} |
run text prompt |
Send text prompt to LLM | run text prompt: [[query.txt]] in {{llmOut}} |
run image prompt |
Send image generation prompt to LLM | run image prompt: [[desc.txt]] in {{imgFile}} |
run action |
Execute another CSL script file | run action: [[sub-routine]] |
delay |
Pause execution for N seconds | delay: 3 |
{{variable}} |
Variable substitution | file append: "User: {{name}}" in "log" |
[[filename]] |
File reference for commands | ocr: [[input.jpg]] in {{text}} by eng |
"static string" |
Literal string value | set: "completed" in {{status}} |
{{HasError}} |
Global flag set on curl/terminal failure |
if: {{HasError}} = true |
{{ItemIndex}} |
Zero-based index within for each loop |
remark: Processing index {{ItemIndex}} |
emit |
Notify host application of an event with parameters | emit: EventName {{var1}} {{var2}} {{var-n}} |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.