Skip to content

Commit 65b5119

Browse files
kausmeowsdirkbrndysolanky
authored
feat: knowledge filters- manual + agentic v1 (#3005)
## Summary Manual user passed filters: ```py knowledge_base = PDFUrlKnowledgeBase( urls=[ { "https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf": { "metadata": { "user_id": "user_2", "source": "Cape Cookbook", } } }, { "https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf": { "metadata": { "user_id": "user_2", "source": "Cape Cookbook", } } }, ], vector_db=vector_db, reader=PDFUrlReader(chunk=True), ) knowledge_base.load() agent = Agent( knowledge=knowledge_base, search_knowledge=True, knowledge_filters={"user_id": "jordan_mitchell"}, ) ``` Agentic filters: ```py agent = Agent( knowledge=knowledge_base, search_knowledge=True, enable_agentic_filters=True, ) agent.print_response( "Tell me about Jordan Mitchell's experience and skills with user id as jordan_mitchell and document type cv and year as 2025", markdown=True, ) ``` The agent automatically figures out which filters to use and applies- ![image](https://github.com/user-attachments/assets/48b98a67-a996-4af1-8797-08b9fb837808) (If applicable, issue number: #____) ## Type of change - [ ] Bug fix - [x] New feature - [x] Breaking change - [ ] Improvement - [ ] Model update - [ ] Other: --- ## Checklist - [x] Code complies with style guidelines - [x] Ran format/validation scripts (`./scripts/format.sh` and `./scripts/validate.sh`) - [x] Self-review completed - [ ] Documentation updated (comments, docstrings) - [x] Examples and guides: Relevant cookbook examples have been included or updated (if applicable) - [x] Tested in clean environment - [x] Tests added/updated (if applicable) --- ## Additional Notes Add any important context (deployment instructions, screenshots, security considerations, etc.) --------- Co-authored-by: Dirk Brand <dirkbrnd@gmail.com> Co-authored-by: Yash Pratap Solanky <101447028+ysolanky@users.noreply.github.com> Co-authored-by: Dirk Brand <51947788+dirkbrnd@users.noreply.github.com>
1 parent dbaac46 commit 65b5119

File tree

98 files changed

+6699
-1036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+6699
-1036
lines changed

cookbook/agent_concepts/knowledge/filters/__init__.py

Whitespace-only changes.
36.2 KB
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "Jordan Mitchell",
3+
"position": "Junior Software Engineer",
4+
"summary": "Recent Computer Science graduate with strong foundational knowledge in web development and data structures. Passionate about building scalable software solutions.",
5+
"experience": [
6+
{
7+
"title": "Software Engineering Intern",
8+
"company": "SnapTech Solutions",
9+
"location": "San Francisco, CA",
10+
"period": "Jun 2023 – Aug 2023",
11+
"responsibilities": [
12+
"Worked on front-end components using React and Tailwind CSS",
13+
"Optimized internal tools, improving load times by 30%"
14+
]
15+
}
16+
],
17+
"education": [
18+
{
19+
"degree": "BSc in Computer Science",
20+
"institution": "University of California, Berkeley",
21+
"period": "2019 – 2023"
22+
}
23+
],
24+
"skills": ["JavaScript", "React", "Python", "HTML/CSS", "Git"]
25+
}
1.75 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Jordan Mitchell
2+
Junior Software Engineer
3+
4+
Summary:
5+
Recent Computer Science graduate with strong foundational knowledge in web development and data structures. Passionate about building scalable software solutions.
6+
7+
Experience:
8+
Software Engineering Intern at SnapTech Solutions, San Francisco, CA (Jun 2023 – Aug 2023)
9+
- Worked on front-end components using React and Tailwind CSS.
10+
- Optimized internal tools, improving load times by 30%.
11+
12+
Education:
13+
BSc in Computer Science, University of California, Berkeley (2019 – 2023)
14+
15+
Skills: JavaScript, React, Python, HTML/CSS, Git
36.2 KB
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Taylor Brooks",
3+
"position": "Software Engineer",
4+
"summary": "Experienced full-stack developer with 4 years of experience building RESTful APIs and dynamic web applications.",
5+
"experience": [
6+
{
7+
"title": "Software Engineer",
8+
"company": "NeoCode Labs",
9+
"location": "Austin, TX",
10+
"period": "2021 – Present",
11+
"responsibilities": [
12+
"Led migration from monolith to microservices architecture",
13+
"Implemented CI/CD pipelines reducing deployment time by 40%"
14+
]
15+
},
16+
{
17+
"title": "Junior Developer",
18+
"company": "Innovent Solutions",
19+
"location": "Austin, TX",
20+
"period": "2019 – 2021",
21+
"responsibilities": [
22+
"Contributed to Angular front-end development",
23+
"Maintained PostgreSQL databases"
24+
]
25+
}
26+
],
27+
"education": [
28+
{
29+
"degree": "BSc in Software Engineering",
30+
"institution": "University of Texas at Austin",
31+
"period": "2015 – 2019"
32+
}
33+
],
34+
"skills": ["Node.js", "Angular", "Docker", "PostgreSQL", "Kubernetes"]
35+
}
1.79 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Taylor Brooks
2+
Software Engineer
3+
4+
Summary:
5+
Experienced full-stack developer with 4 years of experience building RESTful APIs and dynamic web applications.
6+
7+
Experience:
8+
Software Engineer at NeoCode Labs, Austin, TX (2021 – Present)
9+
- Led migration from monolith to microservices architecture.
10+
- Implemented CI/CD pipelines reducing deployment time by 40%.
11+
Junior Developer at Innovent Solutions, Austin, TX (2019 – 2021)
12+
- Contributed to Angular front-end development.
13+
- Maintained PostgreSQL databases.
14+
15+
Education:
16+
BSc in Software Engineering, University of Texas at Austin (2015 – 2019)
17+
18+
Skills: Node.js, Angular, Docker, PostgreSQL, Kubernetes
36.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)